From: Jiaxun Yang <jiaxun.yang@flygoat.com>
To: Joshua Kinard <kumba@gentoo.org>,
Mike Rapoport <rppt@linux.ibm.com>,
kernel test robot <lkp@intel.com>
Cc: linux-kernel@vger.kernel.org, Paul Burton <paul.burton@mips.com>,
Thomas Bogendoerfer <tbogendoerfer@suse.de>,
linux-mips@vger.kernel.org
Subject: Re: arch/mips/include/asm/mach-ip27/topology.h:19:7: error: implicit declaration of function 'hub_data'
Date: Tue, 4 Aug 2020 19:34:39 +0800 [thread overview]
Message-ID: <d3d246c4-e1dd-5d8d-a8c0-23f9cfe878fd@flygoat.com> (raw)
In-Reply-To: <6a37284b-cbdb-36c8-b258-1a47e6c029ef@gentoo.org>
在 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
>
next prev parent reply other threads:[~2020-08-04 11:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <202008040108.xTarUIe8%lkp@intel.com>
2020-08-03 19:49 ` arch/mips/include/asm/mach-ip27/topology.h:19:7: error: implicit declaration of function 'hub_data' Mike Rapoport
2020-08-03 23:58 ` Joshua Kinard
2020-08-04 11:34 ` Jiaxun Yang [this message]
2020-08-04 12:37 ` Mike Rapoport
2020-08-04 12:59 ` Mike Rapoport
2020-08-05 8:37 ` Thomas Bogendoerfer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d3d246c4-e1dd-5d8d-a8c0-23f9cfe878fd@flygoat.com \
--to=jiaxun.yang@flygoat.com \
--cc=kumba@gentoo.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=lkp@intel.com \
--cc=paul.burton@mips.com \
--cc=rppt@linux.ibm.com \
--cc=tbogendoerfer@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).