Linux-MIPS Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] irqchip/irq-bcm7038-l1: Guard uses of cpu_logical_map
@ 2020-07-24 18:41 Florian Fainelli
  2020-07-25 14:23 ` Marc Zyngier
  0 siblings, 1 reply; 2+ messages in thread
From: Florian Fainelli @ 2020-07-24 18:41 UTC (permalink / raw)
  To: linux-kernel
  Cc: kernel test robot, Florian Fainelli, Thomas Gleixner,
	Jason Cooper, Marc Zyngier, Justin Chen,
	open list:BROADCOM BMIPS MIPS ARCHITECTURE,
	open list:BROADCOM BMIPS MIPS ARCHITECTURE

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

Reported-by: kernel test robot <lkp@intel.com>
Fixes: 6468fc18b006 ("irqchip/irq-bcm7038-l1: Add PM support")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 drivers/irqchip/irq-bcm7038-l1.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/irqchip/irq-bcm7038-l1.c b/drivers/irqchip/irq-bcm7038-l1.c
index fd7c537fb42a..4127eeab10af 100644
--- a/drivers/irqchip/irq-bcm7038-l1.c
+++ b/drivers/irqchip/irq-bcm7038-l1.c
@@ -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++) {
-- 
2.17.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] irqchip/irq-bcm7038-l1: Guard uses of cpu_logical_map
  2020-07-24 18:41 [PATCH] irqchip/irq-bcm7038-l1: Guard uses of cpu_logical_map Florian Fainelli
@ 2020-07-25 14:23 ` Marc Zyngier
  0 siblings, 0 replies; 2+ messages in thread
From: Marc Zyngier @ 2020-07-25 14:23 UTC (permalink / raw)
  To: Jason Cooper, Alexandre Torgue, Thomas Gleixner,
	Florian Fainelli, linux-kernel
  Cc: linux-gpio, marex, linux-stm32, linux-arm-kernel,
	kernel test robot, Justin Chen,
	open list:BROADCOM BMIPS MIPS ARCHITECTURE,
	open list:BROADCOM BMIPS MIPS ARCHITECTURE

On Fri, 24 Jul 2020 11:41:56 -0700, Florian Fainelli wrote:
> 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.
-- 
Without deviation from the norm, progress is not possible.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-24 18:41 [PATCH] irqchip/irq-bcm7038-l1: Guard uses of cpu_logical_map Florian Fainelli
2020-07-25 14:23 ` Marc Zyngier

Linux-MIPS Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-mips/0 linux-mips/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-mips linux-mips/ https://lore.kernel.org/linux-mips \
		linux-mips@vger.kernel.org
	public-inbox-index linux-mips

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-mips


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git