#include <linux/delay.h>
#include <linux/processor.h>
#include <linux/smp.h>
+#include <linux/sys_info.h>
#include <asm/interrupt.h>
#include <asm/paca.h>
pr_emerg("CPU %d TB:%lld, last SMP heartbeat TB:%lld (%lldms ago)\n",
cpu, tb, last_reset, tb_to_ns(tb - last_reset) / 1000000);
- if (!sysctl_hardlockup_all_cpu_backtrace) {
+ if (sysctl_hardlockup_all_cpu_backtrace ||
+ (hardlockup_si_mask & SYS_INFO_ALL_BT)) {
+ trigger_allbutcpu_cpu_backtrace(cpu);
+ cpumask_clear(&wd_smp_cpus_ipi);
+ } else {
/*
* Try to trigger the stuck CPUs, unless we are going to
* get a backtrace on all of them anyway.
smp_send_nmi_ipi(c, wd_lockup_ipi, 1000000);
__cpumask_clear_cpu(c, &wd_smp_cpus_ipi);
}
- } else {
- trigger_allbutcpu_cpu_backtrace(cpu);
- cpumask_clear(&wd_smp_cpus_ipi);
}
+ sys_info(hardlockup_si_mask & ~SYS_INFO_ALL_BT);
if (hardlockup_panic)
nmi_panic(NULL, "Hard LOCKUP");
xchg(&__wd_nmi_output, 1); // see wd_lockup_ipi
- if (sysctl_hardlockup_all_cpu_backtrace)
+ if (sysctl_hardlockup_all_cpu_backtrace ||
+ (hardlockup_si_mask & SYS_INFO_ALL_BT))
trigger_allbutcpu_cpu_backtrace(cpu);
+ sys_info(hardlockup_si_mask & ~SYS_INFO_ALL_BT);
if (hardlockup_panic)
nmi_panic(regs, "Hard LOCKUP");
#if defined(CONFIG_HARDLOCKUP_DETECTOR)
extern void hardlockup_detector_disable(void);
extern unsigned int hardlockup_panic;
+extern unsigned long hardlockup_si_mask;
#else
static inline void hardlockup_detector_disable(void) {}
#endif
* hard lockup is detected, it could be task, memory, lock etc.
* Refer include/linux/sys_info.h for detailed bit definition.
*/
-static unsigned long hardlockup_si_mask;
+unsigned long hardlockup_si_mask;
#ifdef CONFIG_SYSFS