aboutsummaryrefslogtreecommitdiff
path: root/drivers/irqchip/irq-gic-v3.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/irqchip/irq-gic-v3.c')
-rw-r--r--drivers/irqchip/irq-gic-v3.c25
1 files changed, 25 insertions, 0 deletions
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;