Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4d0e80c4 authored by Archana Sathyakumar's avatar Archana Sathyakumar Committed by Matt Wagantall
Browse files

platsmp: Print the pending irqs in case of hotplug failure



Print the enabled and pending interrupt to help investigate cpu
hotplug failure.

CRs-fixed: 675717
Change-Id: Ib85302ed84ed6e6bdb6bfac593021da9eb790330
Signed-off-by: default avatarArchana Sathyakumar <asathyak@codeaurora.org>
parent 7f69ed3b
Loading
Loading
Loading
Loading
+26 −0
Original line number Original line Diff line number Diff line
/*
/*
 *  Copyright (C) 2002 ARM Limited, All Rights Reserved.
 *  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
 * 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
 * it under the terms of the GNU General Public License version 2 as
@@ -218,6 +219,31 @@ static int gic_suspend(void)


extern int msm_show_resume_irq_mask;
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)
static void gic_show_resume_irq(struct gic_chip_data *gic)
{
{
	unsigned int i;
	unsigned int i;
+2 −0
Original line number Original line Diff line number Diff line
@@ -2,6 +2,7 @@
 *  include/linux/irqchip/arm-gic.h
 *  include/linux/irqchip/arm-gic.h
 *
 *
 *  Copyright (C) 2002 ARM Limited, All Rights Reserved.
 *  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
 * 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
 * it under the terms of the GNU General Public License version 2 as
@@ -110,6 +111,7 @@ void gic_send_sgi(unsigned int cpu_id, unsigned int irq);
int gic_get_cpu_id(unsigned int cpu);
int gic_get_cpu_id(unsigned int cpu);
void gic_migrate_target(unsigned int new_cpu_id);
void gic_migrate_target(unsigned int new_cpu_id);
unsigned long gic_get_sgir_physaddr(void);
unsigned long gic_get_sgir_physaddr(void);
void gic_show_pending_irq(void);


extern const struct irq_domain_ops *gic_routable_irq_domain_ops;
extern const struct irq_domain_ops *gic_routable_irq_domain_ops;
static inline void __init register_routable_domain_ops
static inline void __init register_routable_domain_ops