Skip to contentSkip to conversation

irqchip/irq-bcm7038-l1: Guard uses of cpu_logical_map

PATCH Applied Florian Fainelli 2 participants 2 messages Jul 24, 2020 – Jul 25, 2020

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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")
---
 drivers/irqchip/irq-bcm7038-l1.c | 8 ++++++++
 1 file changed, 8 insertions(+)
drivers/irqchip/irq-bcm7038-l1.c +8 -0
index fd7c537fb42a..4127eeab10af 100644
@@ -327,7 +327,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++) {
@@ -347,7 +351,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++) {
Signature · 1 line
2.17.1
Applied
#1 lore raw
Quoted 2 lines · Florian Fainelli

cpu_logical_map is only defined for CONFIG_SMP builds, when we are in an UP configuration, the boot CPU is 0.

Applied to irq/irqchip-5.9, thanks!

[1/1] irqchip/irq-bcm7038-l1: Guard uses of cpu_logical_map

      commit: 29a190b6a2bd9ef4282e2f73e7abd76203740150

Cheers,

	M.
Signature · 1 line
Without deviation from the norm, progress is not possible.