Message ID | 20230306040037.20350-7-rdunlap@infradead.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1649568wrd; Sun, 5 Mar 2023 20:10:54 -0800 (PST) X-Google-Smtp-Source: AK7set8Y8JaPWl/zZDb8Mkj+x73whMe2zzr/eE++edkSmHBtCl7lQWNcwYA5/ylTTSk7Ean+W23a X-Received: by 2002:a17:907:7e87:b0:8b2:e81:df2b with SMTP id qb7-20020a1709077e8700b008b20e81df2bmr12196848ejc.44.1678075853959; Sun, 05 Mar 2023 20:10:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678075853; cv=none; d=google.com; s=arc-20160816; b=ogmURkzbM0oC22aRJ+HpUiWyWrY3nQ9q/DEYnrG+bJK8m1C2Y65I3E0dytFqGlnIsv /Hd49u/5b9Ab5Y6vAyzUprF7wMP7kSPdFEwxG/Y89ZNfOJ/Zgg+ap1rm5lEHbkWNMYLK Jxvainma+S50yRijGxC9E1VvQEdmjoan+yfRRoeVLGoA0sBVZQFVKcD6f1DsSfGBUAev hsD52t9P+otINfMwAluQ2g2ttVWftHGxYGYaFWUlw6dLk75Fe1OtHycW0QwAgMMYIVH7 IA9o78ES0X1c9pYQ+Tp4FlSqZqmVWzhdBRcgzMwHtyPS7IN7FbVfT3wyIpoit2NE1j/b tweA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=4aGYejjB597mgiQZIbHKlJkYyDrDVt5t4jYswvUz7/M=; b=kLNy86PJ2OI+vIjO31rXa0TmnHUkH49ASJNIqtcObxkjoHUPrYK2DQthx1hRvBx5YZ V2o6C/IM8Qa7rZR39GtvYVgtnqjIyw98//kxQFcBKp13XHnPx8QkxDpryn2vbImRYg9g fvj0IiMxp5Q5oVrP9+j0v6P2nYaWfitb71tpQeo2gByZ4+l5MbXebx2uHSKkVYii60w4 9zvOZUZ3XMa8O35yvWOS9YkOxw6gVnJSKKFSFxoX4fLbbBUye3fFABxCXGiOpocInbD/ BuxNfb7R44/4owrociO7hYD6ix99+e4BSvKC5c3baIYcGWQYmW9X9GYh5wFtnmILqrDm yx6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=OGEUSvE1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q3-20020a17090676c300b008e23e890059si5942180ejn.268.2023.03.05.20.10.29; Sun, 05 Mar 2023 20:10:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=OGEUSvE1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229870AbjCFEBQ (ORCPT <rfc822;toshivichauhan@gmail.com> + 99 others); Sun, 5 Mar 2023 23:01:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34332 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229780AbjCFEAp (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 5 Mar 2023 23:00:45 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9DC51F74B; Sun, 5 Mar 2023 20:00:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=4aGYejjB597mgiQZIbHKlJkYyDrDVt5t4jYswvUz7/M=; b=OGEUSvE17nE6gU+pUUq4hEqpoa Ludgfh7fJs61WUf5u/2uSYLU+lQ/wyKkfoyDx0FifHJhGiXPghTR7cbmPai7MVZOU9xOGp998pGma ro3fYBGeqoHPjxb0p7JKxpK2fPceIlBcp91CzdL1tKJHrp7aF2Nbpu45KnS8elOfWMQt+Jm4TiHjq vtySjfLRKe+E6dK5LIpyOBdHnMTEF63qYOsdak60oa3JiSkrLmoBUhXVpmDeu68E0Iuck5MV+RT6j sBhy/PWK6yiDgzPS6CmhtG1++1gu79FgwUWQRcjFDFVX23gFmmvbzIFlGUyQ5rYZ494EIP0mwqiWX Ilm8HaJg==; Received: from [2601:1c2:980:9ec0::df2f] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1pZ21i-00B9yD-Oc; Mon, 06 Mar 2023 04:00:42 +0000 From: Randy Dunlap <rdunlap@infradead.org> To: linux-kernel@vger.kernel.org Cc: Randy Dunlap <rdunlap@infradead.org>, Geert Uytterhoeven <geert@linux-m68k.org>, John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>, Yoshinori Sato <ysato@users.sourceforge.jp>, Rich Felker <dalias@libc.org>, linux-sh@vger.kernel.org, stable@vger.kernel.org Subject: [PATCH 6/7 v4] sh: fix Kconfig entry for NUMA => SMP Date: Sun, 5 Mar 2023 20:00:36 -0800 Message-Id: <20230306040037.20350-7-rdunlap@infradead.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230306040037.20350-1-rdunlap@infradead.org> References: <20230306040037.20350-1-rdunlap@infradead.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759590066753344676?= X-GMAIL-MSGID: =?utf-8?q?1759590066753344676?= |
Series |
sh: various doc, build, init fixes
|
|
Commit Message
Randy Dunlap
March 6, 2023, 4 a.m. UTC
Fix SUPERH builds that select SYS_SUPPORTS_NUMA but do not select
SYS_SUPPORTS_SMP and SMP.
kernel/sched/topology.c is only built for CONFIG_SMP and then the NUMA
code + data inside topology.c is only built when CONFIG_NUMA is
set/enabled, so these arch/sh/ configs need to select SMP and
SYS_SUPPORTS_SMP to build the NUMA support.
Fixes this build error in multiple SUPERH configs:
mm/page_alloc.o: In function `get_page_from_freelist':
page_alloc.c:(.text+0x2ca8): undefined reference to `node_reclaim_distance'
Fixes: 357d59469c11 ("sh: Tidy up dependencies for SH-2 build.")
Fixes: 9109a30e5a54 ("sh: add support for sh7366 processor")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Rich Felker <dalias@libc.org>
Cc: linux-sh@vger.kernel.org
Cc: stable@vger.kernel.org
---
v2: skipped
v3: skipped
v4: refresh & resend
arch/sh/Kconfig | 4 ++++
1 file changed, 4 insertions(+)
Comments
On Sun, 2023-03-05 at 20:00 -0800, Randy Dunlap wrote: > Fix SUPERH builds that select SYS_SUPPORTS_NUMA but do not select > SYS_SUPPORTS_SMP and SMP. > > kernel/sched/topology.c is only built for CONFIG_SMP and then the NUMA > code + data inside topology.c is only built when CONFIG_NUMA is > set/enabled, so these arch/sh/ configs need to select SMP and > SYS_SUPPORTS_SMP to build the NUMA support. > > Fixes this build error in multiple SUPERH configs: > > mm/page_alloc.o: In function `get_page_from_freelist': > page_alloc.c:(.text+0x2ca8): undefined reference to `node_reclaim_distance' > > Fixes: 357d59469c11 ("sh: Tidy up dependencies for SH-2 build.") > Fixes: 9109a30e5a54 ("sh: add support for sh7366 processor") > Signed-off-by: Randy Dunlap <rdunlap@infradead.org> > Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> > Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> > Cc: Yoshinori Sato <ysato@users.sourceforge.jp> > Cc: Rich Felker <dalias@libc.org> > Cc: linux-sh@vger.kernel.org > Cc: stable@vger.kernel.org > --- > v2: skipped > v3: skipped > v4: refresh & resend > > arch/sh/Kconfig | 4 ++++ > 1 file changed, 4 insertions(+) > > diff -- a/arch/sh/Kconfig b/arch/sh/Kconfig > --- a/arch/sh/Kconfig > +++ b/arch/sh/Kconfig > @@ -477,6 +477,8 @@ config CPU_SUBTYPE_SH7722 > select CPU_SHX2 > select ARCH_SHMOBILE > select ARCH_SPARSEMEM_ENABLE > + select SYS_SUPPORTS_SMP > + select SMP > select SYS_SUPPORTS_NUMA > select SYS_SUPPORTS_SH_CMT > select PINCTRL > @@ -487,6 +489,8 @@ config CPU_SUBTYPE_SH7366 > select CPU_SHX2 > select ARCH_SHMOBILE > select ARCH_SPARSEMEM_ENABLE > + select SYS_SUPPORTS_SMP > + select SMP > select SYS_SUPPORTS_NUMA > select SYS_SUPPORTS_SH_CMT > It seems that we need this change for these configurations as well: - config CPU_SHX3 - config CPU_SUBTYPE_SH7785 Although I can trigger a build failure for CPU_SUBTYPE_SH7785 only when setting CONFIG_NUMA=y: CC net/ipv6/addrconf_core.o mm/slab.c: In function 'slab_memory_callback': mm/slab.c:1127:23: error: implicit declaration of function 'init_cache_node_node'; did you mean 'drain_cache_node_node'? [-Werror=implicit-function-declaration] 1127 | ret = init_cache_node_node(nid); | ^~~~~~~~~~~~~~~~~~~~ | drain_cache_node_node I would expect this error to be reproducible for CPU_SHX3 as well when CONFIG_NUMA=y but CONFIG_SMP=n. But for some reason, I am not seeing the error then. Adrian
Hi Randy! On Sun, 2023-03-19 at 21:20 +0100, John Paul Adrian Glaubitz wrote: > On Sun, 2023-03-05 at 20:00 -0800, Randy Dunlap wrote: > > Fix SUPERH builds that select SYS_SUPPORTS_NUMA but do not select > > SYS_SUPPORTS_SMP and SMP. > > > > kernel/sched/topology.c is only built for CONFIG_SMP and then the NUMA > > code + data inside topology.c is only built when CONFIG_NUMA is > > set/enabled, so these arch/sh/ configs need to select SMP and > > SYS_SUPPORTS_SMP to build the NUMA support. > > > > Fixes this build error in multiple SUPERH configs: > > > > mm/page_alloc.o: In function `get_page_from_freelist': > > page_alloc.c:(.text+0x2ca8): undefined reference to `node_reclaim_distance' > > > > Fixes: 357d59469c11 ("sh: Tidy up dependencies for SH-2 build.") > > Fixes: 9109a30e5a54 ("sh: add support for sh7366 processor") > > Signed-off-by: Randy Dunlap <rdunlap@infradead.org> > > Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> > > Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> > > Cc: Yoshinori Sato <ysato@users.sourceforge.jp> > > Cc: Rich Felker <dalias@libc.org> > > Cc: linux-sh@vger.kernel.org > > Cc: stable@vger.kernel.org > > --- > > v2: skipped > > v3: skipped > > v4: refresh & resend > > > > arch/sh/Kconfig | 4 ++++ > > 1 file changed, 4 insertions(+) > > > > diff -- a/arch/sh/Kconfig b/arch/sh/Kconfig > > --- a/arch/sh/Kconfig > > +++ b/arch/sh/Kconfig > > @@ -477,6 +477,8 @@ config CPU_SUBTYPE_SH7722 > > select CPU_SHX2 > > select ARCH_SHMOBILE > > select ARCH_SPARSEMEM_ENABLE > > + select SYS_SUPPORTS_SMP > > + select SMP > > select SYS_SUPPORTS_NUMA > > select SYS_SUPPORTS_SH_CMT > > select PINCTRL > > @@ -487,6 +489,8 @@ config CPU_SUBTYPE_SH7366 > > select CPU_SHX2 > > select ARCH_SHMOBILE > > select ARCH_SPARSEMEM_ENABLE > > + select SYS_SUPPORTS_SMP > > + select SMP > > select SYS_SUPPORTS_NUMA > > select SYS_SUPPORTS_SH_CMT > > > > It seems that we need this change for these configurations as well: > > - config CPU_SHX3 > - config CPU_SUBTYPE_SH7785 > > Although I can trigger a build failure for CPU_SUBTYPE_SH7785 only when > setting CONFIG_NUMA=y: > > CC net/ipv6/addrconf_core.o > mm/slab.c: In function 'slab_memory_callback': > mm/slab.c:1127:23: error: implicit declaration of function 'init_cache_node_node'; did you mean 'drain_cache_node_node'? [-Werror=implicit-function-declaration] > 1127 | ret = init_cache_node_node(nid); > | ^~~~~~~~~~~~~~~~~~~~ > | drain_cache_node_node > > I would expect this error to be reproducible for CPU_SHX3 as well when > CONFIG_NUMA=y but CONFIG_SMP=n. But for some reason, I am not seeing > the error then. Can you make this change for config CPU_SUBTYPE_SH7785 as well? Then the change should be fine. Adrian
On 3/20/23 13:13, John Paul Adrian Glaubitz wrote: > Hi Randy! > > On Sun, 2023-03-19 at 21:20 +0100, John Paul Adrian Glaubitz wrote: >> On Sun, 2023-03-05 at 20:00 -0800, Randy Dunlap wrote: >>> Fix SUPERH builds that select SYS_SUPPORTS_NUMA but do not select >>> SYS_SUPPORTS_SMP and SMP. >>> >>> kernel/sched/topology.c is only built for CONFIG_SMP and then the NUMA >>> code + data inside topology.c is only built when CONFIG_NUMA is >>> set/enabled, so these arch/sh/ configs need to select SMP and >>> SYS_SUPPORTS_SMP to build the NUMA support. >>> >>> Fixes this build error in multiple SUPERH configs: >>> >>> mm/page_alloc.o: In function `get_page_from_freelist': >>> page_alloc.c:(.text+0x2ca8): undefined reference to `node_reclaim_distance' >>> >>> Fixes: 357d59469c11 ("sh: Tidy up dependencies for SH-2 build.") >>> Fixes: 9109a30e5a54 ("sh: add support for sh7366 processor") >>> Signed-off-by: Randy Dunlap <rdunlap@infradead.org> >>> Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> >>> Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> >>> Cc: Yoshinori Sato <ysato@users.sourceforge.jp> >>> Cc: Rich Felker <dalias@libc.org> >>> Cc: linux-sh@vger.kernel.org >>> Cc: stable@vger.kernel.org >>> --- >>> v2: skipped >>> v3: skipped >>> v4: refresh & resend >>> >>> arch/sh/Kconfig | 4 ++++ >>> 1 file changed, 4 insertions(+) >>> >>> diff -- a/arch/sh/Kconfig b/arch/sh/Kconfig >>> --- a/arch/sh/Kconfig >>> +++ b/arch/sh/Kconfig >>> @@ -477,6 +477,8 @@ config CPU_SUBTYPE_SH7722 >>> select CPU_SHX2 >>> select ARCH_SHMOBILE >>> select ARCH_SPARSEMEM_ENABLE >>> + select SYS_SUPPORTS_SMP >>> + select SMP >>> select SYS_SUPPORTS_NUMA >>> select SYS_SUPPORTS_SH_CMT >>> select PINCTRL >>> @@ -487,6 +489,8 @@ config CPU_SUBTYPE_SH7366 >>> select CPU_SHX2 >>> select ARCH_SHMOBILE >>> select ARCH_SPARSEMEM_ENABLE >>> + select SYS_SUPPORTS_SMP >>> + select SMP >>> select SYS_SUPPORTS_NUMA >>> select SYS_SUPPORTS_SH_CMT >>> >> >> It seems that we need this change for these configurations as well: >> >> - config CPU_SHX3 >> - config CPU_SUBTYPE_SH7785 >> >> Although I can trigger a build failure for CPU_SUBTYPE_SH7785 only when >> setting CONFIG_NUMA=y: >> >> CC net/ipv6/addrconf_core.o >> mm/slab.c: In function 'slab_memory_callback': >> mm/slab.c:1127:23: error: implicit declaration of function 'init_cache_node_node'; did you mean 'drain_cache_node_node'? [-Werror=implicit-function-declaration] >> 1127 | ret = init_cache_node_node(nid); >> | ^~~~~~~~~~~~~~~~~~~~ >> | drain_cache_node_node >> >> I would expect this error to be reproducible for CPU_SHX3 as well when >> CONFIG_NUMA=y but CONFIG_SMP=n. But for some reason, I am not seeing >> the error then. > > Can you make this change for config CPU_SUBTYPE_SH7785 as well? > > Then the change should be fine. Will do. Thanks.
diff -- a/arch/sh/Kconfig b/arch/sh/Kconfig --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig @@ -477,6 +477,8 @@ config CPU_SUBTYPE_SH7722 select CPU_SHX2 select ARCH_SHMOBILE select ARCH_SPARSEMEM_ENABLE + select SYS_SUPPORTS_SMP + select SMP select SYS_SUPPORTS_NUMA select SYS_SUPPORTS_SH_CMT select PINCTRL @@ -487,6 +489,8 @@ config CPU_SUBTYPE_SH7366 select CPU_SHX2 select ARCH_SHMOBILE select ARCH_SPARSEMEM_ENABLE + select SYS_SUPPORTS_SMP + select SMP select SYS_SUPPORTS_NUMA select SYS_SUPPORTS_SH_CMT