From: Marc Zyngier Date: Fri, 25 Nov 2011 16:58:19 +0000 (+0100) Subject: ARM: 7176/1: cpu_pm: register GIC PM notifier only once X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=abdd7b91dab2f8b2e32e90e4b7e809ffb462a662;p=mv-sheeva.git 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 Tested-by: Will Deacon Cc: Colin Cross Signed-off-by: Marc Zyngier Signed-off-by: Russell King --- diff --git a/arch/arm/common/gic.c b/arch/arm/common/gic.c index 0e6ae470c94..43240f315de 100644 --- a/arch/arm/common/gic.c +++ b/arch/arm/common/gic.c @@ -526,7 +526,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)