>From 3cb711f3123deed30720a1beffd6f67734383209 Mon Sep 17 00:00:00 2001 From: Marc Zyngier Date: Thu, 24 Nov 2011 16:30:10 +0000 Subject: [PATCH] ARM: cpu_pm: register GIC PM notifier only once When multiple GICs exist on a platform (RealView 1176, 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. Reported-by: Will Deacon Signed-off-by: Marc Zyngier --- arch/arm/common/gic.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/arch/arm/common/gic.c b/arch/arm/common/gic.c index 0e6ae47..43240f3 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) -- 1.7.0.4