linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc/pseries: Fix build error when NUMA=n
@ 2021-08-16  4:10 Michael Ellerman
  2021-08-27 13:15 ` Michael Ellerman
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Ellerman @ 2021-08-16  4:10 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: ldufour

As reported by lkp, if NUMA=n we see a build error:

   arch/powerpc/platforms/pseries/hotplug-cpu.c: In function 'pseries_cpu_hotplug_init':
   arch/powerpc/platforms/pseries/hotplug-cpu.c:1022:8: error: 'node_to_cpumask_map' undeclared
    1022 |        node_to_cpumask_map[node]);

Use cpumask_of_node() which has an empty stub for NUMA=n, and when
NUMA=y does a lookup from node_to_cpumask_map[].

Fixes: bd1dd4c5f528 ("powerpc/pseries: Prevent free CPU ids being reused on another node")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
 arch/powerpc/platforms/pseries/hotplug-cpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/platforms/pseries/hotplug-cpu.c b/arch/powerpc/platforms/pseries/hotplug-cpu.c
index 1ef40ef699a6..d646c22e94ab 100644
--- a/arch/powerpc/platforms/pseries/hotplug-cpu.c
+++ b/arch/powerpc/platforms/pseries/hotplug-cpu.c
@@ -1021,7 +1021,7 @@ static int __init pseries_cpu_hotplug_init(void)
 			/* Record ids of CPU added at boot time */
 			cpumask_or(node_recorded_ids_map[node],
 				   node_recorded_ids_map[node],
-				   node_to_cpumask_map[node]);
+				   cpumask_of_node(node));
 		}
 
 		of_reconfig_notifier_register(&pseries_smp_nb);
-- 
2.25.1


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

* Re: [PATCH] powerpc/pseries: Fix build error when NUMA=n
  2021-08-16  4:10 [PATCH] powerpc/pseries: Fix build error when NUMA=n Michael Ellerman
@ 2021-08-27 13:15 ` Michael Ellerman
  2021-08-27 13:24   ` Laurent Dufour
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Ellerman @ 2021-08-27 13:15 UTC (permalink / raw)
  To: linuxppc-dev, Michael Ellerman; +Cc: ldufour

On Mon, 16 Aug 2021 14:10:32 +1000, Michael Ellerman wrote:
> As reported by lkp, if NUMA=n we see a build error:
> 
>    arch/powerpc/platforms/pseries/hotplug-cpu.c: In function 'pseries_cpu_hotplug_init':
>    arch/powerpc/platforms/pseries/hotplug-cpu.c:1022:8: error: 'node_to_cpumask_map' undeclared
>     1022 |        node_to_cpumask_map[node]);
> 
> Use cpumask_of_node() which has an empty stub for NUMA=n, and when
> NUMA=y does a lookup from node_to_cpumask_map[].
> 
> [...]

Applied to powerpc/next.

[1/1] powerpc/pseries: Fix build error when NUMA=n
      https://git.kernel.org/powerpc/c/8b893ef190b0c440877de04f767efca4bf4d6af8

cheers

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

* Re: [PATCH] powerpc/pseries: Fix build error when NUMA=n
  2021-08-27 13:15 ` Michael Ellerman
@ 2021-08-27 13:24   ` Laurent Dufour
  0 siblings, 0 replies; 3+ messages in thread
From: Laurent Dufour @ 2021-08-27 13:24 UTC (permalink / raw)
  To: Michael Ellerman, linuxppc-dev, Michael Ellerman

Le 27/08/2021 à 15:15, Michael Ellerman a écrit :
> On Mon, 16 Aug 2021 14:10:32 +1000, Michael Ellerman wrote:
>> As reported by lkp, if NUMA=n we see a build error:
>>
>>     arch/powerpc/platforms/pseries/hotplug-cpu.c: In function 'pseries_cpu_hotplug_init':
>>     arch/powerpc/platforms/pseries/hotplug-cpu.c:1022:8: error: 'node_to_cpumask_map' undeclared
>>      1022 |        node_to_cpumask_map[node]);
>>
>> Use cpumask_of_node() which has an empty stub for NUMA=n, and when
>> NUMA=y does a lookup from node_to_cpumask_map[].
>>
>> [...]
> 
> Applied to powerpc/next.
> 
> [1/1] powerpc/pseries: Fix build error when NUMA=n
>        https://git.kernel.org/powerpc/c/8b893ef190b0c440877de04f767efca4bf4d6af8
> 
> cheers
> 

Thanks, Michael, for fixing my bugs !

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

end of thread, other threads:[~2021-08-27 13:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-16  4:10 [PATCH] powerpc/pseries: Fix build error when NUMA=n Michael Ellerman
2021-08-27 13:15 ` Michael Ellerman
2021-08-27 13:24   ` Laurent Dufour

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).