Loading arch/arm/mach-msm/hotplug.c +4 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ #include <linux/msm_rtb.h> #include <soc/qcom/spm.h> #include <soc/qcom/pm.h> #include <linux/irqchip/arm-gic.h> #include <asm/smp_plat.h> #include <asm/vfp.h> Loading Loading @@ -53,7 +54,10 @@ static inline void platform_do_lowpower(unsigned int cpu, int *spurious) * The trouble is, letting people know about this is not really * possible, since we are currently running incoherently, and * therefore cannot safely call printk() or anything else * Read the pending interrupts to understand why we woke up */ local_irq_disable(); gic_show_pending_irq(); (*spurious)++; } } Loading drivers/irqchip/irq-gic.c +26 −0 Original line number Diff line number Diff line Loading @@ -2,6 +2,7 @@ * linux/arch/arm/common/gic.c * * Copyright (C) 2002 ARM Limited, All Rights Reserved. * Copyright (c) 2014, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as Loading Loading @@ -241,6 +242,31 @@ static int gic_suspend(void) extern int msm_show_resume_irq_mask; /* * gic_show_pending_irq - Shows the pending interrupts * Note: Interrupts should be disabled on the cpu from which * this is called to get accurate list of pending interrupts. */ void gic_show_pending_irq(void) { void __iomem *base; unsigned long pending[32]; u32 enabled; unsigned int i, j; for (i = 0; i < MAX_GIC_NR; i++) { base = gic_data_dist_base(&gic_data[i]); for (j = 0; j * 32 < gic_data[i].gic_irqs; j++) { enabled = readl_relaxed(base + GIC_DIST_ENABLE_SET + j * 4); pending[j] = readl_relaxed(base + GIC_DIST_PENDING_SET + j * 4); pending[j] &= enabled; pr_err("Pending irqs[%d] %lx\n", j, pending[j]); } } } static void gic_show_resume_irq(struct gic_chip_data *gic) { unsigned int i; Loading include/linux/irqchip/arm-gic.h +2 −1 Original line number Diff line number Diff line Loading @@ -2,6 +2,7 @@ * include/linux/irqchip/arm-gic.h * * Copyright (C) 2002 ARM Limited, All Rights Reserved. * Copyright (c) 2014, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as Loading Loading @@ -81,6 +82,6 @@ static inline void gic_init(unsigned int nr, int start, bool gic_is_spi_pending(unsigned int irq); void gic_clear_spi_pending(unsigned int irq); void gic_show_pending_irq(void); #endif /* __ASSEMBLY */ #endif Loading
arch/arm/mach-msm/hotplug.c +4 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ #include <linux/msm_rtb.h> #include <soc/qcom/spm.h> #include <soc/qcom/pm.h> #include <linux/irqchip/arm-gic.h> #include <asm/smp_plat.h> #include <asm/vfp.h> Loading Loading @@ -53,7 +54,10 @@ static inline void platform_do_lowpower(unsigned int cpu, int *spurious) * The trouble is, letting people know about this is not really * possible, since we are currently running incoherently, and * therefore cannot safely call printk() or anything else * Read the pending interrupts to understand why we woke up */ local_irq_disable(); gic_show_pending_irq(); (*spurious)++; } } Loading
drivers/irqchip/irq-gic.c +26 −0 Original line number Diff line number Diff line Loading @@ -2,6 +2,7 @@ * linux/arch/arm/common/gic.c * * Copyright (C) 2002 ARM Limited, All Rights Reserved. * Copyright (c) 2014, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as Loading Loading @@ -241,6 +242,31 @@ static int gic_suspend(void) extern int msm_show_resume_irq_mask; /* * gic_show_pending_irq - Shows the pending interrupts * Note: Interrupts should be disabled on the cpu from which * this is called to get accurate list of pending interrupts. */ void gic_show_pending_irq(void) { void __iomem *base; unsigned long pending[32]; u32 enabled; unsigned int i, j; for (i = 0; i < MAX_GIC_NR; i++) { base = gic_data_dist_base(&gic_data[i]); for (j = 0; j * 32 < gic_data[i].gic_irqs; j++) { enabled = readl_relaxed(base + GIC_DIST_ENABLE_SET + j * 4); pending[j] = readl_relaxed(base + GIC_DIST_PENDING_SET + j * 4); pending[j] &= enabled; pr_err("Pending irqs[%d] %lx\n", j, pending[j]); } } } static void gic_show_resume_irq(struct gic_chip_data *gic) { unsigned int i; Loading
include/linux/irqchip/arm-gic.h +2 −1 Original line number Diff line number Diff line Loading @@ -2,6 +2,7 @@ * include/linux/irqchip/arm-gic.h * * Copyright (C) 2002 ARM Limited, All Rights Reserved. * Copyright (c) 2014, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as Loading Loading @@ -81,6 +82,6 @@ static inline void gic_init(unsigned int nr, int start, bool gic_is_spi_pending(unsigned int irq); void gic_clear_spi_pending(unsigned int irq); void gic_show_pending_irq(void); #endif /* __ASSEMBLY */ #endif