summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-11-03 13:54:35 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2015-11-03 13:54:35 -0800
commit316dde2fe95b33657de1fc2db54bfc16aa065790 (patch)
treef7eb193f458be01b3ce2a104492528bafbfbc020 /lib
parent2c2b8285dcd4d0674b6e77269cf32721fffea59e (diff)
parent116ef0fcc9268a876c8d1bbf77d8fa80111fa526 (diff)
Merge branch 'for-linus' of git://ftp.arm.linux.org.uk/~rmk/linux-arm
Pull ARM updates from Russell King: "In this ARM merge, we remove more lines than we add. Changes include: - Enable imprecise aborts early, so that bus errors aren't masked until later in the boot. This has the side effect that boot loaders which provoke these aborts can cause the kernel to crash early in boot, so we install a handler to report this event around the site where these are enabled. - Remove the buggy but impossible to enable cmpxchg syscall code. - Add unwinding annotations to some assembly code. - Add support for atomic half-word exchange for ARMv6k+. - Reduce ioremap() alignment for SMP/LPAE cases where we don't need the large alignment. - Addition of an "optimal" 3G configuration for systems with 1G of RAM. - Increase vmalloc space by 128M. - Constify some SMP operations structures, which have never been writable. - Improve ARMs dma_mmap() support for mapping DMA coherent mappings into userspace. - Fix to the NMI backtrace code in the IPI case on ARM where the failing CPU gets stuck for 10s waiting for its own IPI to be delivered. - Removal of legacy PM support from the AMBA bus driver. - Another fix for the previous fix of vdsomunge" * 'for-linus' of git://ftp.arm.linux.org.uk/~rmk/linux-arm: (23 commits) ARM: 8449/1: fix bug in vdsomunge swab32 macro arm: add missing of_node_put ARM: 8447/1: catch pending imprecise abort on unmask ARM: 8446/1: amba: Remove unused callbacks for legacy system PM ARM: 8443/1: Adding support for atomic half word exchange ARM: clean up TWD after previous patch ARM: 8441/2: twd: Don't set CLOCK_EVT_FEAT_C3STOP unconditionally ARM: 8440/1: remove obsolete documentation ARM: make highpte an expert option ARM: 8433/1: add a VMSPLIT_3G_OPT config option ARM: 8439/1: Fix backtrace generation when IPI is masked ARM: 8428/1: kgdb: Fix registers on sleeping tasks ARM: 8427/1: dma-mapping: add support for offset parameter in dma_mmap() ARM: 8426/1: dma-mapping: add missing range check in dma_mmap() ARM: remove user cmpxchg syscall ARM: 8438/1: Add unwinding to __clear_user_std() ARM: 8436/1: hw_breakpoint: remove unnecessary header ARM: 8434/2: Revert "7655/1: smp_twd: make twd_local_timer_of_register() no-op for nosmp" ARM: 8432/1: move VMALLOC_END from 0xff000000 to 0xff800000 ARM: 8430/1: use default ioremap alignment for SMP or LPAE ...
Diffstat (limited to 'lib')
-rw-r--r--lib/nmi_backtrace.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/nmi_backtrace.c b/lib/nmi_backtrace.c
index 88d3d32e5923..6019c53c669e 100644
--- a/lib/nmi_backtrace.c
+++ b/lib/nmi_backtrace.c
@@ -43,6 +43,12 @@ static void print_seq_line(struct nmi_seq_buf *s, int start, int end)
printk("%.*s", (end - start) + 1, buf);
}
+/*
+ * When raise() is called it will be is passed a pointer to the
+ * backtrace_mask. Architectures that call nmi_cpu_backtrace()
+ * directly from their raise() functions may rely on the mask
+ * they are passed being updated as a side effect of this call.
+ */
void nmi_trigger_all_cpu_backtrace(bool include_self,
void (*raise)(cpumask_t *mask))
{
@@ -149,7 +155,10 @@ bool nmi_cpu_backtrace(struct pt_regs *regs)
/* Replace printk to write into the NMI seq */
this_cpu_write(printk_func, nmi_vprintk);
pr_warn("NMI backtrace for cpu %d\n", cpu);
- show_regs(regs);
+ if (regs)
+ show_regs(regs);
+ else
+ dump_stack();
this_cpu_write(printk_func, printk_func_save);
cpumask_clear_cpu(cpu, to_cpumask(backtrace_mask));