Re: include/linux/slab.h:663:78: error: subscripted value is neither array nor pointer nor vector
From: Geert Uytterhoeven
Date: Mon Jul 22 2024 - 03:49:03 EST
Hi Vlastimil,
On Mon, Jul 22, 2024 at 9:15 AM Vlastimil Babka <vbabka@xxxxxxx> wrote:
> On 7/19/24 10:02 PM, kernel test robot wrote:
> > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > head: 4305ca0087dd99c3c3e0e2ac8a228b7e53a21c78
> > commit: 72e0fe2241ce113cbba339ca8c2450b167774530 mm/slab: Introduce kmem_buckets typedef
> > date: 2 weeks ago
> > config: m68k-alldefconfig (https://download.01.org/0day-ci/archive/20240720/202407200330.Mgxnq2Dq-lkp@xxxxxxxxx/config)
> > compiler: m68k-linux-gcc (GCC) 14.1.0
> > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240720/202407200330.Mgxnq2Dq-lkp@xxxxxxxxx/reproduce)
> >
> > If you fix the issue in a separate patch/commit (i.e. not just a new version of
> > the same patch/commit), kindly add following tags
> > | Reported-by: kernel test robot <lkp@xxxxxxxxx>
> > | Closes: https://lore.kernel.org/oe-kbuild-all/202407200330.Mgxnq2Dq-lkp@xxxxxxxxx/
> >
> > All errors (new ones prefixed by >>):
>
> Hm the new error ettributed to slab seems just a consequence of the broken
> PAGE_SHIFT? Although it's not listed here in the errors for some reason, I
> assume without PAGE_SHIFT we don't have KMALLOC_SHIFT_HIGH thus we don't
> have kmem_buckets typedef and thus kmalloc_caches is who knows what and thus
> doesn't look like an array? And the broken PAGE_SHIFT has to be cause by
> something else.
>
> > arch/m68k/include/asm/page.h:10:25: error: 'CONFIG_PAGE_SHIFT' undeclared here (not in a function); did you mean 'CONFIG_LOG_BUF_SHIFT'?
> > 10 | #define PAGE_SHIFT CONFIG_PAGE_SHIFT
> > | ^~~~~~~~~~~~~~~~~
It's a known issue since commit 5394f1e9b687bcf2 ("arch: define
CONFIG_PAGE_SIZE_*KB on all architectures"): m68k-alldefconfig does
not select any CPU types, hence no MMU type, and as a consequence no
page size is selected.
Arnd and I couldn't come up with a good solution to enforce a valid config,
so this is still broken...
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx
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