Message ID | 20230320231310.28841-1-rdunlap@infradead.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp1486912wrt; Mon, 20 Mar 2023 16:24:08 -0700 (PDT) X-Google-Smtp-Source: AK7set+utynzq7sMq+DhDWFB4gdfFMTCN21XBxu5VrEc0/ybGZxNPYeay1LoIERDYSAC13UlQs6D X-Received: by 2002:a17:90b:384e:b0:23f:2d4d:7f8c with SMTP id nl14-20020a17090b384e00b0023f2d4d7f8cmr407787pjb.4.1679354647851; Mon, 20 Mar 2023 16:24:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679354647; cv=none; d=google.com; s=arc-20160816; b=TNq4H3ehyXJlYiYdmY2B0hvo6DGibmF6IdzVZYyRRON+ru5YG9XpK0DWhcy1QLWydC Qjm4DbICG3URi7cq8T3S1NllN3ZLzZkcycZ/hl0wa42jfwfOBQO0r3jJg+pmNjeWy9gu stamTsRgnYy0uKo8iPmT7hnD33O1kkG6yqe6jD6Ymv26O9YtubxROEspnUDD5ZYAFFax F/vCPUXeistfm2QaynO9N0dbmN1AaGoDKUQpWoxIwcNTVycfecpha9pTD1riSrKjM8oK mVX6GfcKRYoLcL/Qxup/9x6QhlVKt4QnuLq8BG20VVH3VKyLOEvduXDqS+zbUHuyrFgB JMbQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=VBdK0/Y4JqBgPMxacPgxZ9ztvbW86iUY79ITNsMQ6C8=; b=m7PfN56HqXkFO/W6OLyYpwrCx8nTBJQLndrVbmKiIx+hSxXkCN+35227OXJY0VUiot KNJDdMYptLn7OhDnLBN92+SD4fG83qamiYvjycezyBfThoCmHLNq001yQdIDUdIx7dM5 CkncvPtzaOk91XmmEzF/IDxtSh0pCZX0cy/MIff6vIdFNXzMnOq+0YUZsY3gU9jPY5gJ kBrf4X5CAt3MaHGEvvwWKQIjDV83Rko8V/TYPh2epbeKlxNXoZ1SayoTqF8sh3yL+uwd XANm7mNcN63zAm68FSAU/1mSIhY/8Aj+Cs2eKqdWF49xML2wguJWDuWfnqXzeqQLbqea r3QA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=KeaDk1eT; 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 x65-20020a17090a6c4700b00233e9243c88si16864233pjj.187.2023.03.20.16.23.55; Mon, 20 Mar 2023 16:24:07 -0700 (PDT) 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=KeaDk1eT; 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 S230017AbjCTXNX (ORCPT <rfc822;pusanteemu@gmail.com> + 99 others); Mon, 20 Mar 2023 19:13:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229912AbjCTXNU (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 20 Mar 2023 19:13:20 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 85BD434C0C; Mon, 20 Mar 2023 16:13:14 -0700 (PDT) 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:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=VBdK0/Y4JqBgPMxacPgxZ9ztvbW86iUY79ITNsMQ6C8=; b=KeaDk1eTpGWhCEvi/fOy/KW+mV Yj1EzTN1s1jEKgM1aUneB5PVBdgtOLsO8O3e2TTwfWOggZd2TFr0D2XKquZtSIOnpfchSaif4+hCP RkACncjUU4NkgE8bJ5GXTk698BqcfOrpQRk6mQdlwkUajGCqsnXHiGWUBSkO2lTPJy/xC5SCkYN3u 73g2+E8HWFGKqSrlFsTZTeQpx8xWV8g1giW5efCg5Gwizm0HkkvxEFiJhXXWVHjySxnvkFOOtGY6h jJpXGi+X0dg/v5N6ZZA87/kFKQGqGqRBltNMbdjHh3c+XMdVpM8kNgl+jmJegRghVGzi/GwpsCT0r Bu4QGKBQ==; Received: from [2601:1c2:980:9ec0::21b4] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1peOgh-00Al4N-29; Mon, 20 Mar 2023 23:13:11 +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>, Kuninori Morimoto <morimoto.kuninori@renesas.com>, linux-sh@vger.kernel.org, stable@vger.kernel.org Subject: [PATCH 6/7 v5] sh: fix Kconfig entry for NUMA => SMP Date: Mon, 20 Mar 2023 16:13:10 -0700 Message-Id: <20230320231310.28841-1-rdunlap@infradead.org> X-Mailer: git-send-email 2.40.0 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?1760930978947475171?= |
Series |
None
|
|
Commit Message
Randy Dunlap
March 20, 2023, 11:13 p.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")
Fixes: 55ba99eb211a ("sh: Add support for SH7786 CPU subtype.")
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: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Cc: linux-sh@vger.kernel.org
Cc: stable@vger.kernel.org
---
v2: skipped
v3: skipped
v4: refresh & resend
v5: include CPU_SUBTYPE_SH7785 in this patch (Adrian)
arch/sh/Kconfig | 6 ++++++
1 file changed, 6 insertions(+)
Comments
Hi Randy, Thanks for your patch! On Tue, Mar 21, 2023 at 12:13 AM Randy Dunlap <rdunlap@infradead.org> wrote: > Fix SUPERH builds that select SYS_SUPPORTS_NUMA but do not select > SYS_SUPPORTS_SMP and SMP. Perhaps because these SoCs do not support 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") > Fixes: 55ba99eb211a ("sh: Add support for SH7786 CPU subtype.") > Signed-off-by: Randy Dunlap <rdunlap@infradead.org> > --- a/arch/sh/Kconfig > +++ b/arch/sh/Kconfig > @@ -442,6 +442,8 @@ config CPU_SUBTYPE_SH7785 > select CPU_SHX2 > select ARCH_SPARSEMEM_ENABLE > select SYS_SUPPORTS_NUMA > + select SYS_SUPPORTS_SMP > + select SMP SH7785 is single-core. > select PINCTRL > > config CPU_SUBTYPE_SH7786 > @@ -476,6 +478,8 @@ config CPU_SUBTYPE_SH7722 > select CPU_SHX2 > select ARCH_SHMOBILE > select ARCH_SPARSEMEM_ENABLE > + select SYS_SUPPORTS_SMP > + select SMP SH7722 is single-core. > select SYS_SUPPORTS_NUMA > select SYS_SUPPORTS_SH_CMT > select PINCTRL > @@ -486,6 +490,8 @@ config CPU_SUBTYPE_SH7366 > select CPU_SHX2 > select ARCH_SHMOBILE > select ARCH_SPARSEMEM_ENABLE > + select SYS_SUPPORTS_SMP > + select SMP Dunno about this one (no public info available). > select SYS_SUPPORTS_NUMA > select SYS_SUPPORTS_SH_CMT Wasn't this fixed by commit 61bb6cd2f765b90c ("mm: move node_reclaim_distance to fix NUMA without SMP") in v5.16? It is not sufficient, after that you run into: 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); which you reported before in https://lore.kernel.org/all/b5bdea22-ed2f-3187-6efe-0c72330270a4@infradead.org/ Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Hi Geert! On Tue, 2023-03-21 at 08:55 +0100, Geert Uytterhoeven wrote: > On Tue, Mar 21, 2023 at 12:13 AM Randy Dunlap <rdunlap@infradead.org> wrote: > > Fix SUPERH builds that select SYS_SUPPORTS_NUMA but do not select > > SYS_SUPPORTS_SMP and SMP. > > Perhaps because these SoCs do not support SMP? Well, there is actually a dual-core 7786 board available, see: > https://www.apnet.co.jp/product/superh/ap-sh4ad-0a.html Quoting: »The SH7786 is equipped with a dual-core SH-4A and has interfaces such as DDR3 SDRAM, PCI Express, USB, and display unit.« I seem to remember that Oleg Endo had such a dual-core SH4A board. Also, the Sega Saturn had two SH-2 CPUs: > https://en.wikipedia.org/wiki/Sega_Saturn#Technical_specifications > > 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") > > Fixes: 55ba99eb211a ("sh: Add support for SH7786 CPU subtype.") > > Signed-off-by: Randy Dunlap <rdunlap@infradead.org> > > > --- a/arch/sh/Kconfig > > +++ b/arch/sh/Kconfig > > @@ -442,6 +442,8 @@ config CPU_SUBTYPE_SH7785 > > select CPU_SHX2 > > select ARCH_SPARSEMEM_ENABLE > > select SYS_SUPPORTS_NUMA > > + select SYS_SUPPORTS_SMP > > + select SMP > > SH7785 is single-core. > > > select PINCTRL > > > > config CPU_SUBTYPE_SH7786 > > @@ -476,6 +478,8 @@ config CPU_SUBTYPE_SH7722 > > select CPU_SHX2 > > select ARCH_SHMOBILE > > select ARCH_SPARSEMEM_ENABLE > > + select SYS_SUPPORTS_SMP > > + select SMP > > SH7722 is single-core. > > > select SYS_SUPPORTS_NUMA > > select SYS_SUPPORTS_SH_CMT > > select PINCTRL > > @@ -486,6 +490,8 @@ config CPU_SUBTYPE_SH7366 > > select CPU_SHX2 > > select ARCH_SHMOBILE > > select ARCH_SPARSEMEM_ENABLE > > + select SYS_SUPPORTS_SMP > > + select SMP > > Dunno about this one (no public info available). > > > select SYS_SUPPORTS_NUMA > > select SYS_SUPPORTS_SH_CMT > > Wasn't this fixed by commit 61bb6cd2f765b90c ("mm: move > node_reclaim_distance to fix NUMA without SMP") in v5.16? > > It is not sufficient, after that you run into: > > 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); > > which you reported before in > https://lore.kernel.org/all/b5bdea22-ed2f-3187-6efe-0c72330270a4@infradead.org/ Without the patch, I am getting: CC fs/fat/nfs.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 with make sh7785lcr_defconfig and CONFIG_NUMA=y. With the patch, it builds fine for me. FWIW, I just realized we need this for config CPU_SUBTYPE_SH7786 as well. Adrian
Hi Adrian, On Tue, Mar 21, 2023 at 9:10 AM John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> wrote: > On Tue, 2023-03-21 at 08:55 +0100, Geert Uytterhoeven wrote: > > On Tue, Mar 21, 2023 at 12:13 AM Randy Dunlap <rdunlap@infradead.org> wrote: > > > Fix SUPERH builds that select SYS_SUPPORTS_NUMA but do not select > > > SYS_SUPPORTS_SMP and SMP. > > > > Perhaps because these SoCs do not support SMP? > > Well, there is actually a dual-core 7786 board available, see: > > > https://www.apnet.co.jp/product/superh/ap-sh4ad-0a.html > > Quoting: > > »The SH7786 is equipped with a dual-core SH-4A and has interfaces such as > DDR3 SDRAM, PCI Express, USB, and display unit.« > > I seem to remember that Oleg Endo had such a dual-core SH4A board. > > Also, the Sega Saturn had two SH-2 CPUs: > > > https://en.wikipedia.org/wiki/Sega_Saturn#Technical_specifications But these are not the Kconfig entries changed by Randy's patch. > > > 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") > > > Fixes: 55ba99eb211a ("sh: Add support for SH7786 CPU subtype.") > > > Signed-off-by: Randy Dunlap <rdunlap@infradead.org> > > > > > --- a/arch/sh/Kconfig > > > +++ b/arch/sh/Kconfig > > > @@ -442,6 +442,8 @@ config CPU_SUBTYPE_SH7785 > > > select CPU_SHX2 > > > select ARCH_SPARSEMEM_ENABLE > > > select SYS_SUPPORTS_NUMA > > > + select SYS_SUPPORTS_SMP > > > + select SMP > > > > SH7785 is single-core. > > > > > select PINCTRL > > > > > > config CPU_SUBTYPE_SH7786 > > > @@ -476,6 +478,8 @@ config CPU_SUBTYPE_SH7722 > > > select CPU_SHX2 > > > select ARCH_SHMOBILE > > > select ARCH_SPARSEMEM_ENABLE > > > + select SYS_SUPPORTS_SMP > > > + select SMP > > > > SH7722 is single-core. > > > > > select SYS_SUPPORTS_NUMA > > > select SYS_SUPPORTS_SH_CMT > > > select PINCTRL > > > @@ -486,6 +490,8 @@ config CPU_SUBTYPE_SH7366 > > > select CPU_SHX2 > > > select ARCH_SHMOBILE > > > select ARCH_SPARSEMEM_ENABLE > > > + select SYS_SUPPORTS_SMP > > > + select SMP > > > > Dunno about this one (no public info available). > > > > > select SYS_SUPPORTS_NUMA > > > select SYS_SUPPORTS_SH_CMT > > > > Wasn't this fixed by commit 61bb6cd2f765b90c ("mm: move > > node_reclaim_distance to fix NUMA without SMP") in v5.16? > > > > It is not sufficient, after that you run into: > > > > 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); > > > > which you reported before in > > https://lore.kernel.org/all/b5bdea22-ed2f-3187-6efe-0c72330270a4@infradead.org/ > > Without the patch, I am getting: > > CC fs/fat/nfs.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 Which is a different error than in this patch description? I am preparing a fix... Gr{oetje,eeting}s, Geert
On Tue, Mar 21, 2023 at 9:19 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote: > On Tue, Mar 21, 2023 at 9:10 AM John Paul Adrian Glaubitz > <glaubitz@physik.fu-berlin.de> wrote: > > On Tue, 2023-03-21 at 08:55 +0100, Geert Uytterhoeven wrote: > > > On Tue, Mar 21, 2023 at 12:13 AM Randy Dunlap <rdunlap@infradead.org> wrote: > > > > Fix SUPERH builds that select SYS_SUPPORTS_NUMA but do not select > > > > SYS_SUPPORTS_SMP and SMP. > > > > > > Perhaps because these SoCs do not support SMP? > > > > Well, there is actually a dual-core 7786 board available, see: > > > > > https://www.apnet.co.jp/product/superh/ap-sh4ad-0a.html > > > > Quoting: > > > > »The SH7786 is equipped with a dual-core SH-4A and has interfaces such as > > DDR3 SDRAM, PCI Express, USB, and display unit.« > > > > I seem to remember that Oleg Endo had such a dual-core SH4A board. > > > > Also, the Sega Saturn had two SH-2 CPUs: > > > > > https://en.wikipedia.org/wiki/Sega_Saturn#Technical_specifications > > But these are not the Kconfig entries changed by Randy's patch. > > > > > 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") > > > > Fixes: 55ba99eb211a ("sh: Add support for SH7786 CPU subtype.") > > > > Signed-off-by: Randy Dunlap <rdunlap@infradead.org> > > > > > > > --- a/arch/sh/Kconfig > > > > +++ b/arch/sh/Kconfig > > > > @@ -442,6 +442,8 @@ config CPU_SUBTYPE_SH7785 > > > > select CPU_SHX2 > > > > select ARCH_SPARSEMEM_ENABLE > > > > select SYS_SUPPORTS_NUMA > > > > + select SYS_SUPPORTS_SMP > > > > + select SMP > > > > > > SH7785 is single-core. > > > > > > > select PINCTRL > > > > > > > > config CPU_SUBTYPE_SH7786 > > > > @@ -476,6 +478,8 @@ config CPU_SUBTYPE_SH7722 > > > > select CPU_SHX2 > > > > select ARCH_SHMOBILE > > > > select ARCH_SPARSEMEM_ENABLE > > > > + select SYS_SUPPORTS_SMP > > > > + select SMP > > > > > > SH7722 is single-core. > > > > > > > select SYS_SUPPORTS_NUMA > > > > select SYS_SUPPORTS_SH_CMT > > > > select PINCTRL > > > > @@ -486,6 +490,8 @@ config CPU_SUBTYPE_SH7366 > > > > select CPU_SHX2 > > > > select ARCH_SHMOBILE > > > > select ARCH_SPARSEMEM_ENABLE > > > > + select SYS_SUPPORTS_SMP > > > > + select SMP > > > > > > Dunno about this one (no public info available). > > > > > > > select SYS_SUPPORTS_NUMA > > > > select SYS_SUPPORTS_SH_CMT > > > > > > Wasn't this fixed by commit 61bb6cd2f765b90c ("mm: move > > > node_reclaim_distance to fix NUMA without SMP") in v5.16? > > > > > > It is not sufficient, after that you run into: > > > > > > 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); > > > > > > which you reported before in > > > https://lore.kernel.org/all/b5bdea22-ed2f-3187-6efe-0c72330270a4@infradead.org/ > > > > Without the patch, I am getting: > > > > CC fs/fat/nfs.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 > > Which is a different error than in this patch description? > I am preparing a fix... https://lore.kernel.org/67261c513706241d479b8b4cf46eb4e6fb0417ba.1679387262.git.geert+renesas@glider.be Gr{oetje,eeting}s, Geert
On Mar 21, 2023, at 17:12, John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> wrote:
> Also, the Sega Saturn had two SH-2 CPUs
New hardware that runs linux is generally/all J2 SMP (dual core sh2 class).
J.
Hi Adrian, On Tue, Mar 21, 2023 at 9:10 AM John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> wrote: > On Tue, 2023-03-21 at 08:55 +0100, Geert Uytterhoeven wrote: > > On Tue, Mar 21, 2023 at 12:13 AM Randy Dunlap <rdunlap@infradead.org> wrote: > > > Fix SUPERH builds that select SYS_SUPPORTS_NUMA but do not select > > > SYS_SUPPORTS_SMP and SMP. > > > > Perhaps because these SoCs do not support SMP? > > Well, there is actually a dual-core 7786 board available, see: > > > https://www.apnet.co.jp/product/superh/ap-sh4ad-0a.html > > Quoting: > > »The SH7786 is equipped with a dual-core SH-4A and has interfaces such as > DDR3 SDRAM, PCI Express, USB, and display unit.« SH7786 is dual-core... > FWIW, I just realized we need this for config CPU_SUBTYPE_SH7786 as well. ... and CPU_SUBTYPE_SH7786 selects CPU_SHX3, which selects SYS_SUPPORTS_SMP and SYS_SUPPORTS_NUMA in turn. So everything is fine for SH7786. Gr{oetje,eeting}s, Geert
Hi Geert! On Tue, 2023-03-21 at 09:42 +0100, Geert Uytterhoeven wrote: > Hi Adrian, > > On Tue, Mar 21, 2023 at 9:10 AM John Paul Adrian Glaubitz > <glaubitz@physik.fu-berlin.de> wrote: > > On Tue, 2023-03-21 at 08:55 +0100, Geert Uytterhoeven wrote: > > > On Tue, Mar 21, 2023 at 12:13 AM Randy Dunlap <rdunlap@infradead.org> wrote: > > > > Fix SUPERH builds that select SYS_SUPPORTS_NUMA but do not select > > > > SYS_SUPPORTS_SMP and SMP. > > > > > > Perhaps because these SoCs do not support SMP? > > > > Well, there is actually a dual-core 7786 board available, see: > > > > > https://www.apnet.co.jp/product/superh/ap-sh4ad-0a.html > > > > Quoting: > > > > »The SH7786 is equipped with a dual-core SH-4A and has interfaces such as > > DDR3 SDRAM, PCI Express, USB, and display unit.« > > SH7786 is dual-core... > > > FWIW, I just realized we need this for config CPU_SUBTYPE_SH7786 as well. > > ... and CPU_SUBTYPE_SH7786 selects CPU_SHX3, which selects > SYS_SUPPORTS_SMP and SYS_SUPPORTS_NUMA in turn. > So everything is fine for SH7786. Yeah, this explains it then. Your new patch is definitely the better approach and I would prefer it over Randy's suggested change. Let's see what the mm maintainers have to say. Thanks, Adrian
Hi Adrian, On Tue, Mar 21, 2023 at 9:45 AM John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> wrote: > On Tue, 2023-03-21 at 09:42 +0100, Geert Uytterhoeven wrote: > > On Tue, Mar 21, 2023 at 9:10 AM John Paul Adrian Glaubitz > > <glaubitz@physik.fu-berlin.de> wrote: > > > On Tue, 2023-03-21 at 08:55 +0100, Geert Uytterhoeven wrote: > > > > On Tue, Mar 21, 2023 at 12:13 AM Randy Dunlap <rdunlap@infradead.org> wrote: > > > > > Fix SUPERH builds that select SYS_SUPPORTS_NUMA but do not select > > > > > SYS_SUPPORTS_SMP and SMP. > > > > > > > > Perhaps because these SoCs do not support SMP? > > > > > > Well, there is actually a dual-core 7786 board available, see: > > > > > > > https://www.apnet.co.jp/product/superh/ap-sh4ad-0a.html > > > > > > Quoting: > > > > > > »The SH7786 is equipped with a dual-core SH-4A and has interfaces such as > > > DDR3 SDRAM, PCI Express, USB, and display unit.« > > > > SH7786 is dual-core... > > > > > FWIW, I just realized we need this for config CPU_SUBTYPE_SH7786 as well. > > > > ... and CPU_SUBTYPE_SH7786 selects CPU_SHX3, which selects > > SYS_SUPPORTS_SMP and SYS_SUPPORTS_NUMA in turn. > > So everything is fine for SH7786. > > Yeah, this explains it then. Your new patch is definitely the better approach > and I would prefer it over Randy's suggested change. Let's see what the mm > maintainers have to say. I'm sure the missed condition was just an oversight, so I expect no objections. Gr{oetje,eeting}s, Geert
Hi Geert! On Tue, 2023-03-21 at 09:47 +0100, Geert Uytterhoeven wrote: > > Yeah, this explains it then. Your new patch is definitely the better approach > > and I would prefer it over Randy's suggested change. Let's see what the mm > > maintainers have to say. > > I'm sure the missed condition was just an oversight, so I expect no > objections. And you were right, of course. We can drop Randy's patch then, but I'll pick up all the other patches tomorrow when I prepare my for-next tree for 6.4. Adrian
On 3/21/23 08:15, John Paul Adrian Glaubitz wrote: > Hi Geert! > > On Tue, 2023-03-21 at 09:47 +0100, Geert Uytterhoeven wrote: >>> Yeah, this explains it then. Your new patch is definitely the better approach >>> and I would prefer it over Randy's suggested change. Let's see what the mm >>> maintainers have to say. >> >> I'm sure the missed condition was just an oversight, so I expect no >> objections. > > And you were right, of course. We can drop Randy's patch then, but I'll pick up > all the other patches tomorrow when I prepare my for-next tree for 6.4. Right, drop it. Thanks, everyone.
diff -- a/arch/sh/Kconfig b/arch/sh/Kconfig --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig @@ -442,6 +442,8 @@ config CPU_SUBTYPE_SH7785 select CPU_SHX2 select ARCH_SPARSEMEM_ENABLE select SYS_SUPPORTS_NUMA + select SYS_SUPPORTS_SMP + select SMP select PINCTRL config CPU_SUBTYPE_SH7786 @@ -476,6 +478,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 @@ -486,6 +490,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