aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/arm64/include/asm/arch_gicv3.h3
-rw-r--r--drivers/irqchip/irq-gic-v3.c25
-rw-r--r--lib/nmi_backtrace.c12
3 files changed, 40 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/arch_gicv3.h b/arch/arm64/include/asm/arch_gicv3.h
index ee0d800aa1c7..46b602f6b803 100644
--- a/arch/arm64/include/asm/arch_gicv3.h
+++ b/arch/arm64/include/asm/arch_gicv3.h
@@ -28,7 +28,10 @@
#define ICC_CTLR_EL1 sys_reg(3, 0, 12, 12, 4)
#define ICC_SRE_EL1 sys_reg(3, 0, 12, 12, 5)
#define ICC_GRPEN1_EL1 sys_reg(3, 0, 12, 12, 7)
+#define ICC_BPR0_EL1 sys_reg(3, 0, 12, 8, 3)
#define ICC_BPR1_EL1 sys_reg(3, 0, 12, 12, 3)
+#define ICC_HPPIR1_EL1 sys_reg(3, 0, 12, 12, 2)
+#define ICC_RPR_EL1 sys_reg(3, 0, 12, 11, 3)
#define ICC_SRE_EL2 sys_reg(3, 4, 12, 9, 5)
diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c
index 7e9dc1c39f1f..90d2d81fc7e7 100644
--- a/drivers/irqchip/irq-gic-v3.c
+++ b/drivers/irqchip/irq-gic-v3.c
@@ -466,6 +466,31 @@ static asmlinkage void __exception_irq_entry gic_handle_irq(struct pt_regs *regs
} while (irqnr != ICC_IAR1_EL1_SPURIOUS);
}
+static void gic_dump_cpuif(void)
+{
+ u64 val;
+
+ asm volatile("mrs %0, daif" : "=r" (val));
+ pr_info("PSR: %-30s %16llx\n", "", val);
+
+#define D(x) \
+ do { \
+ asm volatile("mrs_s %0, " __stringify(x) : "=r"(val)); \
+ pr_info("GIC: %-30s %16llx (%llu)\n", #x, val, val); \
+ } while (0)
+
+ D(ICC_CTLR_EL1);
+ D(ICC_BPR1_EL1);
+ D(ICC_HPPIR1_EL1);
+ D(ICC_RPR_EL1);
+ D(ICC_PMR_EL1);
+}
+
+void gic_dump_regs(void)
+{
+ gic_dump_cpuif();
+}
+
static void __init gic_dist_init(void)
{
unsigned int i;
diff --git a/lib/nmi_backtrace.c b/lib/nmi_backtrace.c
index f338f867a9a5..1efd7a77e552 100644
--- a/lib/nmi_backtrace.c
+++ b/lib/nmi_backtrace.c
@@ -54,6 +54,7 @@ void nmi_trigger_all_cpu_backtrace(bool include_self,
{
struct nmi_seq_buf *s;
int i, cpu, this_cpu = get_cpu();
+ bool gic_dump = true;
if (test_and_set_bit(0, &backtrace_flag)) {
/*
@@ -119,6 +120,17 @@ void nmi_trigger_all_cpu_backtrace(bool include_self,
}
}
+ /* Ensure debug info is easy to find. */
+ for_each_cpu(cpu, to_cpumask(backtrace_mask)) {
+
+ pr_err("No reply from cpu %d\n", cpu);
+ }
+
+ {
+ void gic_dump_regs(void);
+ gic_dump_regs();
+ }
+
clear_bit(0, &backtrace_flag);
smp_mb__after_atomic();
put_cpu();