Skip to content

Commit

Permalink
Revert "drivers: {GIC, GICv3}: Enable logging of interrupts that trig…
Browse files Browse the repository at this point in the history
…gered wakeup"

This reverts commits cdf2b97, 1e3e9f6.

Redundant:

[  356.028624] GICv3: gic_show_resume_irq: 111 triggered WLAN_CE_2
[  356.028660] pm_system_irq_wakeup: 111 triggered WLAN_CE_2

Signed-off-by: Danny Lin <danny@kdrag0n.dev>
Change-Id: I3dea6628f2e43f93d42b1ef4c550ac7956d49302
Signed-off-by: TogoFire <togofire@mailfence.com>
  • Loading branch information
kdrag0n authored and TogoFire committed May 26, 2023
1 parent 9b06c8c commit b2839bf
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 136 deletions.
6 changes: 0 additions & 6 deletions drivers/irqchip/irq-gic-common.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,6 @@ struct gic_quirk {
extern bool from_suspend;
extern struct irq_chip gic_arch_extn;

#ifdef CONFIG_QCOM_SHOW_RESUME_IRQ
extern int msm_show_resume_irq_mask;
#else
#define msm_show_resume_irq_mask 0
#endif

int gic_configure_irq(unsigned int irq, unsigned int type,
void __iomem *base, void (*sync_access)(void));
void gic_dist_config(void __iomem *base, int gic_irqs,
Expand Down
65 changes: 0 additions & 65 deletions drivers/irqchip/irq-gic-v3.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@
#include <asm/smp_plat.h>
#include <asm/virt.h>

#include <linux/syscore_ops.h>

#include "irq-gic-common.h"

#define MAX_IRQ 1020U /* Max number of SGI+PPI+SPI */
Expand Down Expand Up @@ -695,69 +693,6 @@ static int gic_irq_set_vcpu_affinity(struct irq_data *d, void *vcpu)
return 0;
}

#ifdef CONFIG_PM

static int gic_suspend(void)
{
return 0;
}

static void gic_show_resume_irq(struct gic_chip_data *gic)
{
unsigned int i;
u32 enabled;
u32 pending[32];
void __iomem *base = gic_data.dist_base;

if (!msm_show_resume_irq_mask)
return;

for (i = 0; i * 32 < gic->irq_nr; i++) {
enabled = readl_relaxed(base + GICD_ICENABLER + i * 4);
pending[i] = readl_relaxed(base + GICD_ISPENDR + i * 4);
pending[i] &= enabled;
}

for (i = find_first_bit((unsigned long *)pending, gic->irq_nr);
i < gic->irq_nr;
i = find_next_bit((unsigned long *)pending, gic->irq_nr, i+1)) {
unsigned int irq = irq_find_mapping(gic->domain, i);
struct irq_desc *desc = irq_to_desc(irq);
const char *name = "null";

if (desc == NULL)
name = "stray irq";
else if (desc->action && desc->action->name)
name = desc->action->name;

pr_warn("%s: %d triggered %s\n", __func__, irq, name);
}
}

static void gic_resume_one(struct gic_chip_data *gic)
{
gic_show_resume_irq(gic);
}

static void gic_resume(void)
{
gic_resume_one(&gic_data);
}

static struct syscore_ops gic_syscore_ops = {
.suspend = gic_suspend,
.resume = gic_resume,
};

static int __init gic_init_sys(void)
{
register_syscore_ops(&gic_syscore_ops);
return 0;
}
arch_initcall(gic_init_sys);

#endif

static u64 gic_mpidr_to_affinity(unsigned long mpidr)
{
u64 aff;
Expand Down
65 changes: 0 additions & 65 deletions drivers/irqchip/irq-gic.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
#include <asm/smp_plat.h>
#include <asm/virt.h>

#include <linux/syscore_ops.h>
#include "irq-gic-common.h"

#ifdef CONFIG_ARM64
Expand Down Expand Up @@ -1229,70 +1228,6 @@ static int __init __gic_init_bases(struct gic_chip_data *gic,
return ret;
}

#ifdef CONFIG_PM
static int gic_suspend(void)
{
return 0;
}

static void gic_show_resume_irq(struct gic_chip_data *gic)
{
unsigned int i;
u32 enabled;
u32 pending[32];
void __iomem *base = gic_data_dist_base(gic);

if (!msm_show_resume_irq_mask)
return;

for (i = 0; i * 32 < gic->gic_irqs; i++) {
enabled = readl_relaxed(base + GIC_DIST_ENABLE_CLEAR + i * 4);
pending[i] = readl_relaxed(base + GIC_DIST_PENDING_SET + i * 4);
pending[i] &= enabled;
}

for (i = find_first_bit((unsigned long *)pending, gic->gic_irqs);
i < gic->gic_irqs;
i = find_next_bit((unsigned long *)pending, gic->gic_irqs, i+1)) {
unsigned int irq = irq_find_mapping(gic->domain, i);
struct irq_desc *desc = irq_to_desc(irq);
const char *name = "null";

if (desc == NULL)
name = "stray irq";
else if (desc->action && desc->action->name)
name = desc->action->name;

pr_warn("%s: %d triggered %s\n", __func__, i, name);
}
}

static void gic_resume_one(struct gic_chip_data *gic)
{
gic_show_resume_irq(gic);
}

static void gic_resume(void)
{
int i;

for (i = 0; i < CONFIG_ARM_GIC_MAX_NR; i++)
gic_resume_one(&gic_data[i]);
}

static struct syscore_ops gic_syscore_ops = {
.suspend = gic_suspend,
.resume = gic_resume,
};

static int __init gic_init_sys(void)
{
register_syscore_ops(&gic_syscore_ops);
return 0;
}
arch_initcall(gic_init_sys);
#endif

void __init gic_init(unsigned int gic_nr, int irq_start,
void __iomem *dist_base, void __iomem *cpu_base)
{
Expand Down

0 comments on commit b2839bf

Please sign in to comment.