linux-stable/arch/powerpc
Christophe Leroy af0c61c5bb powerpc/interrupt: Don't read MSR from interrupt_exit_kernel_prepare()
[ Upstream commit 0eb089a72f ]

A disassembly of interrupt_exit_kernel_prepare() shows a useless read
of MSR register. This is shown by r9 being re-used immediately without
doing anything with the value read.

  c000e0e0:       60 00 00 00     nop
  c000e0e4:       7d 3a c2 a6     mfmd_ap r9
  c000e0e8:       7d 20 00 a6     mfmsr   r9
  c000e0ec:       7c 51 13 a6     mtspr   81,r2
  c000e0f0:       81 3f 00 84     lwz     r9,132(r31)
  c000e0f4:       71 29 80 00     andi.   r9,r9,32768

This is due to the use of local_irq_save(). The flags read by
local_irq_save() are never used, use local_irq_disable() instead.

Fixes: 13799748b9 ("powerpc/64: use interrupt restart table to speed up return from interrupt")
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/df36c6205ab64326fb1b991993c82057e92ace2f.1685955214.git.christophe.leroy@csgroup.eu
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-07-19 16:21:37 +02:00
..
boot powerpc/boot: Fix boot wrapper code generation with CONFIG_POWER10_CPU 2023-05-11 23:02:59 +09:00
configs - Yu Zhao's Multi-Gen LRU patches are here. They've been under test in 2022-10-10 17:53:04 -07:00
crypto treewide: use get_random_bytes() when possible 2022-10-11 17:42:58 -06:00
include powerpc/perf: Properly detect mpc7450 family 2023-05-11 23:03:31 +09:00
kernel powerpc/interrupt: Don't read MSR from interrupt_exit_kernel_prepare() 2023-07-19 16:21:37 +02:00
kexec powerpc/64/kdump: Limit kdump base to 512MB 2022-09-28 19:22:09 +10:00
kvm KVM: PPC: BookS PR-KVM and BookE do not support context tracking 2022-10-18 22:46:19 +11:00
lib powerpc: Fix reschedule bug in KUAP-unlocked user copy 2022-10-18 22:46:19 +11:00
math-emu powerpc/math-emu: Inhibit W=1 warnings 2022-09-08 11:11:18 +10:00
mm powerpc/mm: convert coprocessor fault to lock_mm_and_find_vma() 2023-07-01 13:16:25 +02:00
net powerpc/bpf/32: Only set a stack frame when necessary 2023-03-17 08:50:30 +01:00
perf powerpc/perf: Properly detect mpc7450 family 2023-05-11 23:03:31 +09:00
platforms powerpc/iommu: Limit number of TCEs to 512 for H_STUFF_TCE hcall 2023-06-09 10:34:23 +02:00
purgatory powerpc/purgatory: remove PGO flags 2023-06-21 16:00:55 +02:00
sysdev powerpc/sysdev/tsi108: fix resource printk format warnings 2023-05-11 23:03:31 +09:00
tools
xmon powerpc/xmon: Use KSYM_NAME_LEN in array size 2023-06-09 10:34:26 +02:00
Kbuild
Kconfig powerpc/mm: Convert to using lock_mm_and_find_vma() 2023-07-01 13:16:24 +02:00
Kconfig.debug powerpc: Add support for early debugging via Serial 16550 console 2022-09-28 19:22:09 +10:00
Makefile powerpc: Pass correct CPU reference to assembler 2023-03-22 13:34:05 +01:00
Makefile.postlink