* [PATCH -next] irqchip/gic-v3-its: protect reference to cpus_booted_once_mask
@ 2022-01-22 23:40 Randy Dunlap
2022-01-23 8:42 ` Marc Zyngier
0 siblings, 1 reply; 2+ messages in thread
From: Randy Dunlap @ 2022-01-22 23:40 UTC (permalink / raw)
To: linux-kernel
Cc: Randy Dunlap, kernel test robot, Valentin Schneider,
Marc Zyngier, Thomas Gleixner
When CONFIG_SMP is not set/enabled, the reference in irq-gic-v3-its.c
to 'cpus_booted_once_mask' causes a build error. Fix this by
first checking for !CONFIG_SMP in the 'if' test.
Fixes this build error:
arm-linux-gnueabi-ld: drivers/irqchip/irq-gic-v3-its.o: in function `its_cpu_memreserve_lpi':
irq-gic-v3-its.c:(.text+0x45d0): undefined reference to `cpus_booted_once_mask'
Fixes: 835f442fdbce3 ("irqchip/gic-v3-its: Limit memreserve cpuhp state lifetime")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: kernel test robot <lkp@intel.com>
Cc: Valentin Schneider <valentin.schneider@arm.com>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
---
drivers/irqchip/irq-gic-v3-its.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- linux-next-20220121.orig/drivers/irqchip/irq-gic-v3-its.c
+++ linux-next-20220121/drivers/irqchip/irq-gic-v3-its.c
@@ -5241,7 +5241,8 @@ static int its_cpu_memreserve_lpi(unsign
out:
/* Last CPU being brought up gets to issue the cleanup */
- if (cpumask_equal(&cpus_booted_once_mask, cpu_possible_mask))
+ if (!IS_ENABLED(CONFIG_SMP) ||
+ cpumask_equal(&cpus_booted_once_mask, cpu_possible_mask))
schedule_work(&rdist_memreserve_cpuhp_cleanup_work);
gic_data_rdist()->flags |= RD_LOCAL_MEMRESERVE_DONE;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH -next] irqchip/gic-v3-its: protect reference to cpus_booted_once_mask
2022-01-22 23:40 [PATCH -next] irqchip/gic-v3-its: protect reference to cpus_booted_once_mask Randy Dunlap
@ 2022-01-23 8:42 ` Marc Zyngier
0 siblings, 0 replies; 2+ messages in thread
From: Marc Zyngier @ 2022-01-23 8:42 UTC (permalink / raw)
To: Randy Dunlap
Cc: linux-kernel, kernel test robot, Valentin Schneider, Thomas Gleixner
On 2022-01-22 23:40, Randy Dunlap wrote:
> When CONFIG_SMP is not set/enabled, the reference in irq-gic-v3-its.c
> to 'cpus_booted_once_mask' causes a build error. Fix this by
> first checking for !CONFIG_SMP in the 'if' test.
>
> Fixes this build error:
>
> arm-linux-gnueabi-ld: drivers/irqchip/irq-gic-v3-its.o: in function
> `its_cpu_memreserve_lpi':
> irq-gic-v3-its.c:(.text+0x45d0): undefined reference to
> `cpus_booted_once_mask'
>
> Fixes: 835f442fdbce3 ("irqchip/gic-v3-its: Limit memreserve cpuhp
> state lifetime")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Reported-by: kernel test robot <lkp@intel.com>
> Cc: Valentin Schneider <valentin.schneider@arm.com>
> Cc: Marc Zyngier <maz@kernel.org>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> ---
> drivers/irqchip/irq-gic-v3-its.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> --- linux-next-20220121.orig/drivers/irqchip/irq-gic-v3-its.c
> +++ linux-next-20220121/drivers/irqchip/irq-gic-v3-its.c
> @@ -5241,7 +5241,8 @@ static int its_cpu_memreserve_lpi(unsign
>
> out:
> /* Last CPU being brought up gets to issue the cleanup */
> - if (cpumask_equal(&cpus_booted_once_mask, cpu_possible_mask))
> + if (!IS_ENABLED(CONFIG_SMP) ||
> + cpumask_equal(&cpus_booted_once_mask, cpu_possible_mask))
> schedule_work(&rdist_memreserve_cpuhp_cleanup_work);
>
> gic_data_rdist()->flags |= RD_LOCAL_MEMRESERVE_DONE;
This exact patch[1] has been queued yesterday.
Thanks,
M.
[1] https://lore.kernel.org/r/20220122151614.133766-1-ardb@kernel.org
--
Jazz is not dead. It just smells funny...
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-01-23 8:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-22 23:40 [PATCH -next] irqchip/gic-v3-its: protect reference to cpus_booted_once_mask Randy Dunlap
2022-01-23 8:42 ` Marc Zyngier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®