Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: 6468fc18b006 ("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

authored by

Florian Fainelli and committed by
Marc Zyngier
9808357f 6d4c4479

+8
+8
drivers/irqchip/irq-bcm7038-l1.c
··· 330 330 u32 val; 331 331 332 332 /* Wakeup interrupt should only come from the boot cpu */ 333 + #ifdef CONFIG_SMP 333 334 boot_cpu = cpu_logical_map(0); 335 + #else 336 + boot_cpu = 0; 337 + #endif 334 338 335 339 list_for_each_entry(intc, &bcm7038_l1_intcs_list, list) { 336 340 for (word = 0; word < intc->n_words; word++) { ··· 354 350 struct bcm7038_l1_chip *intc; 355 351 int boot_cpu, word; 356 352 353 + #ifdef CONFIG_SMP 357 354 boot_cpu = cpu_logical_map(0); 355 + #else 356 + boot_cpu = 0; 357 + #endif 358 358 359 359 list_for_each_entry(intc, &bcm7038_l1_intcs_list, list) { 360 360 for (word = 0; word < intc->n_words; word++) {