blob: 2f1510de03f150a1428bd03980eb5ab5354dde3c [file] [log] [blame]
From c17eb62ef5e57dbca9e3789f931edae8d0af6247 Mon Sep 17 00:00:00 2001
From: Marc Zyngier <Marc.Zyngier@arm.com>
Date: Fri, 25 Nov 2011 17:58:19 +0100
Subject: ARM: 7176/1: cpu_pm: register GIC PM notifier only once
When multiple GICs exist on a platform (RealView PB1176/11MP),
we must make sure the PM notifier block is only registered
once, otherwise we end up corrupting the PM notifier list.
The fix is to only register the notifier when initializing
the first GIC, as the power management functions seem
to iterate over all the registered GICs.
Tested on PB11MP and PB1176.
Reported-by: Will Deacon <will.deacon@arm.com>
Tested-by: Will Deacon <will.deacon@arm.com>
Cc: Colin Cross <ccross@android.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
(cherry picked from commit abdd7b91dab2f8b2e32e90e4b7e809ffb462a662)
Signed-off-by: Simon Horman <horms@verge.net.au>
---
arch/arm/common/gic.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/arm/common/gic.c b/arch/arm/common/gic.c
index f4b2864..432c879 100644
--- a/arch/arm/common/gic.c
+++ b/arch/arm/common/gic.c
@@ -551,7 +551,8 @@ static void __init gic_pm_init(struct gic_chip_data *gic)
sizeof(u32));
BUG_ON(!gic->saved_ppi_conf);
- cpu_pm_register_notifier(&gic_notifier_block);
+ if (gic == &gic_data[0])
+ cpu_pm_register_notifier(&gic_notifier_block);
}
#else
static void __init gic_pm_init(struct gic_chip_data *gic)
--
1.7.10.2.565.gbd578b5