mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <ukleinek@kernel.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Gao Xiang <xiang@kernel.org>,
	 Michael Bommarito <michael.bommarito@gmail.com>,
	linux-m68k@lists.linux-m68k.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] m68k: Define NR_CPUS to 1
Date: Mon, 3 Aug 2026 10:56:38 +0200	[thread overview]
Message-ID: <anBXIAqwllKX-Sxx@monoceros> (raw)
In-Reply-To: <CAMuHMdVGKX=3cfOrLWp1uSHX76xf1-=C0+GVCXkA8JTqNPg-ew@mail.gmail.com>

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

On Mon, Aug 03, 2026 at 09:58:14AM +0200, Geert Uytterhoeven wrote:
> Hi Uwe,
> 
> Thanks for your patch!
> 
> On Fri, 31 Jul 2026 at 11:50, Uwe Kleine-König <ukleinek@kernel.org> wrote:
> > This fixes a Kconfig warning
> >
> >         fs/erofs/Kconfig:137:warning: range is invalid
> >
> > which originates from EROFS_FS_ZIP_LZMA_DEFAULT_MAX_STREAMS using
> > NR_CPUS which up to now didn't exist for ARCH=m68k. All other
> > architectures define this symbol, so fix the outlier.
> 
> Apart from the Kconfig warning, this also
>   1. Breaks pressing "ENTER" in "make oldconfig" to apply a sensible
>      default value, just repeating the question ad infinitum instead
>      (the default is 16),
>   2. "make olddefconfig" sets it to literal NR_CPUS, which is invalid, too.
> 
> > Fixes: c9b47e6b2311 ("erofs: cap LZMA stream pool size")
> > Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>
> 
> > --- a/arch/m68k/Kconfig.cpu
> > +++ b/arch/m68k/Kconfig.cpu
> > @@ -549,6 +549,10 @@ config CACHE_COPYBACK
> >  endchoice
> >  endif # HAVE_CACHE_CB
> >
> > +config NR_CPUS
> > +       int
> > +       default "1"
> 
> While this does fix the issues on m68k, I don't think this is the
> right fix:
>   - NR_CPUS depends on SMP on most architectures, so you do not get
>      the "range is invalid" warning on non-SMP, but NR_CPUS is zero.
>     Hence I managed to reproduce the two issues above (albeit 2 with
>     CONFIG_EROFS_FS_ZIP_LZMA_DEFAULT_MAX_STREAMS=0) with a non-SMP
>     ARM config.
>   - Kconfig logic using NR_CPUS typically includes a check for SMP, too.
> 
> So I think EROFS_FS_ZIP_LZMA_DEFAULT_MAX_STREAMS should be fixed
> instead.

Agreed, probably it should depend on SMP, too.

Thanks for your feedback
Uwe

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2026-08-03  8:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-31  9:49 Uwe Kleine-König
2026-08-03  7:58 ` Geert Uytterhoeven
2026-08-03  8:56   ` Uwe Kleine-König [this message]
2026-08-12 11:32     ` Geert Uytterhoeven

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=anBXIAqwllKX-Sxx@monoceros \
    --to=ukleinek@kernel.org \
    --cc=geert@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@lists.linux-m68k.org \
    --cc=michael.bommarito@gmail.com \
    --cc=xiang@kernel.org \
    /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

all inboxes | Powered by JetHome®