linux_dsm_epyc7002/arch/powerpc/kernel
Nicholas Piggin 4e0e45b07d powerpc: Use trap metadata to prevent double restart rather than zeroing trap
It's not very nice to zero trap for this, because then system calls no
longer have trap_is_syscall(regs) invariant, and we can't distinguish
between sc and scv system calls (in a later patch).

Take one last unused bit from the low bits of the pt_regs.trap word
for this instead. There is not a really good reason why it should be
in trap as opposed to another field, but trap has some concept of
flags and it exists. Ideally I think we would move trap to 2-byte
field and have 2 more bytes available independently.

Add a selftests case for this, which can be seen to fail if
trap_norestart() is changed to return false.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
[mpe: Make them static inlines]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200507121332.2233629-4-mpe@ellerman.id.au
2020-05-15 11:58:54 +10:00
..
ptrace powerpc: Use set_trap() and avoid open-coding trap masking 2020-05-15 11:58:54 +10:00
syscalls asm-generic: fix unistd_32.h generation format 2020-04-07 10:43:42 -07:00
trace
vdso32 .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
vdso64 .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
align.c
asm-offsets.c powerpc/32s: Fix DSI and ISI exceptions for CONFIG_VMAP_STACK 2020-02-18 21:31:11 +11:00
audit.c
btext.c powerpc: Prefer __section and __printf from compiler_attributes.h 2020-03-27 00:16:32 +11:00
cacheinfo.c
cacheinfo.h
compat_audit.c
cpu_setup_6xx.S
cpu_setup_44x.S
cpu_setup_fsl_booke.S
cpu_setup_pa6t.S
cpu_setup_power.S
cpu_setup_ppc970.S
cputable.c powerpc/cputable: Remove unnecessary copy of cpu_spec->oprofile_type 2020-04-01 14:30:51 +11:00
crash_dump.c
dawr.c
dbell.c
dma-iommu.c
dma-mask.c
dma-swiotlb.c
dt_cpu_ftrs.c powerpc/64: Setup a paca before parsing device tree etc. 2020-03-25 12:09:37 +11:00
early_32.c
eeh_cache.c powerpc/eeh_cache: Don't use pci_dn when inserting new ranges 2020-01-23 21:31:18 +11:00
eeh_dev.c
eeh_driver.c powerpc/eeh: Fix deadlock handling dead PHB 2020-02-17 12:47:05 +11:00
eeh_event.c
eeh_pe.c
eeh_sysfs.c powerpc/eeh_sysfs: Make clearing EEH_DEV_SYSFS saner 2020-01-23 21:31:19 +11:00
eeh.c powerpc/eeh: Rework eeh_ops->probe() 2020-03-25 12:09:39 +11:00
entry_32.S Merge branch 'fixes' into next 2020-03-10 15:16:42 +11:00
entry_64.S powerpc/64: make buildable without CONFIG_COMPAT 2020-04-03 00:10:00 +11:00
epapr_hcalls.S
epapr_paravirt.c
exceptions-64e.S powerpc/64s: Implement interrupt exit logic in C 2020-04-01 13:42:14 +11:00
exceptions-64s.S powerpc/64s: Fix doorbell wakeup msgclr optimisation 2020-04-03 00:09:53 +11:00
fadump.c powerpc/fadump: consider reserved ranges while reserving memory 2020-05-04 22:29:58 +10:00
firmware.c
fpu.S powerpc/32s: Enable CONFIG_VMAP_STACK 2020-01-27 22:37:24 +11:00
fsl_booke_entry_mapping.S
head_8xx.S powerpc/8xx: Fix clearing of bits 20-23 in ITLB miss 2020-02-17 12:47:06 +11:00
head_32.h Merge branch 'fixes' into next 2020-03-10 15:16:42 +11:00
head_32.S powerpc/32s: reorder Linux PTE bits to better match Hash PTE bits. 2020-03-25 12:09:27 +11:00
head_40x.S powerpc/32: save DEAR/DAR before calling handle_page_fault 2020-01-26 22:15:09 +11:00
head_44x.S
head_64.S powerpc/64s: Fix section mismatch warnings from boot code 2020-03-25 12:07:59 +11:00
head_booke.h powerpc: Replace _ALIGN_UP() by ALIGN() 2020-05-11 23:15:15 +10:00
head_fsl_booke.S powerpc/32: save DEAR/DAR before calling handle_page_fault 2020-01-26 22:15:09 +11:00
hw_breakpoint.c powerpc/ptrace: move ptrace_triggered() into hw_breakpoint.c 2020-04-01 14:30:49 +11:00
idle_6xx.S powerpc/6xx: Fix power_save_ppc32_restore() with CONFIG_VMAP_STACK 2020-02-18 21:31:12 +11:00
idle_book3e.S
idle_book3s.S
idle_e500.S
idle.c
ima_arch.c
io-workarounds.c
io.c
iomap.c
iommu.c
irq.c powerpc/64s: Fix doorbell wakeup msgclr optimisation 2020-04-03 00:09:53 +11:00
isa-bridge.c
jump_label.c
kgdb.c
kprobes-ftrace.c
kprobes.c powerpc/kprobes: Ignore traps that happened in real mode 2020-03-25 12:09:51 +11:00
kvm_emul.S
kvm.c
l2cr_6xx.S
legacy_serial.c
Makefile powerpc/64: make buildable without CONFIG_COMPAT 2020-04-03 00:10:00 +11:00
mce_power.c powerpc/mce: Don't reload pte val in addr_to_pfn 2020-05-05 21:20:14 +10:00
mce.c powerpc/pseries: Handle UE event for memcpy_mcsafe 2020-03-27 14:59:35 +11:00
misc_32.S
misc_64.S
misc.S powerpc: Rename current_stack_pointer() to current_stack_frame() 2020-03-04 22:44:28 +11:00
module_32.c powerpc: module_[32|64].c: replace swap function with built-in one 2020-05-11 23:15:14 +10:00
module_64.c powerpc: module_[32|64].c: replace swap function with built-in one 2020-05-11 23:15:14 +10:00
module.c
module.lds
msi.c
note.S
nvram_64.c powerpc: Replace _ALIGN_UP() by ALIGN() 2020-05-11 23:15:15 +10:00
of_platform.c powerpc/eeh: Make early EEH init pseries specific 2020-03-25 12:09:39 +11:00
optprobes_head.S
optprobes.c
paca.c powerpc/64: Prevent stack protection in early boot 2020-03-25 12:09:38 +11:00
pci_32.c
pci_64.c powerpc: Replace _ALIGN_UP() by ALIGN() 2020-05-11 23:15:15 +10:00
pci_dn.c powerpc/pcidn: Warn when sriov pci_dn management is used incorrectly 2020-01-23 21:31:19 +11:00
pci_of_scan.c
pci-common.c powerpc updates for 5.7 2020-04-05 11:12:59 -07:00
pci-hotplug.c powerpc/eeh: Do early EEH init only when required 2020-03-25 12:09:38 +11:00
pmc.c
ppc32.h
ppc_save_regs.S powerpc: Improve ppc_save_regs() 2020-04-04 21:40:57 +11:00
proc_powerpc.c proc: convert everything to "struct proc_ops" 2020-02-04 03:05:26 +00:00
process.c powerpc: trap_is_syscall() helper to hide syscall trap number 2020-05-15 11:58:54 +10:00
prom_init_check.sh
prom_init.c powerpc: Replace _ALIGN() by ALIGN() 2020-05-11 23:15:16 +10:00
prom_parse.c
prom.c powerpc: Replace _ALIGN_UP() by ALIGN() 2020-05-11 23:15:15 +10:00
reloc_32.S
reloc_64.S
rtas_flash.c proc: convert everything to "struct proc_ops" 2020-02-04 03:05:26 +00:00
rtas_pci.c
rtas-proc.c proc: convert everything to "struct proc_ops" 2020-02-04 03:05:26 +00:00
rtas-rtc.c
rtas.c
rtasd.c proc: convert everything to "struct proc_ops" 2020-02-04 03:05:26 +00:00
secure_boot.c
security.c
secvar-ops.c
secvar-sysfs.c
setup_32.c powerpc/32: drop unused ISA_DMA_THRESHOLD 2020-04-01 14:30:50 +11:00
setup_64.c powerpc/64: Prevent stack protection in early boot 2020-03-25 12:09:38 +11:00
setup-common.c powerpc/kernel: no need to check return value of debugfs_create functions 2020-03-04 22:44:25 +11:00
setup.h powerpc/64: Prevent stack protection in early boot 2020-03-25 12:09:38 +11:00
signal_32.c powerpc: Use trap metadata to prevent double restart rather than zeroing trap 2020-05-15 11:58:54 +10:00
signal_64.c powerpc: Use trap metadata to prevent double restart rather than zeroing trap 2020-05-15 11:58:54 +10:00
signal.c powerpc: Use trap metadata to prevent double restart rather than zeroing trap 2020-05-15 11:58:54 +10:00
signal.h powerpc/64/sycall: Implement syscall entry/exit logic in C 2020-04-01 13:42:13 +11:00
smp-tbsync.c
smp.c powerpc/smp: Use IS_ENABLED() to avoid #ifdef 2020-03-27 01:15:09 +11:00
stacktrace.c powerpc: Rename current_stack_pointer() to current_stack_frame() 2020-03-04 22:44:28 +11:00
suspend.c
swsusp_32.S
swsusp_64.c
swsusp_asm64.S
swsusp_booke.S
swsusp.c
sys_ppc32.c
syscall_64.c powerpc/64: make buildable without CONFIG_COMPAT 2020-04-03 00:10:00 +11:00
syscalls.c
sysfs.c powerpc/sysfs: Show idle_purr and idle_spurr for every CPU 2020-04-30 12:35:26 +10:00
systbl_chk.sh
systbl.S powerpc/64/sycall: Implement syscall entry/exit logic in C 2020-04-01 13:42:13 +11:00
tau_6xx.c
time.c Revert "powerpc/64: irq_work avoid interrupt when called with hardware irqs enabled" 2020-04-03 16:55:34 +11:00
tm.S
traps.c powerpc/kernel: no need to check return value of debugfs_create functions 2020-03-04 22:44:25 +11:00
ucall.S
udbg_16550.c
udbg.c
uprobes.c
vdso.c powerpc/64: make buildable without CONFIG_COMPAT 2020-04-03 00:10:00 +11:00
vecemu.c
vector.S powerpc/64s: Implement interrupt exit logic in C 2020-04-01 13:42:14 +11:00
vmlinux.lds.S powerpc updates for 5.7 2020-04-05 11:12:59 -07:00
watchdog.c