|
@@ -245,8 +245,10 @@ static void sysrq_handle_showallcpus(int key)
|
|
* architecture has no support for it:
|
|
* architecture has no support for it:
|
|
*/
|
|
*/
|
|
if (!trigger_all_cpu_backtrace()) {
|
|
if (!trigger_all_cpu_backtrace()) {
|
|
- struct pt_regs *regs = get_irq_regs();
|
|
|
|
|
|
+ struct pt_regs *regs = NULL;
|
|
|
|
|
|
|
|
+ if (in_irq())
|
|
|
|
+ regs = get_irq_regs();
|
|
if (regs) {
|
|
if (regs) {
|
|
pr_info("CPU%d:\n", smp_processor_id());
|
|
pr_info("CPU%d:\n", smp_processor_id());
|
|
show_regs(regs);
|
|
show_regs(regs);
|
|
@@ -265,7 +267,10 @@ static struct sysrq_key_op sysrq_showallcpus_op = {
|
|
|
|
|
|
static void sysrq_handle_showregs(int key)
|
|
static void sysrq_handle_showregs(int key)
|
|
{
|
|
{
|
|
- struct pt_regs *regs = get_irq_regs();
|
|
|
|
|
|
+ struct pt_regs *regs = NULL;
|
|
|
|
+
|
|
|
|
+ if (in_irq())
|
|
|
|
+ regs = get_irq_regs();
|
|
if (regs)
|
|
if (regs)
|
|
show_regs(regs);
|
|
show_regs(regs);
|
|
perf_event_print_debug();
|
|
perf_event_print_debug();
|