WSL2-Linux-Kernel/arch/parisc/kernel
Guilherme G. Piccoli 6158e958e8 parisc: Replace regular spinlock with spin_trylock on panic path
[ Upstream commit 829632dae8 ]

The panic notifiers' callbacks execute in an atomic context, with
interrupts/preemption disabled, and all CPUs not running the panic
function are off, so it's very dangerous to wait on a regular
spinlock, there's a risk of deadlock.

Refactor the panic notifier of parisc/power driver to make use
of spin_trylock - for that, we've added a second version of the
soft-power function. Also, some comments were reorganized and
trailing white spaces, useless header inclusion and blank lines
were removed.

Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
Cc: Jeroen Roovers <jer@xs4all.nl>
Acked-by: Helge Deller <deller@gmx.de> # parisc
Signed-off-by: Guilherme G. Piccoli <gpiccoli@igalia.com>
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-05-24 17:36:48 +01:00
..
syscalls parisc: Align parisc MADV_XXX constants with all other architectures 2023-01-14 10:23:27 +01:00
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
Makefile parisc: fix compilation when KEXEC=n and KEXEC_FILE=y 2019-12-15 21:05:38 +01:00
alternative.c parisc: Refactor alternative code to accept multiple conditions 2020-04-05 22:50:40 +02:00
asm-offsets.c parisc: Implement __get/put_kernel_nofault() 2021-09-09 22:53:09 +02:00
audit.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
cache.c parisc: Drop pa_swapper_pg_lock spinlock 2022-08-17 14:22:51 +02:00
compat_audit.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
drivers.c parisc: Avoid printing the hardware path twice 2022-11-10 18:15:40 +01:00
entry.S parisc/entry: fix trace test in syscall exit path 2021-11-21 13:44:13 +01:00
firmware.c parisc: Replace regular spinlock with spin_trylock on panic path 2023-05-24 17:36:48 +01:00
ftrace.c ftrace: Have the callbacks receive a struct ftrace_regs instead of pt_regs 2020-11-13 12:14:55 -05:00
hardware.c parisc: hardware: Update references to parisc website 2020-06-01 23:02:39 +02:00
head.S parisc: Add runtime check to prevent PA2.0 kernels on PA1.x machines 2022-09-15 11:30:01 +02:00
hpmc.S parisc: Fix IVT checksum calculation wrt HPMC 2021-02-12 16:31:42 +01:00
inventory.c parisc: Add qemu fw_cfg interface 2020-10-15 08:10:37 +02:00
irq.c genirq: Add and use an irq_data_update_affinity helper 2023-03-11 13:57:31 +01:00
jump_label.c parisc: Add static branch and JUMP_LABEL feature 2019-05-06 00:10:03 +02:00
kexec.c parisc: add support for kexec_file_load() syscall 2019-09-08 15:41:46 +02:00
kexec_file.c parisc: add support for kexec_file_load() syscall 2019-09-08 15:41:46 +02:00
kgdb.c maccess: rename probe_kernel_{read,write} to copy_{from,to}_kernel_nofault 2020-06-17 10:57:41 -07:00
kprobes.c parisc: kprobes: Use generic kretprobe trampoline handler 2020-09-08 11:52:33 +02:00
module.c mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
pa7300lc.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pacache.S mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
parisc_ksyms.c parisc: Drop strnlen_user() in favour of generic version 2021-09-09 12:44:30 +02:00
patch.c parisc: Fix patch code locking and flushing 2022-04-13 20:59:14 +02:00
pci-dma.c parisc: pci-dma: fix warning unused-function 2020-12-15 05:41:11 +01:00
pci.c parisc: Drop comments which are already in pci.h 2019-09-05 16:41:11 +02:00
pdc_chassis.c kernel.h: split out panic and oops helpers 2021-07-01 11:06:04 -07:00
pdc_cons.c tty: pdc_cons, free tty_driver upon failure 2021-07-27 12:17:21 +02:00
pdt.c parisc: Report bad pages as HardwareCorrupted 2020-07-28 11:19:17 +02:00
perf.c parisc/perf: open access for CAP_PERFMON privileged process 2020-04-16 12:19:08 -03:00
perf_asm.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
perf_images.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
process.c isystem: trim/fixup stdarg.h and other headers 2021-08-19 09:02:55 +09:00
processor.c parisc: Merge model and model name into one line in /proc/cpuinfo 2022-05-12 12:30:01 +02:00
ptrace.c parisc: Wire up PTRACE_GETREGS/PTRACE_SETREGS for compat case 2023-02-09 11:26:44 +01:00
real2.S parisc: Fix argument pointer in real64_call_asm() 2023-05-11 23:00:38 +09:00
relocate_kernel.S parisc: add kexec syscall support 2019-09-08 15:37:04 +02:00
setup.c Revert "parisc: Mark sched_clock unstable only if clocks are not syncronized" 2022-05-12 12:30:26 +02:00
signal.c Revert "parisc: Reduce sigreturn trampoline to 3 instructions" 2021-11-25 09:48:44 +01:00
signal32.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
signal32.h Revert "parisc: Reduce sigreturn trampoline to 3 instructions" 2021-11-25 09:48:44 +01:00
smp.c parisc/kgdb: add kgdb_roundup() to make kgdb work with idle polling 2021-11-18 19:16:21 +01:00
stacktrace.c treewide: Add SPDX license identifier for missed files 2019-05-21 10:50:45 +02:00
sys_parisc.c parisc: Align parisc MADV_XXX constants with all other architectures 2023-01-14 10:23:27 +01:00
sys_parisc32.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
syscall.S parisc: Correct completer in lws start 2021-12-29 12:28:53 +01:00
time.c Revert "parisc: Mark sched_clock unstable only if clocks are not syncronized" 2022-05-12 12:30:26 +02:00
topology.c parisc: Add CPU topology support 2017-11-17 15:27:22 +01:00
traps.c exit: Add and use make_task_dead. 2023-02-01 08:27:20 +01:00
unaligned.c parisc: Fix exception handler for fldw and fstw instructions 2022-08-31 17:16:33 +02:00
unwind.c parisc/unwind: fix unwinder when CONFIG_64BIT is enabled 2021-11-18 19:16:21 +01:00
vmlinux.lds.S Revert "parisc: Fix backtrace to always include init funtion names" 2021-12-01 09:04:41 +01:00