diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2021-05-28 11:07:30 +0200 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2021-06-10 14:12:13 +0200 |
commit | 6ffe2c6e6dcefb971e4046f02086c4adadd0b310 (patch) | |
tree | 43d7e2faab8483ebd512150de075fdcc3b1b2b46 /arch/powerpc/kernel/time.c | |
parent | KVM: PPC: Book3S HV P9: Move setting HDEC after switching to guest LPCR (diff) | |
download | linux-6ffe2c6e6dcefb971e4046f02086c4adadd0b310.tar.xz linux-6ffe2c6e6dcefb971e4046f02086c4adadd0b310.zip |
KVM: PPC: Book3S HV P9: Reduce irq_work vs guest decrementer races
irq_work's use of the DEC SPR is racy with guest<->host switch and guest
entry which flips the DEC interrupt to guest, which could lose a host
work interrupt.
This patch closes one race, and attempts to comment another class of
races.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210528090752.3542186-11-npiggin@gmail.com
Diffstat (limited to 'arch/powerpc/kernel/time.c')
-rw-r--r-- | arch/powerpc/kernel/time.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c index b67d93a609a2..da995c5fb97d 100644 --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc/kernel/time.c @@ -508,16 +508,6 @@ EXPORT_SYMBOL(profile_pc); * 64-bit uses a byte in the PACA, 32-bit uses a per-cpu variable... */ #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; -} - static inline void set_irq_work_pending_flag(void) { asm volatile("stb %0,%1(13)" : : |