summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/time.h
diff options
context:
space:
mode:
authorMichael Ellerman <mpe@ellerman.id.au>2021-06-17 08:51:38 +0200
committerMichael Ellerman <mpe@ellerman.id.au>2021-06-17 08:51:38 +0200
commit3c53642324f526c0aba411bf8e6cf2ab2471192a (patch)
treef603ab1fa6c3236618f721806327d4f21a8a1f83 /arch/powerpc/include/asm/time.h
parentpowerpc/mm/book3s64: Fix possible build error (diff)
parentKVM: PPC: Book3S HV: remove ISA v3.0 and v3.1 support from P7/8 path (diff)
downloadlinux-3c53642324f526c0aba411bf8e6cf2ab2471192a.tar.xz
linux-3c53642324f526c0aba411bf8e6cf2ab2471192a.zip
Merge branch 'topic/ppc-kvm' into next
Merge some powerpc KVM patches from our topic branch. In particular this brings in Nick's big series rewriting parts of the guest entry/exit path in C. Conflicts: arch/powerpc/kernel/security.c arch/powerpc/kvm/book3s_hv_rmhandlers.S
Diffstat (limited to 'arch/powerpc/include/asm/time.h')
-rw-r--r--arch/powerpc/include/asm/time.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/time.h b/arch/powerpc/include/asm/time.h
index 8dd3cdb25338..8c2c3dd4ddba 100644
--- a/arch/powerpc/include/asm/time.h
+++ b/arch/powerpc/include/asm/time.h
@@ -97,6 +97,18 @@ extern void div128_by_32(u64 dividend_high, u64 dividend_low,
extern void secondary_cpu_time_init(void);
extern void __init time_init(void);
+#ifdef CONFIG_PPC64
+static inline unsigned long test_irq_work_pending(void)
+{
+ unsigned long x;
+
+ asm volatile("lbz %0,%1(13)"
+ : "=r" (x)
+ : "i" (offsetof(struct paca_struct, irq_work_pending)));
+ return x;
+}
+#endif
+
DECLARE_PER_CPU(u64, decrementers_next_tb);
/* Convert timebase ticks to nanoseconds */