linux/arch/powerpc/kernel
David Wilder c0ce7d0886 [POWERPC] Add the use of the firmware soft-reset-nmi to kdump.
With this patch, kdump uses the firmware soft-reset NMI for two purposes:
1) Initiate the kdump (take a crash dump) by issuing a soft-reset.
2) Break a CPU out of a deadlock condition that is detected during kdump
processing.

When a soft-reset is initiated each CPU will enter
system_reset_exception() and set its corresponding bit in the global
bit-array cpus_in_sr then call die(). When die() finds the CPU's bit set
in cpu_in_sr crash_kexec() is called to initiate a crash dump. The first
CPU to enter crash_kexec() is called the "crashing CPU". All other CPUs
are "secondary CPUs". The secondary CPU's pass through to
crash_kexec_secondary() and sleep. The crashing CPU waits for all CPUs
to enter via soft-reset then boots the kdump kernel (see
crash_soft_reset_check())

When the system crashes due to a panic or exception, crash_kexec() is
called by panic() or die(). The crashing CPU sends an IPI to all other
CPUs to notify them of the pending shutdown. If a CPU is in a deadlock
or hung state with interrupts disabled, the IPI will not be delivered.
The result being, that the kdump kernel is not booted. This problem is
solved with the use of a firmware generated soft-reset. After the
crashing_cpu has issued the IPI, it waits for 10 sec for all CPUs to
enter crash_ipi_callback(). A CPU signifies its entry to
crash_ipi_callback() by setting its corresponding bit in the
cpus_in_crash bit array. After 10 sec, if one or more CPUs have not set
their bit in cpus_in_crash we assume that the CPU(s) is deadlocked. The
operator is then prompted to generate a soft-reset to break the
deadlock. Each CPU enters the soft reset handler as described above.

Two conditions must be handled at this point:
1) The system crashed because the operator generated a soft-reset. See
2) The system had crashed before the soft-reset was generated ( in the
case of a Panic or oops).

The first CPU to enter crash_kexec() uses the state of the kexec_lock to
determine this state. If kexec_lock is already held then condition 2 is
true and crash_kexec_secondary() is called, else; this CPU is flagged as
the crashing CPU, the kexec_lock is acquired and crash_kexec() proceeds
as described above.

Each additional CPUs responding to the soft-reset will pass through
crash_kexec() to kexec_secondary(). All secondary CPUs call
crash_ipi_callback() readying them self's for the shutdown. When ready
they clear their bit in cpus_in_sr. The crashing CPU waits in
kexec_secondary() until all other CPUs have cleared their bits in
cpus_in_sr. The kexec kernel boot is then started.

Signed-off-by: Haren Myneni <haren@us.ibm.com>
Signed-off-by: David Wilder <dwilder@us.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-06-28 15:18:52 +10:00
..
vdso32 [PATCH] Mark unwind info for signal trampolines in vDSOs 2006-03-31 12:18:52 -08:00
vdso64 [PATCH] Mark unwind info for signal trampolines in vDSOs 2006-03-31 12:18:52 -08:00
align.c [PATCH] powerpc: Implement support for setting little-endian mode via prctl 2006-06-09 21:24:15 +10:00
asm-offsets.c powerpc: Use 64k pages without needing cache-inhibited large pages 2006-06-15 10:45:18 +10:00
binfmt_elf32.c ppc64: merge binfmt_elf32.c 2005-10-13 13:40:54 +10:00
btext.c [PATCH] powerpc: Remove device_node addrs/n_addr 2006-01-09 14:53:55 +11:00
cpu_setup_6xx.S [POWERPC] Guard L3CR references with CPU_FTR_L3CR. 2006-06-21 15:01:27 +10:00
cpu_setup_power4.S [POWERPC] Don't access HID registers if running on a Hypervisor. 2006-06-28 11:51:12 +10:00
cputable.c [POWERPC] Add 8641 CPU table entry. 2006-06-21 15:01:28 +10:00
crash_dump.c [PATCH] powerpc: Kdump header cleanup 2006-05-19 15:02:16 +10:00
crash.c [POWERPC] Add the use of the firmware soft-reset-nmi to kdump. 2006-06-28 15:18:52 +10:00
dma_64.c [PATCH] powerpc: IBMEBUS bus support 2006-01-09 14:49:06 +11:00
entry_32.S powerpc: Use correct sequence for putting CPU into nap mode 2006-04-18 21:49:11 +10:00
entry_64.S [POWERPC] system call micro optimisation 2006-06-15 19:31:26 +10:00
firmware.c [PATCH] powerpc: Rename and export ppc64_firmware_features 2006-03-28 16:45:20 +11:00
fpu.S [POWERPC] 64bit FPSCR support 2006-06-15 19:31:25 +10:00
head_4xx.S powerpc: Rename asm offset TRAP to _TRAP for 32-bit 2005-10-28 22:45:25 +10:00
head_8xx.S [PATCH] powerpc: trivial: modify comments to refer to new location of files 2006-02-10 16:53:51 +11:00
head_32.S [POWERPC] Add starting of secondary 86xx CPUs. 2006-06-21 15:01:28 +10:00
head_44x.S [PATCH] powerpc: trivial: modify comments to refer to new location of files 2006-02-10 16:53:51 +11:00
head_64.S [POWERPC] Setup the boot cpu's paca pointer in C rather than asm 2006-06-28 11:59:47 +10:00
head_booke.h [PATCH] powerpc: Fix Kernel FP unavail exception for BookE 2006-02-10 16:51:50 +11:00
head_fsl_booke.S [PATCH] powerpc: trivial: modify comments to refer to new location of files 2006-02-10 16:53:51 +11:00
ibmebus.c [PATCH] powerpc: IBMEBUS bus support 2006-01-09 14:49:06 +11:00
idle_6xx.S powerpc: Use correct sequence for putting CPU into nap mode 2006-04-18 21:49:11 +10:00
idle_power4.S powerpc: Use correct sequence for putting CPU into nap mode 2006-04-18 21:49:11 +10:00
idle.c [PATCH] powerpc: Ensure runlatch is off in the idle loop 2006-04-13 09:27:22 -07:00
init_task.c powerpc: make process.c suitable for both 32-bit and 64-bit 2005-10-10 22:29:05 +10:00
iomap.c [PATCH] powerpc: remove io_page_mask 2006-04-22 18:45:05 +10:00
iommu.c [POWERPC] kdump: Reserve the existing TCE mappings left by the first kernel 2006-06-28 11:59:46 +10:00
irq.c [PATCH] x86/powerpc make hardirq_ctx and softirq_ctx __read_mostly 2006-06-23 07:43:05 -07:00
kprobes.c [PATCH] powerpc/kprobes: fix singlestep out-of-line 2006-05-03 23:06:41 +10:00
l2cr_6xx.S powerpc: Move l2cr.S over to arch/powerpc 2006-03-27 15:22:28 +11:00
legacy_serial.c [PATCH] powerpc: legacy_serial loop cleanup 2006-03-27 14:48:54 +11:00
lparcfg.c [PATCH] powerpc: udbg_printf() formatting attribute 2006-05-19 15:02:19 +10:00
lparmap.c [PATCH] powerpc: Fix iSeries bug in VMALLOCBASE/VMALLOC_START consolidation 2006-01-09 15:06:06 +11:00
machine_kexec_32.c Storage class should be first 2006-06-26 18:57:34 +02:00
machine_kexec_64.c [POWERPC] Make kexec_setup() a regular initcall 2006-06-28 11:59:47 +10:00
machine_kexec.c [PATCH] powerpc: remove remaining crash_notes variable from machine_kexec.c 2006-01-11 14:48:02 +11:00
Makefile powerpc: Use correct sequence for putting CPU into nap mode 2006-04-18 21:49:11 +10:00
misc_32.S [PATCH] powerpc: remove do-nothing cpu setup routines 2006-05-19 14:24:18 +10:00
misc_64.S [PATCH] powerpc: remove do-nothing cpu setup routines 2006-05-19 14:24:18 +10:00
module_32.c powerpc: Move module.c over to arch/powerpc 2006-03-27 19:28:58 +11:00
module_64.c [PATCH] powerpc64: Fix loading of modules without a .toc section 2006-04-28 21:04:49 +10:00
nvram_64.c [PATCH] nvram_print_partitions cosmetic fixup 2006-04-29 18:08:05 +10:00
of_device.c [PATCH] powerpc: tidy-up of_register_driver()/driver_register() return values 2006-03-23 14:40:54 +11:00
paca.c [PATCH] powerpc: Allow non zero boot cpuids 2006-03-27 14:48:48 +11:00
pci_32.c [PATCH] mm: remove VM_LOCKED before remap_pfn_range and drop VM_SHM 2006-06-25 10:00:55 -07:00
pci_64.c [PATCH] mm: remove VM_LOCKED before remap_pfn_range and drop VM_SHM 2006-06-25 10:00:55 -07:00
pci_direct_iommu.c [POWERPC] cleanup dma_mapping_ops 2006-06-15 19:31:26 +10:00
pci_dn.c [PATCH] powerpc: clean up iSeries PCI probe 2006-05-24 16:08:57 +10:00
pci_iommu.c [POWERPC] cleanup dma_mapping_ops 2006-06-15 19:31:26 +10:00
perfmon_fsl_booke.c powerpc: Move perfmon_fsl_booke.c over to arch/powerpc 2006-03-27 20:09:04 +11:00
pmc.c [PATCH] powerpc: G4+ oprofile support 2006-01-09 15:06:03 +11:00
ppc32.h powerpc: move include/asm-ppc64/ppc32.h to arch/powerpc/kernel 2005-11-03 16:03:28 +11:00
ppc_ksyms.c powerpc/ppc: export strncasecmp 2006-04-02 16:01:58 -05:00
proc_ppc64.c [PATCH] mm: remove VM_LOCKED before remap_pfn_range and drop VM_SHM 2006-06-25 10:00:55 -07:00
process.c [PATCH] powerpc: Implement PR_[GS]ET_UNALIGN prctls for powerpc 2006-06-09 21:24:16 +10:00
prom_init.c [POWERPC] Fix builtin command line interaction with firmware 2006-06-15 19:31:26 +10:00
prom_parse.c [PATCH] powerpc: fix of_parse_dma_window 2006-06-09 21:21:02 +10:00
prom.c [POWERPC] Setup RTAS values earlier, to enable rtas_call() earlier 2006-06-28 11:59:48 +10:00
ptrace32.c [PATCH] use ptrace_get_task_struct in various places 2006-01-08 20:13:51 -08:00
ptrace-common.h [PATCH] powerpc: trivial: modify comments to refer to new location of files 2006-02-10 16:53:51 +11:00
ptrace.c [PATCH] powerpc: enable PPC_PTRACE_[GS]ETREGS on ppc32 2006-06-09 21:20:51 +10:00
rtas_flash.c [PATCH] powerpc: reorg RTAS delay code 2006-06-09 21:21:06 +10:00
rtas_pci.c [POWERPC] Add support for PCI-Express nodes in the device tree 2006-06-15 19:31:25 +10:00
rtas-proc.c [PATCH] powerpc: Avoid __initcall warnings 2006-04-13 09:27:26 -07:00
rtas-rtc.c [PATCH] powerpc: reorg RTAS delay code 2006-06-09 21:21:06 +10:00
rtas.c [POWERPC] Add udbg support for RTAS console 2006-06-28 11:59:48 +10:00
semaphore.c powerpc: Merge enough to start building in arch/powerpc. 2005-09-26 16:04:21 +10:00
setup_32.c [PATCH] powerpc: Parse early parameters earlier 2006-05-19 15:02:13 +10:00
setup_64.c [POWERPC] Setup the boot cpu's paca pointer in C rather than asm 2006-06-28 11:59:47 +10:00
setup-common.c [PATCH] powerpc: Make early xmon logic immune to location of early parsing 2006-05-19 15:02:12 +10:00
setup.h [PATCH] powerpc: Make early xmon logic immune to location of early parsing 2006-05-19 15:02:12 +10:00
signal_32.c Merge branch 'merge' 2006-06-12 17:53:34 +10:00
signal_64.c Merge branch 'merge' 2006-06-12 17:53:34 +10:00
smp-tbsync.c powerpc: Merge smp-tbsync.c (the generic timebase sync routine) 2005-11-04 13:28:58 +11:00
smp.c [POWERPC] Add starting of secondary 86xx CPUs. 2006-06-21 15:01:28 +10:00
swsusp_32.S powerpc: Move swsusp.S over to arch/powerpc 2006-03-27 19:21:46 +11:00
sys_ppc32.c [PATCH] consolidate sys32/compat_adjtimex 2006-03-26 08:56:57 -08:00
syscalls.c [PATCH] powerpc: declare arch syscalls in <asm/syscalls.h> 2006-03-27 14:48:22 +11:00
sysfs.c [PATCH] powerpc: Allow devices to register with numa topology 2006-05-01 18:17:46 -07:00
systbl.S [POWERPC] Unify ppc syscall tables 2006-06-21 15:01:32 +10:00
tau_6xx.c powerpc: Move cpu_setup_6xx.S and temp.c over to arch/powerpc 2006-03-27 19:15:26 +11:00
time.c [PATCH] fix and optimize clock source update 2006-06-26 09:58:21 -07:00
traps.c [POWERPC] Add the use of the firmware soft-reset-nmi to kdump. 2006-06-28 15:18:52 +10:00
udbg_16550.c [PATCH] powerpc: fix compile warning in udbg_init_maple_realmode 2006-02-07 21:51:52 +11:00
udbg.c [POWERPC] Add udbg support for RTAS console 2006-06-28 11:59:48 +10:00
vdso.c [PATCH] powerpc vdso updates 2006-06-09 21:20:57 +10:00
vecemu.c [PATCH] powerpc: Move arch/ppc*/kernel/vecemu.c to arch/powerpc 2005-09-21 19:21:07 +10:00
vector.S [POWERPC] 64bit FPSCR support 2006-06-15 19:31:25 +10:00
vio.c [POWERPC] node local IOMMU tables 2006-06-15 19:31:26 +10:00
vmlinux.lds.S [PATCH] powerpc: make iSeries flattened device tree dynamic 2006-05-24 16:08:57 +10:00