* [PATCH] m68k: Define NR_CPUS to 1
@ 2026-07-31 9:49 Uwe Kleine-König
2026-08-03 7:58 ` Geert Uytterhoeven
0 siblings, 1 reply; 4+ messages in thread
From: Uwe Kleine-König @ 2026-07-31 9:49 UTC (permalink / raw)
To: Geert Uytterhoeven, Gao Xiang, Michael Bommarito; +Cc: linux-m68k, linux-kernel
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.
Fixes: c9b47e6b2311 ("erofs: cap LZMA stream pool size")
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>
---
arch/m68k/Kconfig.cpu | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/m68k/Kconfig.cpu b/arch/m68k/Kconfig.cpu
index 148f8a79d206..5a58cc13229e 100644
--- 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"
+
# Coldfire cores that do not have a data cache configured can do coherent DMA.
config COLDFIRE_COHERENT_DMA
bool
base-commit: 95d6a9ccef99117115e41e9adb271243bd5e985b
--
2.55.0.11.g153666a7d9bb
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] m68k: Define NR_CPUS to 1
2026-07-31 9:49 [PATCH] m68k: Define NR_CPUS to 1 Uwe Kleine-König
@ 2026-08-03 7:58 ` Geert Uytterhoeven
2026-08-03 8:56 ` Uwe Kleine-König
0 siblings, 1 reply; 4+ messages in thread
From: Geert Uytterhoeven @ 2026-08-03 7:58 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: Gao Xiang, Michael Bommarito, linux-m68k, linux-kernel
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.
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] m68k: Define NR_CPUS to 1
2026-08-03 7:58 ` Geert Uytterhoeven
@ 2026-08-03 8:56 ` Uwe Kleine-König
2026-08-12 11:32 ` Geert Uytterhoeven
0 siblings, 1 reply; 4+ messages in thread
From: Uwe Kleine-König @ 2026-08-03 8:56 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: Gao Xiang, Michael Bommarito, linux-m68k, linux-kernel
[-- 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 --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] m68k: Define NR_CPUS to 1
2026-08-03 8:56 ` Uwe Kleine-König
@ 2026-08-12 11:32 ` Geert Uytterhoeven
0 siblings, 0 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2026-08-12 11:32 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: Gao Xiang, Michael Bommarito, linux-m68k, linux-kernel
On Mon, 3 Aug 2026 at 10:56, Uwe Kleine-König <ukleinek@kernel.org> wrote:
> On Mon, Aug 03, 2026 at 09:58:14AM +0200, Geert Uytterhoeven wrote:
> > 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.
Since the underlying issue can be fixed by depending on SMP, but the
warning would still be there[1], I decided to bite the bullet and take
your patch as a fix for v7.2.
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
i.e. will queue in the m68k tree for v7.2.
[1] https://lore.kernel.org/CAMuHMdWQLwgShMK7G-6soiZxtRPYWLizBLRdouwxFUcFXUJM-Q@mail.gmail.com
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-08-12 11:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-31 9:49 [PATCH] m68k: Define NR_CPUS to 1 Uwe Kleine-König
2026-08-03 7:58 ` Geert Uytterhoeven
2026-08-03 8:56 ` Uwe Kleine-König
2026-08-12 11:32 ` Geert Uytterhoeven
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®