All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v14 08/11] powerpc: mm: Add pud_pfn() stub
  2025-04-11  5:43 [PATCH v14 00/11] Support page table check on PowerPC Andrew Donnellan
@ 2025-04-11  5:43   ` Andrew Donnellan
  0 siblings, 0 replies; 3+ messages in thread
From: Andrew Donnellan @ 2025-04-11  5:43 UTC (permalink / raw)
  To: linuxppc-dev
  Cc: x86, linux-mm, linux-riscv, linux-arm-kernel, linux-kernel,
	pasha.tatashin, sweettea-kernel, christophe.leroy

From: Rohan McLure <rmclure@linux.ibm.com>

The page table check feature requires that pud_pfn() be defined
on each consuming architecture. Since only 64-bit, Book3S platforms
allow for hugepages at this upper level, and since the calling code is
gated by a call to pud_user_accessible_page(), which will return zero,
include this stub as a BUILD_BUG().

Signed-off-by: Rohan McLure <rmclure@linux.ibm.com>
Reviewed-by: Pasha Tatashin <pasha.tatashin@soleen.com>
Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>
---
 arch/powerpc/include/asm/pgtable.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/powerpc/include/asm/pgtable.h b/arch/powerpc/include/asm/pgtable.h
index 2f72ad885332..bb43e4f46367 100644
--- a/arch/powerpc/include/asm/pgtable.h
+++ b/arch/powerpc/include/asm/pgtable.h
@@ -215,6 +215,15 @@ static inline bool arch_supports_memmap_on_memory(unsigned long vmemmap_size)
 
 #endif /* CONFIG_PPC64 */
 
+#ifndef pud_pfn
+#define pud_pfn pud_pfn
+static inline int pud_pfn(pud_t pud)
+{
+	BUILD_BUG();
+	return 0;
+}
+#endif
+
 #endif /* __ASSEMBLY__ */
 
 #endif /* _ASM_POWERPC_PGTABLE_H */
-- 
2.49.0



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH v14 08/11] powerpc: mm: Add pud_pfn() stub
@ 2025-04-11  5:43   ` Andrew Donnellan
  0 siblings, 0 replies; 3+ messages in thread
From: Andrew Donnellan @ 2025-04-11  5:43 UTC (permalink / raw)
  To: linuxppc-dev
  Cc: x86, linux-mm, linux-riscv, linux-arm-kernel, linux-kernel,
	pasha.tatashin, sweettea-kernel, christophe.leroy

From: Rohan McLure <rmclure@linux.ibm.com>

The page table check feature requires that pud_pfn() be defined
on each consuming architecture. Since only 64-bit, Book3S platforms
allow for hugepages at this upper level, and since the calling code is
gated by a call to pud_user_accessible_page(), which will return zero,
include this stub as a BUILD_BUG().

Signed-off-by: Rohan McLure <rmclure@linux.ibm.com>
Reviewed-by: Pasha Tatashin <pasha.tatashin@soleen.com>
Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>
---
 arch/powerpc/include/asm/pgtable.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/powerpc/include/asm/pgtable.h b/arch/powerpc/include/asm/pgtable.h
index 2f72ad885332..bb43e4f46367 100644
--- a/arch/powerpc/include/asm/pgtable.h
+++ b/arch/powerpc/include/asm/pgtable.h
@@ -215,6 +215,15 @@ static inline bool arch_supports_memmap_on_memory(unsigned long vmemmap_size)
 
 #endif /* CONFIG_PPC64 */
 
+#ifndef pud_pfn
+#define pud_pfn pud_pfn
+static inline int pud_pfn(pud_t pud)
+{
+	BUILD_BUG();
+	return 0;
+}
+#endif
+
 #endif /* __ASSEMBLY__ */
 
 #endif /* _ASM_POWERPC_PGTABLE_H */
-- 
2.49.0


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v14 08/11] powerpc: mm: Add pud_pfn() stub
@ 2025-04-12  9:50 kernel test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2025-04-12  9:50 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp

:::::: 
:::::: Manual check reason: "__compiletime_assert_NNN"
:::::: 

BCC: lkp@intel.com
CC: llvm@lists.linux.dev
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <20250411054354.511145-9-ajd@linux.ibm.com>
References: <20250411054354.511145-9-ajd@linux.ibm.com>
TO: Andrew Donnellan <ajd@linux.ibm.com>
TO: linuxppc-dev@lists.ozlabs.org
CC: x86@kernel.org
CC: linux-mm@kvack.org
CC: linux-riscv@lists.infradead.org
CC: linux-arm-kernel@lists.infradead.org
CC: linux-kernel@vger.kernel.org
CC: pasha.tatashin@soleen.com
CC: sweettea-kernel@dorminy.me
CC: christophe.leroy@csgroup.eu

Hi Andrew,

kernel test robot noticed the following build errors:

[auto build test ERROR on powerpc/next]
[also build test ERROR on powerpc/fixes akpm-mm/mm-everything arm64/for-next/core tip/x86/core linus/master v6.15-rc1 next-20250411]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Andrew-Donnellan/mm-page_table_check-Reinstate-address-parameter-in-__-page_table_check_pud_set/20250411-134526
base:   https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
patch link:    https://lore.kernel.org/r/20250411054354.511145-9-ajd%40linux.ibm.com
patch subject: [PATCH v14 08/11] powerpc: mm: Add pud_pfn() stub
:::::: branch date: 28 hours ago
:::::: commit date: 28 hours ago
config: powerpc64-randconfig-003-20250412 (https://download.01.org/0day-ci/archive/20250412/202504121736.QD3fqVR7-lkp@intel.com/config)
compiler: clang version 21.0.0git (https://github.com/llvm/llvm-project f819f46284f2a79790038e1f6649172789734ae8)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250412/202504121736.QD3fqVR7-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/r/202504121736.QD3fqVR7-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from mm/memory.c:42:
   In file included from include/linux/kernel_stat.h:8:
   In file included from include/linux/interrupt.h:11:
   In file included from include/linux/hardirq.h:11:
   In file included from arch/powerpc/include/asm/hardirq.h:6:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:12:
   In file included from arch/powerpc/include/asm/io.h:24:
   In file included from include/linux/mm.h:30:
   In file included from include/linux/pgtable.h:6:
>> arch/powerpc/include/asm/pgtable.h:222:2: error: call to '__compiletime_assert_357' declared with 'error' attribute: BUILD_BUG failed
     222 |         BUILD_BUG();
         |         ^
   include/linux/build_bug.h:59:21: note: expanded from macro 'BUILD_BUG'
      59 | #define BUILD_BUG() BUILD_BUG_ON_MSG(1, "BUILD_BUG failed")
         |                     ^
   include/linux/build_bug.h:39:37: note: expanded from macro 'BUILD_BUG_ON_MSG'
      39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
         |                                     ^
   include/linux/compiler_types.h:557:2: note: expanded from macro 'compiletime_assert'
     557 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |         ^
   include/linux/compiler_types.h:545:2: note: expanded from macro '_compiletime_assert'
     545 |         __compiletime_assert(condition, msg, prefix, suffix)
         |         ^
   include/linux/compiler_types.h:538:4: note: expanded from macro '__compiletime_assert'
     538 |                         prefix ## suffix();                             \
         |                         ^
   <scratch space>:100:1: note: expanded from here
     100 | __compiletime_assert_357
         | ^
   1 error generated.


vim +222 arch/powerpc/include/asm/pgtable.h

368a0590d954a6 Aneesh Kumar K.V 2023-07-25  217  
18d2c68702b64d Rohan McLure     2025-04-11  218  #ifndef pud_pfn
18d2c68702b64d Rohan McLure     2025-04-11  219  #define pud_pfn pud_pfn
18d2c68702b64d Rohan McLure     2025-04-11  220  static inline int pud_pfn(pud_t pud)
18d2c68702b64d Rohan McLure     2025-04-11  221  {
18d2c68702b64d Rohan McLure     2025-04-11 @222  	BUILD_BUG();
18d2c68702b64d Rohan McLure     2025-04-11  223  	return 0;
18d2c68702b64d Rohan McLure     2025-04-11  224  }
18d2c68702b64d Rohan McLure     2025-04-11  225  #endif
18d2c68702b64d Rohan McLure     2025-04-11  226  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-04-12  9:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-12  9:50 [PATCH v14 08/11] powerpc: mm: Add pud_pfn() stub kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2025-04-11  5:43 [PATCH v14 00/11] Support page table check on PowerPC Andrew Donnellan
2025-04-11  5:43 ` [PATCH v14 08/11] powerpc: mm: Add pud_pfn() stub Andrew Donnellan
2025-04-11  5:43   ` Andrew Donnellan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.