Skip to content

Commit

Permalink
irqchip/irq-bcm7038-l1: Guard uses of cpu_logical_map
Browse files Browse the repository at this point in the history
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 <lkp@intel.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20200724184157.29150-1-f.fainelli@gmail.com
  • Loading branch information
Florian Fainelli authored and Marc Zyngier committed Jul 27, 2020
1 parent 6d4c447 commit 9808357
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/irqchip/irq-bcm7038-l1.c
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,11 @@ static int bcm7038_l1_suspend(void)
u32 val;

/* Wakeup interrupt should only come from the boot cpu */
#ifdef CONFIG_SMP
boot_cpu = cpu_logical_map(0);
#else
boot_cpu = 0;
#endif

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

#ifdef CONFIG_SMP
boot_cpu = cpu_logical_map(0);
#else
boot_cpu = 0;
#endif

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

0 comments on commit 9808357

Please sign in to comment.