Skip to contentSkip to conversation

linux-next: build failure after merge of the kbuild tree

PATCH Stephen Rothwell 2 participants 2 messages Oct 14, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi all,

After merging the kbuild tree, today's linux-next build (i386 defconfig) failed like this:

In file included from arch/x86/kernel/head_32.S:29:
arch/x86/include/asm/pgtable_32.h:68:5: error: "PTRS_PER_PMD" is not defined, evaluates to 0 [-Werror=undef]
68 | #if PTRS_PER_PMD > 1

      |     ^~~~~~~~~~~~

cc1: all warnings being treated as errors

Exposed by commit

0a7606a9832a ("kbuild: move -Wundef from KBUILD_CFLAGS to KBUILD_CPPFLAGS")

I have no idea what the root cause is. :-(

It is a great pity that this commit was not in linux-next before the merge window opened. :-(

I have applied the following hack for today.

From: Stephen Rothwell <[email protected]>
Date: Fri, 14 Oct 2022 12:34:34 +1100
Subject: [PATCH] i386: hack for "kbuild: move -Wundef from KBUILD_CFLAGS to KBUILD_CPPFLAGS"

---
 arch/x86/include/asm/pgtable_32.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/include/asm/pgtable_32.h +1 -1
index 7c9c968a42ef..0f3f186ca140 100644
@@ -65,7 +65,7 @@ do {						\
  * With PAE paging (PTRS_PER_PMD > 1), we allocate PTRS_PER_PGD == 4 pages for
  * the PMD's in addition to the pages required for the last level pagetables.
  */
-#if PTRS_PER_PMD > 1
+#if defined(PTRS_PER_PMD) && (PTRS_PER_PMD > 1)
 #define PAGE_TABLE_SIZE(pages) (((pages) / PTRS_PER_PMD) + PTRS_PER_PGD)
 #else
 #define PAGE_TABLE_SIZE(pages) ((pages) / PTRS_PER_PGD)
Signature · 5 lines
2.35.1

-- 
Cheers,
Stephen Rothwell
#1 lore raw
Quoted 12 lines · Stephen Rothwell

Hi all,

After merging the kbuild tree, today's linux-next build (i386 defconfig) failed like this:

In file included from arch/x86/kernel/head_32.S:29:
arch/x86/include/asm/pgtable_32.h:68:5: error: "PTRS_PER_PMD" is not defined, evaluates to 0 [-Werror=undef]
68 | #if PTRS_PER_PMD > 1

      |     ^~~~~~~~~~~~

cc1: all warnings being treated as errors

Quoted 8 lines

Exposed by commit

0a7606a9832a ("kbuild: move -Wundef from KBUILD_CFLAGS to KBUILD_CPPFLAGS")

I have no idea what the root cause is. :-(

It is a great pity that this commit was not in linux-next before the merge window opened. :-(

Sorry for the annoyance again.

I gave up this patch for now.

I will drop it and need to sort out warnings.

Quoted 31 lines

I have applied the following hack for today.

From: Stephen Rothwell <[email protected]>
Date: Fri, 14 Oct 2022 12:34:34 +1100
Subject: [PATCH] i386: hack for "kbuild: move -Wundef from KBUILD_CFLAGS to KBUILD_CPPFLAGS"

---
 arch/x86/include/asm/pgtable_32.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/include/asm/pgtable_32.h +1 -2
index 7c9c968a42ef..0f3f186ca140 100644
@@ -65,7 +65,7 @@ do {                                          \
  * With PAE paging (PTRS_PER_PMD > 1), we allocate PTRS_PER_PGD == 4 pages for
  * the PMD's in addition to the pages required for the last level pagetables.
  */
-#if PTRS_PER_PMD > 1
+#if defined(PTRS_PER_PMD) && (PTRS_PER_PMD > 1)
 #define PAGE_TABLE_SIZE(pages) (((pages) / PTRS_PER_PMD) + PTRS_PER_PGD)
 #else
 #define PAGE_TABLE_SIZE(pages) ((pages) / PTRS_PER_PGD)
--

2.35.1

--
Cheers,
Stephen Rothwell

Signature · 2 lines
Best Regards
Masahiro Yamada