openrisc: include asm/page.h before folded pgtable headers
Subsystems (2)
Andrew Morton
maintainerPATCH 1/1 openrisc: include asm/page.h before folded pgtable headers
From: Andrew Morton <[email protected]>
Subject: openrisc: include asm/page.h before folded pgtable headers
Date: Fri, 23 Oct 2026 17:37:53 -0700
An OpenRISC allmodconfig build fails while compiling the DRM TTM KUnit helpers:
include/asm-generic/pgtable-nop4d.h:9:18: error:
unknown type name 'pgd_t'
The TTM header cleanup stopped including linux/pagemap.h from ttm_tt.h. The remaining ttm_caching.h include pulls in linux/pgtable.h, which reaches OpenRISC's asm/pgtable.h before asm/page.h has supplied the pgd_t definition.
Include asm/page.h ahead of the generic folded page-table headers. This restores the missing type definition and allows OpenRISC allmodconfig builds to get past this failure.
---
arch/openrisc/include/asm/pgtable.h | 1 + 1 file changed, 1 insertion(+)
arch/openrisc/include/asm/pgtable.h renamed from arch/openrisc/include/asm/pgtable.h~openrisc-include-asm-page-before-folded-pgtable-headers +1 -0
@@ -21,6 +21,7 @@#ifndef __ASM_OPENRISC_PGTABLE_H#define __ASM_OPENRISC_PGTABLE_H +#include <asm/page.h> #include <asm-generic/pgtable-nopmd.h> #ifndef __ASSEMBLER__
_
Stafford Horne
maintainerQuoted 10 lines · Andrew Morton
From: Andrew Morton <[email protected]>
Subject: openrisc: includeasm/page.hbefore folded pgtable headers
Date: Fri, 23 Oct 2026 17:37:53 -0700An OpenRISC allmodconfig build fails while compiling the DRM TTM KUnit helpers:
include/asm-generic/pgtable-nop4d.h:9:18: error:
unknown type name 'pgd_t'
Quoted 8 lines
The TTM header cleanup stopped including
linux/pagemap.hfromttm_tt.h. The remainingttm_caching.hinclude pulls inlinux/pgtable.h, which reaches OpenRISC'sasm/pgtable.hbeforeasm/page.hhas supplied thepgd_tdefinition.Include
asm/page.hahead of the generic folded page-table headers. This restores the missing type definition and allows OpenRISC allmodconfig builds to get past this failure.
Hi Andrew,
Thanks for this I will queue this.
-Stafford
Quoted 25 lines
Fixes 2854902575ac ("drm: Remove pagemap from ttm_tt.h header")Signed-off-by Andrew Morton <[email protected]>Reported-by kernel test robot <[email protected]>Cc Jonas Bonn <[email protected]>Cc Stefan Kristiansson <[email protected]>Cc Stafford Horne <[email protected]>Cc Matthew Wilcox (Oracle) <[email protected]>Cc Mark Brown <[email protected]>---
arch/openrisc/include/asm/pgtable.h | 1 + 1 file changed, 1 insertion(+)arch/openrisc/include/asm/pgtable.h renamed from arch/openrisc/include/asm/pgtable.h~openrisc-include-asm-page-before-folded-pgtable-headers +1
-0@@ -21,6 +21,7 @@#ifndef __ASM_OPENRISC_PGTABLE_H#define __ASM_OPENRISC_PGTABLE_H +#include <asm/page.h> #include <asm-generic/pgtable-nopmd.h> #ifndef __ASSEMBLER___
Quoted 16 lines · Stafford Horne
Quoted 15 lines · Andrew Morton
From: Andrew Morton <[email protected]>
Subject: openrisc: includeasm/page.hbefore folded pgtable headers
Date: Fri, 23 Oct 2026 17:37:53 -0700An OpenRISC allmodconfig build fails while compiling the DRM TTM KUnit helpers:
include/asm-generic/pgtable-nop4d.h:9:18: error:
unknown type name 'pgd_t'The TTM header cleanup stopped including
linux/pagemap.hfromttm_tt.h. The remainingttm_caching.hinclude pulls inlinux/pgtable.h, which reaches OpenRISC'sasm/pgtable.hbeforeasm/page.hhas supplied thepgd_tdefinition.
Quoted 7 lines
Quoted 3 lines
Include
asm/page.hahead of the generic folded page-table headers. This restores the missing type definition and allows OpenRISC allmodconfig builds to get past this failure.Hi Andrew,
Thanks for this I will queue this.
No, I'll take it.
Stafford Horne
maintainerQuoted 21 lines · Matthew Wilcox
Quoted 20 lines · Stafford Horne
Quoted 18 lines · Andrew Morton
From: Andrew Morton <[email protected]>
Subject: openrisc: includeasm/page.hbefore folded pgtable headers
Date: Fri, 23 Oct 2026 17:37:53 -0700An OpenRISC allmodconfig build fails while compiling the DRM TTM KUnit helpers:
include/asm-generic/pgtable-nop4d.h:9:18: error:
unknown type name 'pgd_t'The TTM header cleanup stopped including
linux/pagemap.hfromttm_tt.h. The remainingttm_caching.hinclude pulls inlinux/pgtable.h, which reaches OpenRISC'sasm/pgtable.hbeforeasm/page.hhas supplied thepgd_tdefinition.Include
asm/page.hahead of the generic folded page-table headers. This restores the missing type definition and allows OpenRISC allmodconfig builds to get past this failure.
Quoted 5 lines
Quoted 3 lines
Hi Andrew,
Thanks for this I will queue this.
No, I'll take it.
OK, thanks.