Skip to content

Commit abdd7b9

Browse files
Marc ZyngierRussell King
authored andcommitted
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 <[email protected]> Tested-by: Will Deacon <[email protected]> Cc: Colin Cross <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Signed-off-by: Russell King <[email protected]>
1 parent 97371fa commit abdd7b9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

arch/arm/common/gic.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,8 @@ static void __init gic_pm_init(struct gic_chip_data *gic)
526526
sizeof(u32));
527527
BUG_ON(!gic->saved_ppi_conf);
528528

529-
cpu_pm_register_notifier(&gic_notifier_block);
529+
if (gic == &gic_data[0])
530+
cpu_pm_register_notifier(&gic_notifier_block);
530531
}
531532
#else
532533
static void __init gic_pm_init(struct gic_chip_data *gic)

0 commit comments

Comments
 (0)