stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] MIPS: SGI-IP27: always enable NUMA in Kconfig
@ 2020-08-05 12:51 Mike Rapoport
  2020-08-06  0:43 ` Joshua Kinard
  2020-08-06  7:41 ` Thomas Bogendoerfer
  0 siblings, 2 replies; 3+ messages in thread
From: Mike Rapoport @ 2020-08-05 12:51 UTC (permalink / raw)
  To: Thomas Bogendoerfer
  Cc: Paul Burton, Joshua Kinard, Jiaxun Yang, Mike Rapoport,
	linux-mips, linux-kernel, Mike Rapoport, kernel test robot,
	stable

From: Mike Rapoport <rppt@linux.ibm.com>

When a configuration has NUMA disabled and SGI_IP27 enabled, the build
fails:

  CC      kernel/bounds.s
  CC      arch/mips/kernel/asm-offsets.s
In file included from arch/mips/include/asm/topology.h:11,
                 from include/linux/topology.h:36,
                 from include/linux/gfp.h:9,
                 from include/linux/slab.h:15,
                 from include/linux/crypto.h:19,
                 from include/crypto/hash.h:11,
                 from include/linux/uio.h:10,
                 from include/linux/socket.h:8,
                 from include/linux/compat.h:15,
                 from arch/mips/kernel/asm-offsets.c:12:
include/linux/topology.h: In function 'numa_node_id':
arch/mips/include/asm/mach-ip27/topology.h:16:27: error: implicit declaration of function 'cputonasid'; did you mean 'cpu_vpe_id'? [-Werror=implicit-function-declaration]
 #define cpu_to_node(cpu) (cputonasid(cpu))
                           ^~~~~~~~~~
include/linux/topology.h:119:9: note: in expansion of macro 'cpu_to_node'
  return cpu_to_node(raw_smp_processor_id());
         ^~~~~~~~~~~
include/linux/topology.h: In function 'cpu_cpu_mask':
arch/mips/include/asm/mach-ip27/topology.h:19:7: error: implicit declaration of function 'hub_data' [-Werror=implicit-function-declaration]
      &hub_data(node)->h_cpus)
       ^~~~~~~~
include/linux/topology.h:210:9: note: in expansion of macro 'cpumask_of_node'
  return cpumask_of_node(cpu_to_node(cpu));
         ^~~~~~~~~~~~~~~
arch/mips/include/asm/mach-ip27/topology.h:19:21: error: invalid type argument of '->' (have 'int')
      &hub_data(node)->h_cpus)
                     ^~
include/linux/topology.h:210:9: note: in expansion of macro 'cpumask_of_node'
  return cpumask_of_node(cpu_to_node(cpu));
         ^~~~~~~~~~~~~~~

Before switch from discontigmem to sparsemem, there always was
CONFIG_NEED_MULTIPLE_NODES=y because it was selected by DISCONTIGMEM.
Without DISCONTIGMEM it is possible to have SPARSEMEM without NUMA for
SGI_IP27 and as many things there rely on custom node definition, the
build breaks.

As Thomas noted "... there are right now too many places in IP27 code,
which assumes NUMA enabled", the simplest solution would be to always
enable NUMA for SGI-IP27 builds.

Reported-by: kernel test robot <lkp@intel.com>
Fixes: 397dc00e249e ("mips: sgi-ip27: switch from DISCONTIGMEM to SPARSEMEM")
Cc: stable@vger.kernel.org
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
---
 arch/mips/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 6fee1a133e9d..a7e40bb1e5bc 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -678,6 +678,7 @@ config SGI_IP27
 	select SYS_SUPPORTS_NUMA
 	select SYS_SUPPORTS_SMP
 	select MIPS_L1_CACHE_SHIFT_7
+	select NUMA
 	help
 	  This are the SGI Origin 200, Origin 2000 and Onyx 2 Graphics
 	  workstations.  To compile a Linux kernel that runs on these, say Y
-- 
2.26.2


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

* Re: [PATCH] MIPS: SGI-IP27: always enable NUMA in Kconfig
  2020-08-05 12:51 [PATCH] MIPS: SGI-IP27: always enable NUMA in Kconfig Mike Rapoport
@ 2020-08-06  0:43 ` Joshua Kinard
  2020-08-06  7:41 ` Thomas Bogendoerfer
  1 sibling, 0 replies; 3+ messages in thread
From: Joshua Kinard @ 2020-08-06  0:43 UTC (permalink / raw)
  To: Mike Rapoport, Thomas Bogendoerfer
  Cc: Paul Burton, Jiaxun Yang, linux-mips, linux-kernel,
	Mike Rapoport, kernel test robot, stable

On 8/5/2020 08:51, Mike Rapoport wrote:
> From: Mike Rapoport <rppt@linux.ibm.com>
> 
> When a configuration has NUMA disabled and SGI_IP27 enabled, the build
> fails:
> 
>   CC      kernel/bounds.s
>   CC      arch/mips/kernel/asm-offsets.s
> In file included from arch/mips/include/asm/topology.h:11,
>                  from include/linux/topology.h:36,
>                  from include/linux/gfp.h:9,
>                  from include/linux/slab.h:15,
>                  from include/linux/crypto.h:19,
>                  from include/crypto/hash.h:11,
>                  from include/linux/uio.h:10,
>                  from include/linux/socket.h:8,
>                  from include/linux/compat.h:15,
>                  from arch/mips/kernel/asm-offsets.c:12:
> include/linux/topology.h: In function 'numa_node_id':
> arch/mips/include/asm/mach-ip27/topology.h:16:27: error: implicit declaration of function 'cputonasid'; did you mean 'cpu_vpe_id'? [-Werror=implicit-function-declaration]
>  #define cpu_to_node(cpu) (cputonasid(cpu))
>                            ^~~~~~~~~~
> include/linux/topology.h:119:9: note: in expansion of macro 'cpu_to_node'
>   return cpu_to_node(raw_smp_processor_id());
>          ^~~~~~~~~~~
> include/linux/topology.h: In function 'cpu_cpu_mask':
> arch/mips/include/asm/mach-ip27/topology.h:19:7: error: implicit declaration of function 'hub_data' [-Werror=implicit-function-declaration]
>       &hub_data(node)->h_cpus)
>        ^~~~~~~~
> include/linux/topology.h:210:9: note: in expansion of macro 'cpumask_of_node'
>   return cpumask_of_node(cpu_to_node(cpu));
>          ^~~~~~~~~~~~~~~
> arch/mips/include/asm/mach-ip27/topology.h:19:21: error: invalid type argument of '->' (have 'int')
>       &hub_data(node)->h_cpus)
>                      ^~
> include/linux/topology.h:210:9: note: in expansion of macro 'cpumask_of_node'
>   return cpumask_of_node(cpu_to_node(cpu));
>          ^~~~~~~~~~~~~~~
> 
> Before switch from discontigmem to sparsemem, there always was
> CONFIG_NEED_MULTIPLE_NODES=y because it was selected by DISCONTIGMEM.
> Without DISCONTIGMEM it is possible to have SPARSEMEM without NUMA for
> SGI_IP27 and as many things there rely on custom node definition, the
> build breaks.
> 
> As Thomas noted "... there are right now too many places in IP27 code,
> which assumes NUMA enabled", the simplest solution would be to always
> enable NUMA for SGI-IP27 builds.
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Fixes: 397dc00e249e ("mips: sgi-ip27: switch from DISCONTIGMEM to SPARSEMEM")
> Cc: stable@vger.kernel.org
> Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
> ---
>  arch/mips/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
> index 6fee1a133e9d..a7e40bb1e5bc 100644
> --- a/arch/mips/Kconfig
> +++ b/arch/mips/Kconfig
> @@ -678,6 +678,7 @@ config SGI_IP27
>  	select SYS_SUPPORTS_NUMA
>  	select SYS_SUPPORTS_SMP
>  	select MIPS_L1_CACHE_SHIFT_7
> +	select NUMA
>  	help
>  	  This are the SGI Origin 200, Origin 2000 and Onyx 2 Graphics
>  	  workstations.  To compile a Linux kernel that runs on these, say Y
> 

Reviewed-by: Joshua Kinard <kumba@gentoo.org>

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

* Re: [PATCH] MIPS: SGI-IP27: always enable NUMA in Kconfig
  2020-08-05 12:51 [PATCH] MIPS: SGI-IP27: always enable NUMA in Kconfig Mike Rapoport
  2020-08-06  0:43 ` Joshua Kinard
@ 2020-08-06  7:41 ` Thomas Bogendoerfer
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Bogendoerfer @ 2020-08-06  7:41 UTC (permalink / raw)
  To: Mike Rapoport
  Cc: Paul Burton, Joshua Kinard, Jiaxun Yang, linux-mips,
	linux-kernel, Mike Rapoport, kernel test robot, stable

On Wed, Aug 05, 2020 at 03:51:41PM +0300, Mike Rapoport wrote:
> From: Mike Rapoport <rppt@linux.ibm.com>
> 
> When a configuration has NUMA disabled and SGI_IP27 enabled, the build
> fails:
> 
>   CC      kernel/bounds.s
>   CC      arch/mips/kernel/asm-offsets.s
> In file included from arch/mips/include/asm/topology.h:11,
>                  from include/linux/topology.h:36,
>                  from include/linux/gfp.h:9,
>                  from include/linux/slab.h:15,
>                  from include/linux/crypto.h:19,
>                  from include/crypto/hash.h:11,
>                  from include/linux/uio.h:10,
>                  from include/linux/socket.h:8,
>                  from include/linux/compat.h:15,
>                  from arch/mips/kernel/asm-offsets.c:12:
> include/linux/topology.h: In function 'numa_node_id':
> arch/mips/include/asm/mach-ip27/topology.h:16:27: error: implicit declaration of function 'cputonasid'; did you mean 'cpu_vpe_id'? [-Werror=implicit-function-declaration]
>  #define cpu_to_node(cpu) (cputonasid(cpu))
>                            ^~~~~~~~~~
> include/linux/topology.h:119:9: note: in expansion of macro 'cpu_to_node'
>   return cpu_to_node(raw_smp_processor_id());
>          ^~~~~~~~~~~
> include/linux/topology.h: In function 'cpu_cpu_mask':
> arch/mips/include/asm/mach-ip27/topology.h:19:7: error: implicit declaration of function 'hub_data' [-Werror=implicit-function-declaration]
>       &hub_data(node)->h_cpus)
>        ^~~~~~~~
> include/linux/topology.h:210:9: note: in expansion of macro 'cpumask_of_node'
>   return cpumask_of_node(cpu_to_node(cpu));
>          ^~~~~~~~~~~~~~~
> arch/mips/include/asm/mach-ip27/topology.h:19:21: error: invalid type argument of '->' (have 'int')
>       &hub_data(node)->h_cpus)
>                      ^~
> include/linux/topology.h:210:9: note: in expansion of macro 'cpumask_of_node'
>   return cpumask_of_node(cpu_to_node(cpu));
>          ^~~~~~~~~~~~~~~
> 
> Before switch from discontigmem to sparsemem, there always was
> CONFIG_NEED_MULTIPLE_NODES=y because it was selected by DISCONTIGMEM.
> Without DISCONTIGMEM it is possible to have SPARSEMEM without NUMA for
> SGI_IP27 and as many things there rely on custom node definition, the
> build breaks.
> 
> As Thomas noted "... there are right now too many places in IP27 code,
> which assumes NUMA enabled", the simplest solution would be to always
> enable NUMA for SGI-IP27 builds.
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Fixes: 397dc00e249e ("mips: sgi-ip27: switch from DISCONTIGMEM to SPARSEMEM")
> Cc: stable@vger.kernel.org
> Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
> ---
>  arch/mips/Kconfig | 1 +
>  1 file changed, 1 insertion(+)

applied to mips-next.

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

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

end of thread, other threads:[~2020-08-06 11:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-05 12:51 [PATCH] MIPS: SGI-IP27: always enable NUMA in Kconfig Mike Rapoport
2020-08-06  0:43 ` Joshua Kinard
2020-08-06  7:41 ` Thomas Bogendoerfer

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).