Commit abdd7b91 authored by Marc Zyngier's avatar Marc Zyngier Committed by Russell King

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: default avatarWill Deacon <will.deacon@arm.com>
Tested-by: default avatarWill Deacon <will.deacon@arm.com>
Cc: Colin Cross <ccross@android.com>
Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 97371fa9
...@@ -526,6 +526,7 @@ static void __init gic_pm_init(struct gic_chip_data *gic) ...@@ -526,6 +526,7 @@ static void __init gic_pm_init(struct gic_chip_data *gic)
sizeof(u32)); sizeof(u32));
BUG_ON(!gic->saved_ppi_conf); BUG_ON(!gic->saved_ppi_conf);
if (gic == &gic_data[0])
cpu_pm_register_notifier(&gic_notifier_block); cpu_pm_register_notifier(&gic_notifier_block);
} }
#else #else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment