linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* arch/mips/include/asm/mach-ip27/topology.h:19:7: error: implicit declaration of function 'hub_data'
@ 2020-08-03 17:39 kernel test robot
  2020-08-03 19:49 ` Mike Rapoport
  0 siblings, 1 reply; 9+ messages in thread
From: kernel test robot @ 2020-08-03 17:39 UTC (permalink / raw)
  To: Mike Rapoport; +Cc: kbuild-all, linux-kernel, Paul Burton, Thomas Bogendoerfer

[-- Attachment #1: Type: text/plain, Size: 6863 bytes --]

Hi Mike,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   bcf876870b95592b52519ed4aafcf9d95999bc9c
commit: 397dc00e249ec64e106374565575dd0eb7e25998 mips: sgi-ip27: switch from DISCONTIGMEM to SPARSEMEM
date:   10 months ago
config: mips-randconfig-r032-20200803 (attached as .config)
compiler: mips64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 397dc00e249ec64e106374565575dd0eb7e25998
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   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:
   arch/mips/include/asm/mach-ip27/topology.h:25:39: error: 'MAX_COMPACT_NODES' undeclared here (not in a function)
      25 | extern unsigned char __node_distances[MAX_COMPACT_NODES][MAX_COMPACT_NODES];
         |                                       ^~~~~~~~~~~~~~~~~
   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' [-Werror=implicit-function-declaration]
      16 | #define cpu_to_node(cpu) (cputonasid(cpu))
         |                           ^~~~~~~~~~
   include/linux/topology.h:119:9: note: in expansion of macro 'cpu_to_node'
     119 |  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]
      19 |      &hub_data(node)->h_cpus)
         |       ^~~~~~~~
   include/linux/topology.h:227:9: note: in expansion of macro 'cpumask_of_node'
     227 |  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')
      19 |      &hub_data(node)->h_cpus)
         |                     ^~
   include/linux/topology.h:227:9: note: in expansion of macro 'cpumask_of_node'
     227 |  return cpumask_of_node(cpu_to_node(cpu));
         |         ^~~~~~~~~~~~~~~
   arch/mips/kernel/asm-offsets.c: At top level:
   arch/mips/kernel/asm-offsets.c:26:6: warning: no previous prototype for 'output_ptreg_defines' [-Wmissing-prototypes]
      26 | void output_ptreg_defines(void)
         |      ^~~~~~~~~~~~~~~~~~~~
   arch/mips/kernel/asm-offsets.c:78:6: warning: no previous prototype for 'output_task_defines' [-Wmissing-prototypes]
      78 | void output_task_defines(void)
         |      ^~~~~~~~~~~~~~~~~~~
   arch/mips/kernel/asm-offsets.c:93:6: warning: no previous prototype for 'output_thread_info_defines' [-Wmissing-prototypes]
      93 | void output_thread_info_defines(void)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/mips/kernel/asm-offsets.c:110:6: warning: no previous prototype for 'output_thread_defines' [-Wmissing-prototypes]
     110 | void output_thread_defines(void)
         |      ^~~~~~~~~~~~~~~~~~~~~
   arch/mips/kernel/asm-offsets.c:138:6: warning: no previous prototype for 'output_thread_fpu_defines' [-Wmissing-prototypes]
     138 | void output_thread_fpu_defines(void)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~
   arch/mips/kernel/asm-offsets.c:181:6: warning: no previous prototype for 'output_mm_defines' [-Wmissing-prototypes]
     181 | void output_mm_defines(void)
         |      ^~~~~~~~~~~~~~~~~
   arch/mips/kernel/asm-offsets.c:242:6: warning: no previous prototype for 'output_sc_defines' [-Wmissing-prototypes]
     242 | void output_sc_defines(void)
         |      ^~~~~~~~~~~~~~~~~
   arch/mips/kernel/asm-offsets.c:255:6: warning: no previous prototype for 'output_signal_defined' [-Wmissing-prototypes]
     255 | void output_signal_defined(void)
         |      ^~~~~~~~~~~~~~~~~~~~~
   arch/mips/kernel/asm-offsets.c:334:6: warning: no previous prototype for 'output_pm_defines' [-Wmissing-prototypes]
     334 | void output_pm_defines(void)
         |      ^~~~~~~~~~~~~~~~~
   arch/mips/kernel/asm-offsets.c:348:6: warning: no previous prototype for 'output_kvm_defines' [-Wmissing-prototypes]
     348 | void output_kvm_defines(void)
         |      ^~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors
   make[2]: *** [scripts/Makefile.build:99: arch/mips/kernel/asm-offsets.s] Error 1
   make[2]: Target 'missing-syscalls' not remade because of errors.
   make[1]: *** [arch/mips/Makefile:414: archprepare] Error 2
   make[1]: Target 'prepare' not remade because of errors.
   make: *** [Makefile:179: sub-make] Error 2
   make: Target 'prepare' not remade because of errors.

vim +/hub_data +19 arch/mips/include/asm/mach-ip27/topology.h

cc6e8e0812cf95 include/asm-mips/mach-ip27/topology.h      Ralf Baechle        2007-10-11  15  
4bf841ebf17aaa arch/mips/include/asm/mach-ip27/topology.h Thomas Bogendoerfer 2019-10-03 @16  #define cpu_to_node(cpu)	(cputonasid(cpu))
d797396f3387c5 arch/mips/include/asm/mach-ip27/topology.h Anton Blanchard     2010-01-06  17  #define cpumask_of_node(node)	((node) == -1 ?				\
d797396f3387c5 arch/mips/include/asm/mach-ip27/topology.h Anton Blanchard     2010-01-06  18  				 cpu_all_mask :				\
d797396f3387c5 arch/mips/include/asm/mach-ip27/topology.h Anton Blanchard     2010-01-06 @19  				 &hub_data(node)->h_cpus)
9dbdfce85c165f include/asm-mips/mach-ip27/topology.h      Ralf Baechle        2005-09-15  20  struct pci_bus;
9dbdfce85c165f include/asm-mips/mach-ip27/topology.h      Ralf Baechle        2005-09-15  21  extern int pcibus_to_node(struct pci_bus *);
9dbdfce85c165f include/asm-mips/mach-ip27/topology.h      Ralf Baechle        2005-09-15  22  

:::::: The code at line 19 was first introduced by commit
:::::: d797396f3387c5be8f63fcc8e9be98bb884ea86a MIPS: cpumask_of_node() should handle -1 as a node

:::::: TO: Anton Blanchard <anton@samba.org>
:::::: CC: Ralf Baechle <ralf@linux-mips.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 24759 bytes --]

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

* Re: arch/mips/include/asm/mach-ip27/topology.h:19:7: error: implicit declaration of function 'hub_data'
  2020-08-03 17:39 arch/mips/include/asm/mach-ip27/topology.h:19:7: error: implicit declaration of function 'hub_data' kernel test robot
@ 2020-08-03 19:49 ` Mike Rapoport
  2020-08-03 23:58   ` Joshua Kinard
  2020-08-05  8:37   ` Thomas Bogendoerfer
  0 siblings, 2 replies; 9+ messages in thread
From: Mike Rapoport @ 2020-08-03 19:49 UTC (permalink / raw)
  To: kernel test robot
  Cc: linux-kernel, Paul Burton, Thomas Bogendoerfer, linux-mips

Hi,

On Tue, Aug 04, 2020 at 01:39:14AM +0800, kernel test robot wrote:
> Hi Mike,
> 
> FYI, the error/warning still remains.
> 
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   bcf876870b95592b52519ed4aafcf9d95999bc9c
> commit: 397dc00e249ec64e106374565575dd0eb7e25998 mips: sgi-ip27: switch from DISCONTIGMEM to SPARSEMEM
> date:   10 months ago
> config: mips-randconfig-r032-20200803 (attached as .config)
> compiler: mips64-linux-gcc (GCC) 9.3.0
> reproduce (this is a W=1 build):
>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         git checkout 397dc00e249ec64e106374565575dd0eb7e25998
>         # save the attached .config to linux build tree
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips 
> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
> 
> All errors (new ones prefixed by >>):
> 
>    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:
>    arch/mips/include/asm/mach-ip27/topology.h:25:39: error: 'MAX_COMPACT_NODES' undeclared here (not in a function)
>       25 | extern unsigned char __node_distances[MAX_COMPACT_NODES][MAX_COMPACT_NODES];
>          |                                       ^~~~~~~~~~~~~~~~~
>    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' [-Werror=implicit-function-declaration]
>       16 | #define cpu_to_node(cpu) (cputonasid(cpu))
>          |                           ^~~~~~~~~~

This happens when randconfig disables NUMA and has SGI_IP27 enabled.
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.

I don't remember small Origin or Onyx systems so I think it would be
reasonable to make SGI_IP27 to select NUMA. If the below patch makes
sense I'll resend it formally.

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


-- 
Sincerely yours,
Mike.

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

* Re: arch/mips/include/asm/mach-ip27/topology.h:19:7: error: implicit declaration of function 'hub_data'
  2020-08-03 19:49 ` Mike Rapoport
@ 2020-08-03 23:58   ` Joshua Kinard
  2020-08-04 11:34     ` Jiaxun Yang
  2020-08-04 12:59     ` Mike Rapoport
  2020-08-05  8:37   ` Thomas Bogendoerfer
  1 sibling, 2 replies; 9+ messages in thread
From: Joshua Kinard @ 2020-08-03 23:58 UTC (permalink / raw)
  To: Mike Rapoport, kernel test robot
  Cc: linux-kernel, Paul Burton, Thomas Bogendoerfer, linux-mips

On 8/3/2020 15:49, Mike Rapoport wrote:
> Hi,
> 
> On Tue, Aug 04, 2020 at 01:39:14AM +0800, kernel test robot wrote:
>> Hi Mike,
>>
>> FYI, the error/warning still remains.
>>
>> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
>> head:   bcf876870b95592b52519ed4aafcf9d95999bc9c
>> commit: 397dc00e249ec64e106374565575dd0eb7e25998 mips: sgi-ip27: switch from DISCONTIGMEM to SPARSEMEM
>> date:   10 months ago
>> config: mips-randconfig-r032-20200803 (attached as .config)
>> compiler: mips64-linux-gcc (GCC) 9.3.0
>> reproduce (this is a W=1 build):
>>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>>         chmod +x ~/bin/make.cross
>>         git checkout 397dc00e249ec64e106374565575dd0eb7e25998
>>         # save the attached .config to linux build tree
>>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips 
>>
>> If you fix the issue, kindly add following tag as appropriate
>> Reported-by: kernel test robot <lkp@intel.com>
>>
>> All errors (new ones prefixed by >>):
>>
>>    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:
>>    arch/mips/include/asm/mach-ip27/topology.h:25:39: error: 'MAX_COMPACT_NODES' undeclared here (not in a function)
>>       25 | extern unsigned char __node_distances[MAX_COMPACT_NODES][MAX_COMPACT_NODES];
>>          |                                       ^~~~~~~~~~~~~~~~~
>>    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' [-Werror=implicit-function-declaration]
>>       16 | #define cpu_to_node(cpu) (cputonasid(cpu))
>>          |                           ^~~~~~~~~~
> 
> This happens when randconfig disables NUMA and has SGI_IP27 enabled.
> 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.
> 
> I don't remember small Origin or Onyx systems so I think it would be
> reasonable to make SGI_IP27 to select NUMA. If the below patch makes
> sense I'll resend it formally.
> 
> 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

NUMA is really only needed if you have more than one nodeboard for the Onyx2
or Origin2000 systems.  If you just have a single Origin 200 system, you
want to turn NUMA off.  I happen to have both a single Origin 200 system and
an Onyx2 w/ two nodeboards.  Haven't fired them up recently on modern
kernels, though.

I can't think of a good workaround off the top of my head for this case.
NUMA shouldn't hurt an Origin 200, but I recall Ralf once telling me it does
introduce slowdown at some points due to checks for other nodes being done
when we know there can't physically be any more (exception: dual Origin
200's hooked together via CrossTown cables).

-- 
Joshua Kinard
Gentoo/MIPS
kumba@gentoo.org
rsa6144/5C63F4E3F5C6C943 2015-04-27
177C 1972 1FB8 F254 BAD0 3E72 5C63 F4E3 F5C6 C943

"The past tempts us, the present confuses us, the future frightens us.  And
our lives slip away, moment by moment, lost in that vast, terrible in-between."

--Emperor Turhan, Centauri Republic

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

* Re: arch/mips/include/asm/mach-ip27/topology.h:19:7: error: implicit declaration of function 'hub_data'
  2020-08-03 23:58   ` Joshua Kinard
@ 2020-08-04 11:34     ` Jiaxun Yang
  2020-08-04 12:37       ` Mike Rapoport
  2020-08-04 12:59     ` Mike Rapoport
  1 sibling, 1 reply; 9+ messages in thread
From: Jiaxun Yang @ 2020-08-04 11:34 UTC (permalink / raw)
  To: Joshua Kinard, Mike Rapoport, kernel test robot
  Cc: linux-kernel, Paul Burton, Thomas Bogendoerfer, linux-mips



在 2020/8/4 上午7:58, Joshua Kinard 写道:
> On 8/3/2020 15:49, Mike Rapoport wrote:
>> Hi,
>>
>> On Tue, Aug 04, 2020 at 01:39:14AM +0800, kernel test robot wrote:
>>> Hi Mike,
>>>
>>> FYI, the error/warning still remains.
>>>
>>> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
>>> head:   bcf876870b95592b52519ed4aafcf9d95999bc9c
>>> commit: 397dc00e249ec64e106374565575dd0eb7e25998 mips: sgi-ip27: switch from DISCONTIGMEM to SPARSEMEM
>>> date:   10 months ago
>>> config: mips-randconfig-r032-20200803 (attached as .config)
>>> compiler: mips64-linux-gcc (GCC) 9.3.0
>>> reproduce (this is a W=1 build):
>>>          wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>>>          chmod +x ~/bin/make.cross
>>>          git checkout 397dc00e249ec64e106374565575dd0eb7e25998
>>>          # save the attached .config to linux build tree
>>>          COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips
>>>
>>> If you fix the issue, kindly add following tag as appropriate
>>> Reported-by: kernel test robot <lkp@intel.com>
>>>
>>> All errors (new ones prefixed by >>):
>>>
>>>     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:
>>>     arch/mips/include/asm/mach-ip27/topology.h:25:39: error: 'MAX_COMPACT_NODES' undeclared here (not in a function)
>>>        25 | extern unsigned char __node_distances[MAX_COMPACT_NODES][MAX_COMPACT_NODES];
>>>           |                                       ^~~~~~~~~~~~~~~~~
>>>     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' [-Werror=implicit-function-declaration]
>>>        16 | #define cpu_to_node(cpu) (cputonasid(cpu))
>>>           |                           ^~~~~~~~~~
>> This happens when randconfig disables NUMA and has SGI_IP27 enabled.
>> 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.
>>
>> I don't remember small Origin or Onyx systems so I think it would be
>> reasonable to make SGI_IP27 to select NUMA. If the below patch makes
>> sense I'll resend it formally.
>>
>> 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
> NUMA is really only needed if you have more than one nodeboard for the Onyx2
> or Origin2000 systems.  If you just have a single Origin 200 system, you
> want to turn NUMA off.  I happen to have both a single Origin 200 system and
> an Onyx2 w/ two nodeboards.  Haven't fired them up recently on modern
> kernels, though.
>
> I can't think of a good workaround off the top of my head for this case.
> NUMA shouldn't hurt an Origin 200, but I recall Ralf once telling me it does
> introduce slowdown at some points due to checks for other nodes being done
> when we know there can't physically be any more (exception: dual Origin
> 200's hooked together via CrossTown cables).
Then something like this would be more reasonable:

diff --git a/arch/mips/include/asm/mach-ip27/topology.h 
b/arch/mips/include/asm/mach-ip27/topology.h
index d66cc53feab8..8976b9a20bdc 100644
--- a/arch/mips/include/asm/mach-ip27/topology.h
+++ b/arch/mips/include/asm/mach-ip27/topology.h
@@ -13,6 +13,7 @@ struct cpuinfo_ip27 {

  extern struct cpuinfo_ip27 sn_cpu_info[NR_CPUS];

+#ifdef CONFIG_NUMA
  #define cpu_to_node(cpu)       (cputonasid(cpu))
  #define cpumask_of_node(node)  ((node) == -1 ?                         \
                                  cpu_all_mask :                         \
@@ -25,6 +26,10 @@ extern int pcibus_to_node(struct pci_bus *);
  extern unsigned char __node_distances[MAX_NUMNODES][MAX_NUMNODES];

  #define node_distance(from, to) (__node_distances[(from)][(to)])
+#else
+#define cpu_to_node(cpu)       0
+#define cpumask_of_node(node)  cpu_present_mask
+#endif

  #include <asm-generic/topology.h>

- Jiaxun
>

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

* Re: arch/mips/include/asm/mach-ip27/topology.h:19:7: error: implicit declaration of function 'hub_data'
  2020-08-04 11:34     ` Jiaxun Yang
@ 2020-08-04 12:37       ` Mike Rapoport
  0 siblings, 0 replies; 9+ messages in thread
From: Mike Rapoport @ 2020-08-04 12:37 UTC (permalink / raw)
  To: Jiaxun Yang
  Cc: Joshua Kinard, kernel test robot, linux-kernel, Paul Burton,
	Thomas Bogendoerfer, linux-mips

On Tue, Aug 04, 2020 at 07:34:39PM +0800, Jiaxun Yang wrote:
> 
> 在 2020/8/4 上午7:58, Joshua Kinard 写道:
> > On 8/3/2020 15:49, Mike Rapoport wrote:
> > > Hi,
> > > 
> > > On Tue, Aug 04, 2020 at 01:39:14AM +0800, kernel test robot wrote:
> > > > Hi Mike,
> > > > 
> > > > FYI, the error/warning still remains.
> > > > 
> > > > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > > > head:   bcf876870b95592b52519ed4aafcf9d95999bc9c
> > > > commit: 397dc00e249ec64e106374565575dd0eb7e25998 mips: sgi-ip27: switch from DISCONTIGMEM to SPARSEMEM
> > > > date:   10 months ago
> > > > config: mips-randconfig-r032-20200803 (attached as .config)
> > > > compiler: mips64-linux-gcc (GCC) 9.3.0
> > > > reproduce (this is a W=1 build):
> > > >          wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> > > >          chmod +x ~/bin/make.cross
> > > >          git checkout 397dc00e249ec64e106374565575dd0eb7e25998
> > > >          # save the attached .config to linux build tree
> > > >          COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips
> > > > 
> > > > If you fix the issue, kindly add following tag as appropriate
> > > > Reported-by: kernel test robot <lkp@intel.com>
> > > > 
> > > > All errors (new ones prefixed by >>):
> > > > 
> > > >     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:
> > > >     arch/mips/include/asm/mach-ip27/topology.h:25:39: error: 'MAX_COMPACT_NODES' undeclared here (not in a function)
> > > >        25 | extern unsigned char __node_distances[MAX_COMPACT_NODES][MAX_COMPACT_NODES];
> > > >           |                                       ^~~~~~~~~~~~~~~~~
> > > >     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' [-Werror=implicit-function-declaration]
> > > >        16 | #define cpu_to_node(cpu) (cputonasid(cpu))
> > > >           |                           ^~~~~~~~~~
> > > This happens when randconfig disables NUMA and has SGI_IP27 enabled.
> > > 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.
> > > 
> > > I don't remember small Origin or Onyx systems so I think it would be
> > > reasonable to make SGI_IP27 to select NUMA. If the below patch makes
> > > sense I'll resend it formally.
> > > 
> > > 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
> > NUMA is really only needed if you have more than one nodeboard for the Onyx2
> > or Origin2000 systems.  If you just have a single Origin 200 system, you
> > want to turn NUMA off.  I happen to have both a single Origin 200 system and
> > an Onyx2 w/ two nodeboards.  Haven't fired them up recently on modern
> > kernels, though.
> > 
> > I can't think of a good workaround off the top of my head for this case.
> > NUMA shouldn't hurt an Origin 200, but I recall Ralf once telling me it does
> > introduce slowdown at some points due to checks for other nodes being done
> > when we know there can't physically be any more (exception: dual Origin
> > 200's hooked together via CrossTown cables).
>
> Then something like this would be more reasonable:
> 
> diff --git a/arch/mips/include/asm/mach-ip27/topology.h
> b/arch/mips/include/asm/mach-ip27/topology.h
> index d66cc53feab8..8976b9a20bdc 100644
> --- a/arch/mips/include/asm/mach-ip27/topology.h
> +++ b/arch/mips/include/asm/mach-ip27/topology.h
> @@ -13,6 +13,7 @@ struct cpuinfo_ip27 {
> 
>  extern struct cpuinfo_ip27 sn_cpu_info[NR_CPUS];
> 
> +#ifdef CONFIG_NUMA
>  #define cpu_to_node(cpu)       (cputonasid(cpu))
>  #define cpumask_of_node(node)  ((node) == -1 ?                         \
>                                  cpu_all_mask :                         \
> @@ -25,6 +26,10 @@ extern int pcibus_to_node(struct pci_bus *);
>  extern unsigned char __node_distances[MAX_NUMNODES][MAX_NUMNODES];
> 
>  #define node_distance(from, to) (__node_distances[(from)][(to)])
> +#else
> +#define cpu_to_node(cpu)       0
> +#define cpumask_of_node(node)  cpu_present_mask
> +#endif

Unfortunately this won't be enough. sgi-ip27 presumes custom node
structures available even if CONFIG_NUMA is disabled.
 
>  #include <asm-generic/topology.h>
> 
> - Jiaxun
> > 

-- 
Sincerely yours,
Mike.

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

* Re: arch/mips/include/asm/mach-ip27/topology.h:19:7: error: implicit declaration of function 'hub_data'
  2020-08-03 23:58   ` Joshua Kinard
  2020-08-04 11:34     ` Jiaxun Yang
@ 2020-08-04 12:59     ` Mike Rapoport
  1 sibling, 0 replies; 9+ messages in thread
From: Mike Rapoport @ 2020-08-04 12:59 UTC (permalink / raw)
  To: Joshua Kinard
  Cc: kernel test robot, linux-kernel, Paul Burton,
	Thomas Bogendoerfer, linux-mips

On Mon, Aug 03, 2020 at 07:58:54PM -0400, Joshua Kinard wrote:
> On 8/3/2020 15:49, Mike Rapoport wrote:
> > Hi,
> > 
> > On Tue, Aug 04, 2020 at 01:39:14AM +0800, kernel test robot wrote:
> >> Hi Mike,
> >>
> >> FYI, the error/warning still remains.
> >>
> >> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> >> head:   bcf876870b95592b52519ed4aafcf9d95999bc9c
> >> commit: 397dc00e249ec64e106374565575dd0eb7e25998 mips: sgi-ip27: switch from DISCONTIGMEM to SPARSEMEM
> >> date:   10 months ago
> >> config: mips-randconfig-r032-20200803 (attached as .config)
> >> compiler: mips64-linux-gcc (GCC) 9.3.0
> >> reproduce (this is a W=1 build):
> >>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> >>         chmod +x ~/bin/make.cross
> >>         git checkout 397dc00e249ec64e106374565575dd0eb7e25998
> >>         # save the attached .config to linux build tree
> >>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips 
> >>
> >> If you fix the issue, kindly add following tag as appropriate
> >> Reported-by: kernel test robot <lkp@intel.com>
> >>
> >> All errors (new ones prefixed by >>):
> >>
> >>    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:
> >>    arch/mips/include/asm/mach-ip27/topology.h:25:39: error: 'MAX_COMPACT_NODES' undeclared here (not in a function)
> >>       25 | extern unsigned char __node_distances[MAX_COMPACT_NODES][MAX_COMPACT_NODES];
> >>          |                                       ^~~~~~~~~~~~~~~~~
> >>    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' [-Werror=implicit-function-declaration]
> >>       16 | #define cpu_to_node(cpu) (cputonasid(cpu))
> >>          |                           ^~~~~~~~~~
> > 
> > This happens when randconfig disables NUMA and has SGI_IP27 enabled.
> > 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.
> > 
> > I don't remember small Origin or Onyx systems so I think it would be
> > reasonable to make SGI_IP27 to select NUMA. If the below patch makes
> > sense I'll resend it formally.
> > 
> > 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
> 
> NUMA is really only needed if you have more than one nodeboard for the Onyx2
> or Origin2000 systems.  If you just have a single Origin 200 system, you
> want to turn NUMA off.  I happen to have both a single Origin 200 system and
> an Onyx2 w/ two nodeboards.  Haven't fired them up recently on modern
> kernels, though.
> 
> I can't think of a good workaround off the top of my head for this case.
> NUMA shouldn't hurt an Origin 200, but I recall Ralf once telling me it does
> introduce slowdown at some points due to checks for other nodes being done
> when we know there can't physically be any more (exception: dual Origin
> 200's hooked together via CrossTown cables).
 
Before the removal of DISCONTIGMEM, Origin 200 would still have multiple
nodes and AFAIU it was not configurable, so I'm not sure there would be
a measurable difference between DISCONTIGMEM + !NUMA vs SPARSEMEM + NUMA 

> -- 
> Joshua Kinard
> Gentoo/MIPS
> kumba@gentoo.org
> rsa6144/5C63F4E3F5C6C943 2015-04-27
> 177C 1972 1FB8 F254 BAD0 3E72 5C63 F4E3 F5C6 C943
> 
> "The past tempts us, the present confuses us, the future frightens us.  And
> our lives slip away, moment by moment, lost in that vast, terrible in-between."
> 
> --Emperor Turhan, Centauri Republic

-- 
Sincerely yours,
Mike.

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

* Re: arch/mips/include/asm/mach-ip27/topology.h:19:7: error: implicit declaration of function 'hub_data'
  2020-08-03 19:49 ` Mike Rapoport
  2020-08-03 23:58   ` Joshua Kinard
@ 2020-08-05  8:37   ` Thomas Bogendoerfer
  1 sibling, 0 replies; 9+ messages in thread
From: Thomas Bogendoerfer @ 2020-08-05  8:37 UTC (permalink / raw)
  To: Mike Rapoport; +Cc: kernel test robot, linux-kernel, Paul Burton, linux-mips

On Mon, Aug 03, 2020 at 10:49:10PM +0300, Mike Rapoport wrote:
> On Tue, Aug 04, 2020 at 01:39:14AM +0800, kernel test robot wrote:
> [...]
> > 
> > All errors (new ones prefixed by >>):
> > 
> >    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:
> >    arch/mips/include/asm/mach-ip27/topology.h:25:39: error: 'MAX_COMPACT_NODES' undeclared here (not in a function)
> >       25 | extern unsigned char __node_distances[MAX_COMPACT_NODES][MAX_COMPACT_NODES];
> >          |                                       ^~~~~~~~~~~~~~~~~
> >    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' [-Werror=implicit-function-declaration]
> >       16 | #define cpu_to_node(cpu) (cputonasid(cpu))
> >          |                           ^~~~~~~~~~
> 
> This happens when randconfig disables NUMA and has SGI_IP27 enabled.
> 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.
> 
> I don't remember small Origin or Onyx systems so I think it would be
> reasonable to make SGI_IP27 to select NUMA.

IMHO there are right now too many places in IP27 code, which assumes NUMA
enabled, so your patch makes sense. And if someone wants to get it
supported without NUMA enabled, I'm taking that patch as well.

> If the below patch makes sense I'll resend it formally.

yes please.

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] 9+ messages in thread

* arch/mips/include/asm/mach-ip27/topology.h:19:7: error: implicit declaration of function 'hub_data'
@ 2020-07-27 15:00 kernel test robot
  0 siblings, 0 replies; 9+ messages in thread
From: kernel test robot @ 2020-07-27 15:00 UTC (permalink / raw)
  To: Mike Rapoport; +Cc: kbuild-all, linux-kernel, Paul Burton, Thomas Bogendoerfer

[-- Attachment #1: Type: text/plain, Size: 11049 bytes --]

Hi Mike,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   92ed301919932f777713b9172e525674157e983d
commit: 397dc00e249ec64e106374565575dd0eb7e25998 mips: sgi-ip27: switch from DISCONTIGMEM to SPARSEMEM
date:   10 months ago
config: mips-randconfig-r016-20200727 (attached as .config)
compiler: mips64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 397dc00e249ec64e106374565575dd0eb7e25998
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   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:
   arch/mips/include/asm/mach-ip27/topology.h:25:39: error: 'MAX_COMPACT_NODES' undeclared here (not in a function)
      25 | extern unsigned char __node_distances[MAX_COMPACT_NODES][MAX_COMPACT_NODES];
         |                                       ^~~~~~~~~~~~~~~~~
   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' [-Werror=implicit-function-declaration]
      16 | #define cpu_to_node(cpu) (cputonasid(cpu))
         |                           ^~~~~~~~~~
   include/linux/topology.h:119:9: note: in expansion of macro 'cpu_to_node'
     119 |  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]
      19 |      &hub_data(node)->h_cpus)
         |       ^~~~~~~~
   include/linux/topology.h:227:9: note: in expansion of macro 'cpumask_of_node'
     227 |  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')
      19 |      &hub_data(node)->h_cpus)
         |                     ^~
   include/linux/topology.h:227:9: note: in expansion of macro 'cpumask_of_node'
     227 |  return cpumask_of_node(cpu_to_node(cpu));
         |         ^~~~~~~~~~~~~~~
   In file included from arch/mips/include/asm/pgtable.h:644,
                    from include/linux/mm.h:99,
                    from arch/mips/kernel/asm-offsets.c:15:
   include/asm-generic/pgtable.h: At top level:
   include/asm-generic/pgtable.h:16:2: error: #error CONFIG_PGTABLE_LEVELS is not consistent with __PAGETABLE_{P4D,PUD,PMD}_FOLDED
      16 | #error CONFIG_PGTABLE_LEVELS is not consistent with __PAGETABLE_{P4D,PUD,PMD}_FOLDED
         |  ^~~~~
   include/asm-generic/pgtable.h:390:28: error: unknown type name 'p4d_t'; did you mean 'pmd_t'?
     390 | static inline int p4d_same(p4d_t p4d_a, p4d_t p4d_b)
         |                            ^~~~~
         |                            pmd_t
   include/asm-generic/pgtable.h:390:41: error: unknown type name 'p4d_t'; did you mean 'pmd_t'?
     390 | static inline int p4d_same(p4d_t p4d_a, p4d_t p4d_b)
         |                                         ^~~~~
         |                                         pmd_t
   include/asm-generic/pgtable.h:561:20: error: unknown type name 'p4d_t'; did you mean 'pmd_t'?
     561 | void p4d_clear_bad(p4d_t *);
         |                    ^~~~~
         |                    pmd_t
   include/asm-generic/pgtable.h:576:41: error: unknown type name 'p4d_t'; did you mean 'pmd_t'?
     576 | static inline int p4d_none_or_clear_bad(p4d_t *p4d)
         |                                         ^~~~~
         |                                         pmd_t
   include/asm-generic/pgtable.h:1063:32: error: unknown type name 'p4d_t'; did you mean 'pmd_t'?
    1063 | static inline int p4d_set_huge(p4d_t *p4d, phys_addr_t addr, pgprot_t prot)
         |                                ^~~~~
         |                                pmd_t
   include/asm-generic/pgtable.h:1075:34: error: unknown type name 'p4d_t'; did you mean 'pmd_t'?
    1075 | static inline int p4d_clear_huge(p4d_t *p4d)
         |                                  ^~~~~
         |                                  pmd_t
   include/asm-generic/pgtable.h:1087:37: error: unknown type name 'p4d_t'; did you mean 'pmd_t'?
    1087 | static inline int p4d_free_pud_page(p4d_t *p4d, unsigned long addr)
         |                                     ^~~~~
         |                                     pmd_t
   In file included from arch/mips/kernel/asm-offsets.c:15:
   include/linux/mm.h:1773:39: error: unknown type name 'p4d_t'; did you mean 'pmd_t'?
    1773 | int __pud_alloc(struct mm_struct *mm, p4d_t *p4d, unsigned long address);
         |                                       ^~~~~
         |                                       pmd_t
   include/linux/mm.h:1860:15: error: unknown type name 'p4d_t'
    1860 | static inline p4d_t *p4d_alloc(struct mm_struct *mm, pgd_t *pgd,
         |               ^~~~~
   include/linux/mm.h: In function 'p4d_alloc':
   include/linux/mm.h:1864:10: error: implicit declaration of function 'p4d_offset'; did you mean 'pmd_offset'? [-Werror=implicit-function-declaration]
    1864 |   NULL : p4d_offset(pgd, address);
         |          ^~~~~~~~~~
         |          pmd_offset
   include/linux/mm.h:1864:8: warning: pointer/integer type mismatch in conditional expression
    1864 |   NULL : p4d_offset(pgd, address);
         |        ^
   include/linux/mm.h: At top level:
   include/linux/mm.h:1867:54: error: unknown type name 'p4d_t'; did you mean 'pmd_t'?
    1867 | static inline pud_t *pud_alloc(struct mm_struct *mm, p4d_t *p4d,
         |                                                      ^~~~~
         |                                                      pmd_t
   In file included from arch/mips/kernel/asm-offsets.c:15:
   include/linux/mm.h:2753:1: error: unknown type name 'p4d_t'; did you mean 'pmd_t'?
    2753 | p4d_t *vmemmap_p4d_populate(pgd_t *pgd, unsigned long addr, int node);
         | ^~~~~
         | pmd_t
   include/linux/mm.h:2754:29: error: unknown type name 'p4d_t'; did you mean 'pmd_t'?
    2754 | pud_t *vmemmap_pud_populate(p4d_t *p4d, unsigned long addr, int node);
         |                             ^~~~~
         |                             pmd_t
   arch/mips/kernel/asm-offsets.c:26:6: warning: no previous prototype for 'output_ptreg_defines' [-Wmissing-prototypes]
      26 | void output_ptreg_defines(void)
         |      ^~~~~~~~~~~~~~~~~~~~
   arch/mips/kernel/asm-offsets.c:78:6: warning: no previous prototype for 'output_task_defines' [-Wmissing-prototypes]
      78 | void output_task_defines(void)
         |      ^~~~~~~~~~~~~~~~~~~
   arch/mips/kernel/asm-offsets.c:93:6: warning: no previous prototype for 'output_thread_info_defines' [-Wmissing-prototypes]
      93 | void output_thread_info_defines(void)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/mips/kernel/asm-offsets.c:110:6: warning: no previous prototype for 'output_thread_defines' [-Wmissing-prototypes]
     110 | void output_thread_defines(void)
         |      ^~~~~~~~~~~~~~~~~~~~~
   arch/mips/kernel/asm-offsets.c:138:6: warning: no previous prototype for 'output_thread_fpu_defines' [-Wmissing-prototypes]
     138 | void output_thread_fpu_defines(void)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~
   arch/mips/kernel/asm-offsets.c:181:6: warning: no previous prototype for 'output_mm_defines' [-Wmissing-prototypes]
     181 | void output_mm_defines(void)
         |      ^~~~~~~~~~~~~~~~~
   arch/mips/kernel/asm-offsets.c:242:6: warning: no previous prototype for 'output_sc_defines' [-Wmissing-prototypes]
     242 | void output_sc_defines(void)
         |      ^~~~~~~~~~~~~~~~~
   arch/mips/kernel/asm-offsets.c:255:6: warning: no previous prototype for 'output_signal_defined' [-Wmissing-prototypes]
     255 | void output_signal_defined(void)
         |      ^~~~~~~~~~~~~~~~~~~~~
   arch/mips/kernel/asm-offsets.c:334:6: warning: no previous prototype for 'output_pm_defines' [-Wmissing-prototypes]
     334 | void output_pm_defines(void)
         |      ^~~~~~~~~~~~~~~~~
   arch/mips/kernel/asm-offsets.c:348:6: warning: no previous prototype for 'output_kvm_defines' [-Wmissing-prototypes]
     348 | void output_kvm_defines(void)
         |      ^~~~~~~~~~~~~~~~~~

vim +/hub_data +19 arch/mips/include/asm/mach-ip27/topology.h

cc6e8e0812cf95 include/asm-mips/mach-ip27/topology.h      Ralf Baechle        2007-10-11  15  
4bf841ebf17aaa arch/mips/include/asm/mach-ip27/topology.h Thomas Bogendoerfer 2019-10-03 @16  #define cpu_to_node(cpu)	(cputonasid(cpu))
d797396f3387c5 arch/mips/include/asm/mach-ip27/topology.h Anton Blanchard     2010-01-06  17  #define cpumask_of_node(node)	((node) == -1 ?				\
d797396f3387c5 arch/mips/include/asm/mach-ip27/topology.h Anton Blanchard     2010-01-06  18  				 cpu_all_mask :				\
d797396f3387c5 arch/mips/include/asm/mach-ip27/topology.h Anton Blanchard     2010-01-06 @19  				 &hub_data(node)->h_cpus)
9dbdfce85c165f include/asm-mips/mach-ip27/topology.h      Ralf Baechle        2005-09-15  20  struct pci_bus;
9dbdfce85c165f include/asm-mips/mach-ip27/topology.h      Ralf Baechle        2005-09-15  21  extern int pcibus_to_node(struct pci_bus *);
9dbdfce85c165f include/asm-mips/mach-ip27/topology.h      Ralf Baechle        2005-09-15  22  
a57140e9a85058 arch/mips/include/asm/mach-ip27/topology.h Thomas Bogendoerfer 2019-05-07  23  #define cpumask_of_pcibus(bus)	(cpumask_of_node(pcibus_to_node(bus)))
^1da177e4c3f41 include/asm-mips/mach-ip27/topology.h      Linus Torvalds      2005-04-16  24  
^1da177e4c3f41 include/asm-mips/mach-ip27/topology.h      Linus Torvalds      2005-04-16 @25  extern unsigned char __node_distances[MAX_COMPACT_NODES][MAX_COMPACT_NODES];
^1da177e4c3f41 include/asm-mips/mach-ip27/topology.h      Linus Torvalds      2005-04-16  26  

:::::: The code at line 19 was first introduced by commit
:::::: d797396f3387c5be8f63fcc8e9be98bb884ea86a MIPS: cpumask_of_node() should handle -1 as a node

:::::: TO: Anton Blanchard <anton@samba.org>
:::::: CC: Ralf Baechle <ralf@linux-mips.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 31441 bytes --]

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

* arch/mips/include/asm/mach-ip27/topology.h:19:7: error: implicit declaration of function 'hub_data'
@ 2020-06-15  6:20 kernel test robot
  0 siblings, 0 replies; 9+ messages in thread
From: kernel test robot @ 2020-06-15  6:20 UTC (permalink / raw)
  To: Mike Rapoport; +Cc: kbuild-all, linux-kernel, Paul Burton, Thomas Bogendoerfer

[-- Attachment #1: Type: text/plain, Size: 5999 bytes --]

Hi Mike,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   df2fbf5bfa0e7fff8b4784507e4d68f200454318
commit: 397dc00e249ec64e106374565575dd0eb7e25998 mips: sgi-ip27: switch from DISCONTIGMEM to SPARSEMEM
date:   8 months ago
:::::: branch date: 16 hours ago
:::::: commit date: 8 months ago
config: mips-randconfig-c021-20200612 (attached as .config)
compiler: mips64-linux-gcc (GCC) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All error/warnings (new ones prefixed by >>, old ones prefixed by <<):

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:
arch/mips/include/asm/mach-ip27/topology.h:25:39: error: 'MAX_COMPACT_NODES' undeclared here (not in a function)
25 | extern unsigned char __node_distances[MAX_COMPACT_NODES][MAX_COMPACT_NODES];
|                                       ^~~~~~~~~~~~~~~~~
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' [-Werror=implicit-function-declaration]
16 | #define cpu_to_node(cpu) (cputonasid(cpu))
|                           ^~~~~~~~~~
>> include/linux/topology.h:119:9: note: in expansion of macro 'cpu_to_node'
119 |  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]
19 |      &hub_data(node)->h_cpus)
|       ^~~~~~~~
include/linux/topology.h:227:9: note: in expansion of macro 'cpumask_of_node'
227 |  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')
19 |      &hub_data(node)->h_cpus)
|                     ^~
include/linux/topology.h:227:9: note: in expansion of macro 'cpumask_of_node'
227 |  return cpumask_of_node(cpu_to_node(cpu));
|         ^~~~~~~~~~~~~~~
arch/mips/kernel/asm-offsets.c: At top level:
arch/mips/kernel/asm-offsets.c:26:6: warning: no previous prototype for 'output_ptreg_defines' [-Wmissing-prototypes]
26 | void output_ptreg_defines(void)
|      ^~~~~~~~~~~~~~~~~~~~
arch/mips/kernel/asm-offsets.c:78:6: warning: no previous prototype for 'output_task_defines' [-Wmissing-prototypes]
78 | void output_task_defines(void)
|      ^~~~~~~~~~~~~~~~~~~
arch/mips/kernel/asm-offsets.c:93:6: warning: no previous prototype for 'output_thread_info_defines' [-Wmissing-prototypes]
93 | void output_thread_info_defines(void)
|      ^~~~~~~~~~~~~~~~~~~~~~~~~~
arch/mips/kernel/asm-offsets.c:110:6: warning: no previous prototype for 'output_thread_defines' [-Wmissing-prototypes]
110 | void output_thread_defines(void)
|      ^~~~~~~~~~~~~~~~~~~~~
arch/mips/kernel/asm-offsets.c:181:6: warning: no previous prototype for 'output_mm_defines' [-Wmissing-prototypes]
181 | void output_mm_defines(void)
|      ^~~~~~~~~~~~~~~~~
arch/mips/kernel/asm-offsets.c:242:6: warning: no previous prototype for 'output_sc_defines' [-Wmissing-prototypes]
242 | void output_sc_defines(void)
|      ^~~~~~~~~~~~~~~~~
arch/mips/kernel/asm-offsets.c:255:6: warning: no previous prototype for 'output_signal_defined' [-Wmissing-prototypes]
255 | void output_signal_defined(void)
|      ^~~~~~~~~~~~~~~~~~~~~
arch/mips/kernel/asm-offsets.c:334:6: warning: no previous prototype for 'output_pm_defines' [-Wmissing-prototypes]
334 | void output_pm_defines(void)
|      ^~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:99: arch/mips/kernel/asm-offsets.s] Error 1
make[2]: Target 'missing-syscalls' not remade because of errors.
make[1]: *** [arch/mips/Makefile:414: archprepare] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:179: sub-make] Error 2
make: Target 'prepare' not remade because of errors.

# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=397dc00e249ec64e106374565575dd0eb7e25998
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git remote update linus
git checkout 397dc00e249ec64e106374565575dd0eb7e25998
vim +/hub_data +19 arch/mips/include/asm/mach-ip27/topology.h

cc6e8e0812cf95 include/asm-mips/mach-ip27/topology.h      Ralf Baechle        2007-10-11  15  
4bf841ebf17aaa arch/mips/include/asm/mach-ip27/topology.h Thomas Bogendoerfer 2019-10-03 @16  #define cpu_to_node(cpu)	(cputonasid(cpu))
d797396f3387c5 arch/mips/include/asm/mach-ip27/topology.h Anton Blanchard     2010-01-06  17  #define cpumask_of_node(node)	((node) == -1 ?				\
d797396f3387c5 arch/mips/include/asm/mach-ip27/topology.h Anton Blanchard     2010-01-06  18  				 cpu_all_mask :				\
d797396f3387c5 arch/mips/include/asm/mach-ip27/topology.h Anton Blanchard     2010-01-06 @19  				 &hub_data(node)->h_cpus)
9dbdfce85c165f include/asm-mips/mach-ip27/topology.h      Ralf Baechle        2005-09-15  20  struct pci_bus;
9dbdfce85c165f include/asm-mips/mach-ip27/topology.h      Ralf Baechle        2005-09-15  21  extern int pcibus_to_node(struct pci_bus *);
9dbdfce85c165f include/asm-mips/mach-ip27/topology.h      Ralf Baechle        2005-09-15  22  

:::::: The code at line 19 was first introduced by commit
:::::: d797396f3387c5be8f63fcc8e9be98bb884ea86a MIPS: cpumask_of_node() should handle -1 as a node

:::::: TO: Anton Blanchard <anton@samba.org>
:::::: CC: Ralf Baechle <ralf@linux-mips.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 27782 bytes --]

[-- Attachment #3: Type: text/plain, Size: 149 bytes --]

_______________________________________________
kbuild mailing list -- kbuild@lists.01.org
To unsubscribe send an email to kbuild-leave@lists.01.org

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

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

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-03 17:39 arch/mips/include/asm/mach-ip27/topology.h:19:7: error: implicit declaration of function 'hub_data' kernel test robot
2020-08-03 19:49 ` Mike Rapoport
2020-08-03 23:58   ` Joshua Kinard
2020-08-04 11:34     ` Jiaxun Yang
2020-08-04 12:37       ` Mike Rapoport
2020-08-04 12:59     ` Mike Rapoport
2020-08-05  8:37   ` Thomas Bogendoerfer
  -- strict thread matches above, loose matches on Subject: below --
2020-07-27 15:00 kernel test robot
2020-06-15  6:20 kernel test robot

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