linux_dsm_epyc7002/arch/powerpc/kernel
Michael Ellerman 7b08729cb2 powerpc/64: Save stack pointer when we hard disable interrupts
A CPU that gets stuck with interrupts hard disable can be difficult to
debug, as on some platforms we have no way to interrupt the CPU to
find out what it's doing.

A stop-gap is to have the CPU save it's stack pointer (r1) in its paca
when it hard disables interrupts. That way if we can't interrupt it,
we can at least trace the stack based on where it last disabled
interrupts.

In some cases that will be total junk, but the stack trace code should
handle that. In the simple case of a CPU that disable interrupts and
then gets stuck in a loop, the stack trace should be informative.

We could clear the saved stack pointer when we enable interrupts, but
that loses information which could be useful if we have nothing else
to go on.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
2018-06-03 20:43:42 +10:00
..
trace powerpc: Only support DYNAMIC_FTRACE not static 2018-05-03 22:32:29 +10:00
vdso32 powerpc/kbuild: Remove CROSS32 defines from top level powerpc Makefile 2018-06-01 23:08:06 +10:00
vdso64 powerpc/vdso64: Add support for CLOCK_{REALTIME/MONOTONIC}_COARSE 2017-12-04 15:01:09 +11:00
.gitignore
align.c powerpc: Fix check for copy/paste instructions in alignment handler 2017-10-25 12:42:35 +02:00
asm-offsets.c powerpc64/ftrace: Add a field in paca to disable ftrace in unsafe code paths 2018-05-03 22:32:25 +10: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
btext.c powerpc: Make function btext_initialize static 2018-05-25 12:04:44 +10:00
cacheinfo.c powerpc: Convert to using %pOF instead of full_name 2017-08-23 22:27:04 +10:00
cacheinfo.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01: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
cpu_setup_6xx.S powerpc: Free up CPU feature bits on 64-bit machines 2018-03-24 00:38:51 +11:00
cpu_setup_44x.S
cpu_setup_fsl_booke.S powerpc: Free up CPU feature bits on 64-bit machines 2018-03-24 00:38:51 +11:00
cpu_setup_pa6t.S
cpu_setup_power.S powerpc/64s: Clear PCR on boot 2018-05-18 16:05:15 +10:00
cpu_setup_ppc970.S
cputable.c powerpc/64s: Remove POWER4 support 2018-04-01 00:47:50 +11:00
crash_dump.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
crash.c powerpc/64: Use array of paca pointers and allocate pacas individually 2018-03-30 23:34:23 +11:00
dbell.c powerpc: Introduce msgsnd/doorbell barrier primitives 2017-04-13 23:34:33 +10:00
dma-iommu.c powerpc: rename dma_direct_ to dma_nommu_ 2018-01-10 16:41:14 +01:00
dma-swiotlb.c swiotlb: rename swiotlb_free to swiotlb_exit 2018-01-15 09:35:39 +01:00
dma.c powerpc: rename swiotlb_dma_ops 2018-01-15 09:35:26 +01:00
dt_cpu_ftrs.c powerpc: Add TIDR CPU feature for POWER9 2018-06-03 20:40:31 +10:00
eeh_cache.c powerpc/eeh: Fix misleading comment in __eeh_addr_cache_get_device() 2018-03-27 23:44:58 +11:00
eeh_dev.c powerpc/eeh: Create PHB PEs after EEH is initialized 2017-09-21 14:56:00 +10:00
eeh_driver.c powerpc/eeh: Refactor report functions 2018-06-03 20:43:41 +10:00
eeh_event.c powerpc/eeh: Manage EEH_PE_RECOVERING inside eeh_handle_normal_event() 2018-03-27 23:44:58 +11:00
eeh_pe.c powerpc/eeh: Introduce eeh_for_each_pe() 2018-06-03 20:43:39 +10:00
eeh_sysfs.c powerpc/eeh: Add EEH notify resume sysfs 2018-01-27 20:02:52 +11:00
eeh.c powerpc/eeh: Add message when PE processing at parent 2018-06-03 20:43:39 +10:00
entry_32.S powerpc/8xx: Only perform perf counting when perf is in use. 2018-01-16 23:47:12 +11:00
entry_64.S powerpc/mm/hash: Add missing isync prior to kernel stack SLB switch 2018-06-03 20:40:37 +10:00
epapr_hcalls.S ppc: move exports to definitions 2016-08-07 23:50:09 -04:00
epapr_paravirt.c
exceptions-64e.S powerpc/64s: Fix may_hard_irq_enable() for PMI soft masking 2018-02-08 23:56:10 +11:00
exceptions-64s.S powerpc/64: Save stack pointer when we hard disable interrupts 2018-06-03 20:43:42 +10:00
fadump.c powerpc/fadump: Unregister fadump on kexec down path. 2018-05-03 23:19:30 +10:00
firmware.c
fpu.S Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild 2016-10-14 14:26:58 -07:00
fsl_booke_entry_mapping.S License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
head_8xx.S powerpc/8xx: fix invalid register expression in head_8xx.S 2018-05-25 00:08:26 +10:00
head_32.S powerpc: Fix DABR match on hash based systems 2017-11-13 22:12:48 +11:00
head_40x.S ppc: move exports to definitions 2016-08-07 23:50:09 -04:00
head_44x.S ppc: move exports to definitions 2016-08-07 23:50:09 -04:00
head_64.S powerpc/64: Use array of paca pointers and allocate pacas individually 2018-03-30 23:34:23 +11:00
head_booke.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
head_fsl_booke.S ppc: move exports to definitions 2016-08-07 23:50:09 -04:00
hw_breakpoint.c powerpc/ptrace: Fix enforcement of DAWR constraints 2018-05-21 14:47:44 +10:00
idle_6xx.S
idle_book3e.S powerpc/64: Rename soft_enabled to irq_soft_mask 2018-01-19 22:37:01 +11:00
idle_book3s.S powerpc/kvm: Fix lockups when running KVM guests on Power8 2018-04-19 16:22:20 +10:00
idle_e500.S powerpc/e500mc: Remove dead L2 flushing code in idle_e500.S 2015-06-02 21:37:19 -05:00
idle_power4.S powerpc/64: Rename soft_enabled to irq_soft_mask 2018-01-19 22:37:01 +11:00
idle.c
ima_kexec.c powerpc: ima: send the kexec buffer to the next kernel 2016-12-20 09:48:44 -08:00
io-workarounds.c powerpc: Convert to using %pOF instead of full_name 2017-08-23 22:27:04 +10:00
io.c
iomap.c powerpc: iomap.c: introduce io{read|write}64_{lo_hi|hi_lo} 2018-04-05 14:59:26 +10:00
iommu.c powerpc/iommu: Use permission-specific DEVICE_ATTR variants 2017-09-01 16:42:54 +10:00
irq.c powerpc/time: account broadcast timer event interrupts separately 2018-06-03 20:40:29 +10:00
isa-bridge.c powerpc: Convert to using %pOF instead of full_name 2017-08-23 22:27:04 +10:00
jump_label.c jump_label: Rename JUMP_LABEL_{EN,DIS}ABLE to JUMP_LABEL_{JMP,NOP} 2015-08-03 11:34:12 +02:00
kexec_elf_64.c kernel/kexec_file.c: allow archs to set purgatory load address 2018-04-13 17:10:28 -07:00
kgdb.c powerpc/8xx: Getting rid of remaining use of CONFIG_8xx 2017-08-10 23:32:12 +10:00
kprobes-ftrace.c powerpc/kprobes: Do not disable interrupts for optprobes and kprobes_on_ftrace 2017-11-12 23:51:41 +11:00
kprobes.c powerpc/kprobes: Fix call trace due to incorrect preempt count 2018-03-31 00:10:33 +11:00
kvm_emul.S
kvm.c powerpc/kvm: Prefer fault_in_pages_readable function 2018-05-17 14:12:40 +10:00
l2cr_6xx.S powerpc/l2cr_6xx: Fix invalid use of register expressions 2017-08-15 21:04:32 +10:00
legacy_serial.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
machine_kexec_32.c
machine_kexec_64.c powerpc/64/kexec: fix race in kexec when XIVE is shutdown 2018-05-10 23:25:08 +10:00
machine_kexec_file_64.c kexec_file,x86,powerpc: factor out kexec_file_ops functions 2018-04-13 17:10:27 -07:00
machine_kexec.c powerpc64/kexec: Hard disable ftrace before switching to the new kernel 2018-05-03 22:32:27 +10:00
Makefile powerpc updates for 4.17 2018-04-07 12:08:19 -07:00
mce_power.c powerpc/mce: Fix a bug where mce loops on memory UE. 2018-04-24 13:54:51 +10:00
mce.c powerpc updates for 4.16 2018-02-02 10:01:04 -08:00
misc_32.S powerpc/40x: Clear MSR_DR in one insn instead of two 2017-06-02 19:20:43 +10:00
misc_64.S powerpc: Remove unused flush_dcache_phys_range() 2018-03-20 16:47:53 +11:00
misc.S powerpc/32: Use stmw/lmw for registers save/restore in asm 2018-05-18 00:09:06 +10:00
module_32.c powerpc/sparse: Fix plain integer as NULL pointer warning 2018-05-25 12:04:38 +10:00
module_64.c powerpc/modules: remove unused mod_arch_specific.toc field 2018-05-28 18:46:34 +10:00
module.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
module.lds powerpc/modules: Fix alignment of .toc section in kernel modules 2017-12-11 13:03:35 +11:00
msi.c powerpc: Remove MSI-related PCI controller ops from ppc_md 2015-06-02 11:47:45 +10:00
nvram_64.c powerpc/64: Fix strncpy() related build failures with GCC 8.1 2018-06-03 20:40:24 +10:00
of_platform.c powerpc: Convert to using %pOF instead of full_name 2017-08-23 22:27:04 +10:00
optprobes_head.S powerpc/64: Rename soft_enabled to irq_soft_mask 2018-01-19 22:37:01 +11:00
optprobes.c powerpc/kprobes: Do not disable interrupts for optprobes and kprobes_on_ftrace 2017-11-12 23:51:41 +11:00
paca.c Merge branch 'topic/paca' into next 2018-03-31 09:09:36 +11:00
pci_32.c powerpc/32: Add a missing include header 2018-05-25 12:04:46 +10:00
pci_64.c powerpc: Fix build by disabling attribute-alias warning for SYSCALL_DEFINEx 2018-06-03 20:40:24 +10:00
pci_dn.c powerpc/pci: Separate SR-IOV Calls 2017-12-11 13:03:35 +11:00
pci_of_scan.c pci-v4.16-changes 2018-02-06 09:59:40 -08:00
pci-common.c powerpc/pci: Use generic pci_mmap_resource_range() 2018-02-28 16:18:53 -06:00
pci-hotplug.c powerpc/pci: Unroll two pass loop when scanning bridges 2017-12-18 23:05:52 -06:00
pmc.c
ppc32.h
ppc_save_regs.S powerpc/32: Use stmw/lmw for registers save/restore in asm 2018-05-18 00:09:06 +10:00
proc_powerpc.c powerpc: Use octal numbers for file permissions 2018-01-22 05:48:33 +11:00
process.c powerpc: use task_pid_nr() for TID allocation 2018-06-03 20:40:31 +10:00
prom_init_check.sh powerpc/mm/radix: Update command line parsing for disable_radix 2018-04-04 16:59:50 +10:00
prom_init.c powerpc/prom: Fix %u/%llx usage since prom_printf() change 2018-06-02 01:48:11 +10:00
prom_parse.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
prom.c powerpc/prom: Drop support for old FDT versions 2018-05-11 23:29:04 +10:00
ptrace32.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
ptrace.c powerpc/ptrace: Use copy_{from, to}_user() rather than open-coding 2018-06-03 20:43:41 +10:00
reloc_32.S
reloc_64.S powerpc/asm: Convert .llong directives to .8byte 2017-08-31 14:26:47 +10:00
rtas_flash.c powerpc: Use octal numbers for file permissions 2018-01-22 05:48:33 +11:00
rtas_pci.c powerpc/kernel: Change retrieval of pci_dn 2017-08-31 14:26:40 +10:00
rtas-proc.c powerpc: rtas: clean up time handling 2018-06-03 20:43:33 +10:00
rtas-rtc.c powerpc: use time64_t in read_persistent_clock 2018-06-03 20:43:33 +10:00
rtas.c powerpc: Fix build by disabling attribute-alias warning for SYSCALL_DEFINEx 2018-06-03 20:40:24 +10:00
rtasd.c vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
security.c powerpc: Move default security feature flags 2018-04-03 21:50:08 +10:00
setup_32.c powerpc/32: Add missing prototypes for (early|machine)_init() 2018-03-13 15:50:42 +11:00
setup_64.c powerpc64/ftrace: Delay enabling ftrace on secondary cpus 2018-05-03 22:32:26 +10:00
setup-common.c powerpc/tau: Synchronize function prototypes and body 2018-05-25 12:04:43 +10:00
setup.h powerpc/tau: Synchronize function prototypes and body 2018-05-25 12:04:43 +10:00
signal_32.c powerpc: Fix build by disabling attribute-alias warning for SYSCALL_DEFINEx 2018-06-03 20:40:24 +10:00
signal_64.c powerpc: Fix build by disabling attribute-alias warning for SYSCALL_DEFINEx 2018-06-03 20:40:24 +10:00
signal.c powerpc: Check address limit on user-mode return (TIF_FSCHECK) 2018-06-03 20:43:42 +10:00
signal.h powerpc/syscalls: signal_{32, 64} - switch to SYSCALL_DEFINE 2018-05-10 23:25:13 +10:00
smp-tbsync.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
smp.c powerpc: move a stray NMI IPI case under NMI_IPI ifdef 2018-06-03 20:40:29 +10:00
stacktrace.c powerpc/livepatch: Fix build error with kprobes disabled. 2018-05-29 11:10:39 +10:00
suspend.c nosave: consolidate __nosave_{begin,end} in <asm/sections.h> 2014-10-09 22:26:04 -04:00
swsusp_32.S License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
swsusp_64.c sched/headers: Prepare for new header dependencies before moving code to <linux/sched/nmi.h> 2017-03-02 08:42:30 +01:00
swsusp_asm64.S powerpc: Fix invalid use of register expressions 2017-08-10 22:29:41 +10:00
swsusp_booke.S License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
swsusp.c powerpc/swsusp: Include suspend.h to silence sparse warnings 2017-03-20 19:02:49 +11:00
sys_ppc32.c powerpc/syscalls: kill ppc32_select() 2018-05-10 23:25:15 +10:00
syscalls.c powerpc: Fix build by disabling attribute-alias warning for SYSCALL_DEFINEx 2018-06-03 20:40:24 +10:00
sysfs.c Merge branch 'topic/paca' into next 2018-03-31 09:09:36 +11:00
systbl_chk.c powerpc/syscalls: Add COMPAT_SPU_NEW() macro 2018-05-10 23:25:14 +10:00
systbl_chk.sh powerpc: Make it clearer that systbl check errors are errors 2018-05-10 23:25:16 +10:00
systbl.S powerpc/syscalls: Add COMPAT_SPU_NEW() macro 2018-05-10 23:25:14 +10:00
tau_6xx.c powerpc/tau: Make some function static 2018-05-25 12:04:44 +10:00
time.c powerpc: remove unused to_tm() helper 2018-06-03 20:43:34 +10:00
tm.S powerpc: Export tm_enable()/tm_disable/tm_abort() APIs 2018-05-24 16:04:02 +10:00
traps.c powerpc/fscr: Enable interrupts earlier before calling get_user() 2018-04-10 11:23:23 +10:00
udbg_16550.c powerpc: Fix bad NULL pointer check in udbg_uart_getc_poll() 2014-11-12 13:47:20 +11:00
udbg.c powerpc: Remove the celleb support 2015-04-07 17:15:13 +10:00
uprobes.c powerpc/uprobes: Implement arch_uretprobe_is_alive() 2017-08-24 16:19:21 +10:00
vdso.c powerpc: Use feature bit for RTC presence rather than timebase presence 2018-03-24 00:36:45 +11:00
vecemu.c powerpc: Add a missing include header 2018-05-25 12:04:46 +10:00
vector.S License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
vmlinux.lds.S powerpc updates for 4.16 2018-02-02 10:01:04 -08:00
watchdog.c powerpc/watchdog: provide more data in watchdog messages 2018-05-10 23:25:11 +10:00