Skip to content

Commit 9808357

Browse files
ffainelliMarc Zyngier
authored andcommitted
irqchip/irq-bcm7038-l1: Guard uses of cpu_logical_map
cpu_logical_map is only defined for CONFIG_SMP builds, when we are in an UP configuration, the boot CPU is 0. Fixes: 6468fc1 ("irqchip/irq-bcm7038-l1: Add PM support") Reported-by: kernel test robot <[email protected]> Signed-off-by: Florian Fainelli <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 6d4c447 commit 9808357

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

drivers/irqchip/irq-bcm7038-l1.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,11 @@ static int bcm7038_l1_suspend(void)
330330
u32 val;
331331

332332
/* Wakeup interrupt should only come from the boot cpu */
333+
#ifdef CONFIG_SMP
333334
boot_cpu = cpu_logical_map(0);
335+
#else
336+
boot_cpu = 0;
337+
#endif
334338

335339
list_for_each_entry(intc, &bcm7038_l1_intcs_list, list) {
336340
for (word = 0; word < intc->n_words; word++) {
@@ -350,7 +354,11 @@ static void bcm7038_l1_resume(void)
350354
struct bcm7038_l1_chip *intc;
351355
int boot_cpu, word;
352356

357+
#ifdef CONFIG_SMP
353358
boot_cpu = cpu_logical_map(0);
359+
#else
360+
boot_cpu = 0;
361+
#endif
354362

355363
list_for_each_entry(intc, &bcm7038_l1_intcs_list, list) {
356364
for (word = 0; word < intc->n_words; word++) {

0 commit comments

Comments
 (0)