public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: kernel test robot <lkp@intel.com>,
	Vincenzo Frascino <vincenzo.frascino@arm.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	x86@kernel.org, Arnd Bergmann <arnd@arndb.de>,
	Geert Uytterhoeven <geert@linux-m68k.org>
Subject: Re: [tip:timers/vdso 11/13] include/vdso/page.h:15:39: error: 'CONFIG_PAGE_SHIFT' undeclared here (not in a function); did you mean 'CONFIG_LOG_BUF_SHIFT'?
Date: Tue, 29 Oct 2024 22:18:56 +0100	[thread overview]
Message-ID: <87ttcuzjy7.ffs@tglx> (raw)
In-Reply-To: <202410290639.TBG289SO-lkp@intel.com>

On Tue, Oct 29 2024 at 06:38, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers/vdso
> head:   d4a65302dd849fade9e2ca712826c35b8d068ecb
> commit: efe8419ae78d65e83edc31aad74b605c12e7d60c [11/13] vdso: Introduce vdso/page.h
> config: m68k-alldefconfig (https://download.01.org/0day-ci/archive/20241029/202410290639.TBG289SO-lkp@intel.com/config)
> compiler: m68k-linux-gcc (GCC) 14.1.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241029/202410290639.TBG289SO-lkp@intel.com/reproduce)

>      6	
>      7	/*
>      8	 * PAGE_SHIFT determines the page size.
>      9	 *
>     10	 * Note: This definition is required because PAGE_SHIFT is used
>     11	 * in several places throuout the codebase.
>     12	 */
>   > 13	#define PAGE_SHIFT      CONFIG_PAGE_SHIFT
>     14	
>   > 15	#define PAGE_SIZE	(_AC(1,UL) << CONFIG_PAGE_SHIFT)
>     16	

That's actually not the culprit. The problem exists in mainline too. The
actual root cause is:

  5394f1e9b687 ("arch: define CONFIG_PAGE_SIZE_*KB on all architectures")

The config has no CONFIG_PAGE_SHIFT because nothing selects a page size. The
the original code had:

if defined(CONFIG_SUN3) || defined(CONFIG_COLDFIRE)
#define PAGE_SHIFT     13
#else
#define PAGE_SHIFT     12
#endif                        

But the Kconfig magic changes made this depend on various other things.

The patch below cures it, but it needs an eyeball from Geert.

Thanks,

        tglx
---
diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig
index cc26df907bfe..6f50fdc4dff2 100644
--- a/arch/m68k/Kconfig
+++ b/arch/m68k/Kconfig
@@ -85,15 +85,12 @@ config MMU
 
 config MMU_MOTOROLA
 	bool
-	select HAVE_PAGE_SIZE_4KB
 
 config MMU_COLDFIRE
-	select HAVE_PAGE_SIZE_8KB
 	bool
 
 config MMU_SUN3
 	bool
-	select HAVE_PAGE_SIZE_8KB
 	depends on MMU && !MMU_MOTOROLA && !MMU_COLDFIRE
 
 config ARCH_SUPPORTS_KEXEC
diff --git a/arch/m68k/Kconfig.cpu b/arch/m68k/Kconfig.cpu
index c777a129768a..4d16215e7e45 100644
--- a/arch/m68k/Kconfig.cpu
+++ b/arch/m68k/Kconfig.cpu
@@ -21,6 +21,8 @@ choice
 config M68KCLASSIC
 	bool "Classic M68K CPU family support"
 	select HAVE_ARCH_PFN_VALID
+	select HAVE_PAGE_SIZE_4KB if !SUN3
+	select HAVE_PAGE_SIZE_8KB if SUN3
 
 config COLDFIRE
 	bool "Coldfire CPU family support"
@@ -30,7 +32,7 @@ config COLDFIRE
 	select GENERIC_CSUM
 	select GPIOLIB
 	select HAVE_LEGACY_CLK
-	select HAVE_PAGE_SIZE_8KB if !MMU
+	select HAVE_PAGE_SIZE_8KB
 
 endchoice
 
@@ -46,7 +48,6 @@ config M68000
 	select GENERIC_CSUM
 	select CPU_NO_EFFICIENT_FFS
 	select HAVE_ARCH_HASH
-	select HAVE_PAGE_SIZE_4KB
 	select LEGACY_TIMER_TICK
 	help
 	  The Freescale (was Motorola) 68000 CPU is the first generation of

  reply	other threads:[~2024-10-29 21:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-28 22:38 [tip:timers/vdso 11/13] include/vdso/page.h:15:39: error: 'CONFIG_PAGE_SHIFT' undeclared here (not in a function); did you mean 'CONFIG_LOG_BUF_SHIFT'? kernel test robot
2024-10-29 21:18 ` Thomas Gleixner [this message]
2024-10-29 22:05   ` Arnd Bergmann
2024-10-29 23:45     ` Thomas Gleixner
2024-10-30  8:49     ` Geert Uytterhoeven
2024-10-30  9:05       ` Arnd Bergmann

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=87ttcuzjy7.ffs@tglx \
    --to=tglx@linutronix.de \
    --cc=arnd@arndb.de \
    --cc=geert@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=vincenzo.frascino@arm.com \
    --cc=x86@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