WSL2-Linux-Kernel/arch/powerpc/kernel
Michael Ellerman e7fda7e569 powerpc/64s: Remove MSR_RI optimisation in system_call_exit()
Currently in system_call_exit() we have an optimisation where we
disable MSR_RI (recoverable interrupt) and MSR_EE (external interrupt
enable) in a single mtmsrd instruction.

Unfortunately this will no longer work with THREAD_INFO_IN_TASK,
because then the load of TI_FLAGS might fault and faulting with MSR_RI
clear is treated as an unrecoverable exception which leads to a
panic().

So change the code to only clear MSR_EE prior to loading TI_FLAGS,
leaving the clear of MSR_RI until later. We have some latitude in
where do the clear of MSR_RI. A bit of experimentation has shown that
this location gives the least slow down.

This still causes a noticeable slow down in our null_syscall
performance. On a Power9 DD2.2:

  Before        After         Delta     Delta %
  955 cycles    999 cycles    -44	-4.6%

On the plus side this does simplify the code somewhat, because we
don't have to reenable MSR_RI on the restore_math() or
syscall_exit_work() paths which was necessitated previously by the
optimisation.

Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2019-02-23 22:31:39 +11:00
..
syscalls powerpc: add system call table generation support 2018-12-21 14:46:50 +11:00
trace powerpc: Enable kcov 2019-02-23 21:04:32 +11:00
vdso32 powerpc: Enable kcov 2019-02-23 21:04:32 +11:00
vdso64 powerpc: Enable kcov 2019-02-23 21:04:32 +11:00
.gitignore
Makefile powerpc: Enable kcov 2019-02-23 21:04:32 +11:00
align.c Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
asm-offsets.c powerpc/6xx: Don't use SPRN_SPRG2 for storing stack pointer while in RTAS 2019-02-22 00:10:16 +11:00
audit.c
btext.c powerpc: Rework btext_find_display to use of_stdout and device_type helpers 2018-11-26 22:33:37 +11:00
cacheinfo.c powerpc: Use device_type helpers to access the node type 2018-11-26 22:33:37 +11:00
cacheinfo.h
compat_audit.c
cpu_setup_6xx.S powerpc/6xx: Store PGDIR physical address in a SPRG 2019-02-22 00:10:16 +11:00
cpu_setup_44x.S
cpu_setup_fsl_booke.S powerpc/mm: move platform specific mmu-xxx.h in platform directories 2018-12-04 19:45:01 +11:00
cpu_setup_pa6t.S
cpu_setup_power.S
cpu_setup_ppc970.S
cputable.c powerpc/83xx: handle machine check caused by watchdog timer 2018-12-21 20:56:41 -06:00
crash.c
crash_dump.c
dbell.c
dma-iommu.c powerpc/dma: use the dma_direct mapping routines 2019-02-18 22:41:04 +11:00
dma-mask.c dma-mapping, powerpc: simplify the arch dma_set_mask override 2019-02-18 22:41:03 +11:00
dma-swiotlb.c powerpc/dma: use the generic direct mapping bypass 2019-02-18 22:41:04 +11:00
dt_cpu_ftrs.c powerpc/64s: Fix logic when handling unknown CPU features 2019-02-22 00:10:15 +11:00
eeh.c powerpc/eeh: Add eeh_force_recover to debugfs 2019-02-22 00:10:15 +11:00
eeh_cache.c powerpc/eeh_cache: Bump log level of eeh_addr_cache_print() 2019-02-22 00:10:14 +11:00
eeh_dev.c
eeh_driver.c powerpc/eeh: Improve recovery of passed-through devices 2019-02-05 11:55:44 +11:00
eeh_event.c powerpc/eeh: Add eeh_force_recover to debugfs 2019-02-22 00:10:15 +11:00
eeh_pe.c powerpc/eeh: Add include_passed to eeh_pe_state_clear() 2019-02-05 11:55:43 +11:00
eeh_sysfs.c powerpc/eeh: Add include_passed to eeh_pe_state_clear() 2019-02-05 11:55:43 +11:00
entry_32.S powerpc/32: Fix CONFIG_VIRT_CPU_ACCOUNTING_NATIVE for 40x/booke 2019-02-22 00:10:16 +11:00
entry_64.S powerpc/64s: Remove MSR_RI optimisation in system_call_exit() 2019-02-23 22:31:39 +11:00
epapr_hcalls.S
epapr_paravirt.c
exceptions-64e.S powerpc/fsl: Flush the branch predictor at each kernel entry (64bit) 2018-12-20 22:59:03 +11:00
exceptions-64s.S powerpc updates for 4.21 2018-12-27 10:43:24 -08:00
fadump.c powerpc/fadump: Do not allow hot-remove memory from fadump reserved area. 2018-12-21 11:32:49 +11:00
firmware.c
fpu.S
fsl_booke_entry_mapping.S
head_8xx.S powerpc/kconfig: make _etext and data areas alignment configurable on 8xx 2019-02-23 21:04:32 +11:00
head_32.S powerpc/mm/32s: add setibat() clearibat() and update_bats() 2019-02-23 21:04:32 +11:00
head_40x.S powerpc: simplify BDI switch 2019-02-22 00:10:16 +11:00
head_44x.S powerpc/44x: use patch_sites for TLB handlers patching 2018-12-19 18:56:32 +11:00
head_64.S
head_booke.h powerpc/fsl: Fixed warning: orphan section `__btb_flush_fixup' 2018-12-30 14:00:47 +11:00
head_fsl_booke.S powerpc/fsl: Flush the branch predictor at each kernel entry (32 bit) 2018-12-20 22:59:03 +11:00
hw_breakpoint.c
idle.c
idle_6xx.S
idle_book3e.S
idle_book3s.S
idle_e500.S
idle_power4.S
ima_kexec.c
io-workarounds.c
io.c
iomap.c
iommu.c IOMMU Updates for Linux v4.21 2019-01-01 15:55:29 -08:00
irq.c powerpc/irq: drop arch_early_irq_init() 2019-01-14 20:39:27 +11:00
isa-bridge.c powerpc: Use device_type helpers to access the node type 2018-11-26 22:33:37 +11:00
jump_label.c jump_label: move 'asm goto' support test to Kconfig 2019-01-06 09:46:51 +09:00
kexec_elf_64.c
kgdb.c kgdb/treewide: constify struct kgdb_arch arch_kgdb_ops 2018-12-30 08:33:06 +00:00
kprobes-ftrace.c
kprobes.c
kvm.c
kvm_emul.S
l2cr_6xx.S
legacy_serial.c powerpc: Use of_node_name_eq for node name comparisons 2018-12-22 21:29:50 +11:00
machine_kexec.c
machine_kexec_32.c
machine_kexec_64.c
machine_kexec_file_64.c powerpc, kexec_file: factor out memblock-based arch_kexec_walk_mem() 2018-12-06 14:38:50 +00:00
mce.c powerpc/64s: Better printing of machine check info for guest MCEs 2019-02-21 23:16:45 +11:00
mce_power.c
misc.S
misc_32.S powerpc: change CONFIG_6xx to CONFIG_PPC_BOOK3S_32 2018-11-26 22:33:37 +11:00
misc_64.S
module.c
module.lds
module_32.c
module_64.c
msi.c powerpc/msi: Fix NULL pointer access in teardown code 2018-11-29 23:49:11 +11:00
nvram_64.c pstore improvements and refactorings 2018-12-27 11:15:21 -08:00
of_platform.c
optprobes.c
optprobes_head.S
paca.c memblock: stop using implicit alignment to SMP_CACHE_BYTES 2018-10-31 08:54:16 -07:00
pci-common.c powerpc/pci: Add pci_find_controller_for_domain() 2019-02-22 00:10:14 +11:00
pci-hotplug.c
pci_32.c memblock: stop using implicit alignment to SMP_CACHE_BYTES 2018-10-31 08:54:16 -07:00
pci_64.c
pci_dn.c
pci_of_scan.c powerpc: Use device_type helpers to access the node type 2018-11-26 22:33:37 +11:00
pmc.c powerpc: change CONFIG_6xx to CONFIG_PPC_BOOK3S_32 2018-11-26 22:33:37 +11:00
ppc32.h
ppc_save_regs.S
proc_powerpc.c
process.c powerpc: Fix 32-bit KVM-PR lockup and host crash with MacOS guest 2019-02-22 00:10:15 +11:00
prom.c powerpc/prom: move the device tree if not in declared memory. 2018-12-20 22:21:20 +11:00
prom_init.c
prom_init_check.sh
prom_parse.c
ptrace.c powerpc/ptrace: Simplify vr_get/set() to avoid GCC warning 2019-02-22 00:10:14 +11:00
ptrace32.c
reloc_32.S
reloc_64.S
rtas-proc.c
rtas-rtc.c
rtas.c
rtas_flash.c Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
rtas_pci.c
rtasd.c Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
security.c powerpc/fsl: Update Spectre v2 reporting 2018-12-20 22:59:03 +11:00
setup-common.c powerpc/setup: display reason for not booting 2019-02-22 00:10:15 +11:00
setup.h
setup_32.c powerpc/dma: remove the unused ISA_DMA_THRESHOLD export 2018-12-20 22:21:20 +11:00
setup_64.c powerpc/64: Fix kernel stack 16-byte alignment 2018-11-15 14:48:43 +11:00
signal.c Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
signal.h
signal_32.c Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
signal_64.c powerpc/tm: Limit TM code inside PPC_TRANSACTIONAL_MEM 2019-01-11 23:45:00 +11:00
smp-tbsync.c
smp.c powerpc/smp: Make __smp_send_nmi_ipi() static 2019-02-22 00:10:15 +11:00
stacktrace.c powerpc/livepatch: return -ERRNO values in save_stack_trace_tsk_reliable() 2019-01-31 16:43:38 +11:00
suspend.c
swsusp.c
swsusp_32.S
swsusp_64.c
swsusp_asm64.S
swsusp_booke.S
sys_ppc32.c
syscalls.c powerpc/64: Make sys_switch_endian() traceable 2019-02-22 00:10:15 +11:00
sysfs.c powerpc: change CONFIG_6xx to CONFIG_PPC_BOOK3S_32 2018-11-26 22:33:37 +11:00
systbl.S powerpc: generate uapi header and system call table files 2018-12-21 14:46:50 +11:00
systbl_chk.sh
tau_6xx.c
time.c powerpc/kernel/time: Remove duplicate header 2019-01-30 23:42:31 +11:00
tm.S
traps.c powerpc/traps: fix recoverability of machine check handling on book3s/32 2019-02-22 00:10:16 +11:00
udbg.c powerpc: use a CONSOLE_LOGLEVEL_DEBUG macro 2019-01-14 20:39:27 +11:00
udbg_16550.c
uprobes.c
vdso.c powerpc: split compat syscall table out from native table 2018-12-21 14:46:50 +11:00
vecemu.c
vector.S
vmlinux.lds.S powerpc/kconfig: define CONFIG_DATA_SHIFT and CONFIG_ETEXT_SHIFT 2019-02-23 21:04:32 +11:00
watchdog.c