Skip to contentSkip to conversation

openrisc: include asm/page.h before folded pgtable headers

PATCH In review Andrew Morton 3 participants 4 messages Oct 24 – Nov 1

Subsystems (2)
lore
Share & tools
lore

Andrew Morton

author maintainer
#0 lore raw

PATCH 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.

Fixes 2854902575ac ("drm: Remove pagemap from ttm_tt.h header")
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__

_

maintainer
#1 lore raw
Quoted 10 lines · Andrew Morton

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'

Quoted 8 lines

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.

Hi Andrew,

Thanks for this I will queue this.

-Stafford

Quoted 25 lines
Fixes 2854902575ac ("drm: Remove pagemap from ttm_tt.h header")
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__

_

#2 lore raw
Quoted 16 lines · Stafford Horne
Quoted 15 lines · Andrew Morton

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.

Quoted 7 lines
Quoted 3 lines

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.

Hi Andrew,

Thanks for this I will queue this.

No, I'll take it.

maintainer
#3 lore raw
Quoted 21 lines · Matthew Wilcox
Quoted 20 lines · Stafford Horne
Quoted 18 lines · Andrew Morton

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.

Quoted 5 lines
Quoted 3 lines

Hi Andrew,

Thanks for this I will queue this.

No, I'll take it.

OK, thanks.