Skip to contentSkip to conversation

arch: include asm/cacheflush.h in asm/hugetlb.h

PATCH Applied Hugh Dickins 3 participants 6 messages Aug 14, 2023 – Aug 30, 2023

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

cover arch: include asm/cacheflush.h in asm/hugetlb.h

Three architectures are using PG_dcache_clean in their asm/hugetlb.h, but relying on accident to include the asm/cacheflush.h which defines it.

1/3 arm: include asm/cacheflush.h in asm/hugetlb.h 2/3 arm64: include asm/cacheflush.h in asm/hugetlb.h 3/3 riscv: include asm/cacheflush.h in asm/hugetlb.h

 arch/arm/include/asm/hugetlb.h   | 1 +
 arch/arm64/include/asm/hugetlb.h | 1 +
 arch/riscv/include/asm/hugetlb.h | 1 +
 3 files changed, 3 insertions(+)

Hugh

#1 lore raw

PATCH 1/3 arm: include asm/cacheflush.h in asm/hugetlb.h

PG_dcache_clean is used in asm/hugetlb.h but defined in asm/cacheflush.h:
builds rely on an accident of that being included via linux/mempolicy.h, but better include it directly (like arch/sh/include/asm/hugetlb.h does).

---
 arch/arm/include/asm/hugetlb.h | 1 +
 1 file changed, 1 insertion(+)
arch/arm/include/asm/hugetlb.h +1 -0
index d02d6ca88e92..a3a82b7158d4 100644
@@ -10,6 +10,7 @@
 #ifndef _ASM_ARM_HUGETLB_H
 #define _ASM_ARM_HUGETLB_H
 
+#include <asm/cacheflush.h>
 #include <asm/page.h>
 #include <asm/hugetlb-3level.h>
 #include <asm-generic/hugetlb.h>
Signature · 1 line
2.35.3
#2 lore raw

PATCH 2/3 arm64: include asm/cacheflush.h in asm/hugetlb.h

In reply to Hugh Dickins

PG_dcache_clean is used in asm/hugetlb.h but defined in asm/cacheflush.h:
builds rely on an accident of that being included via linux/mempolicy.h, but better include it directly (like arch/sh/include/asm/hugetlb.h does).

---
 arch/arm64/include/asm/hugetlb.h | 1 +
 1 file changed, 1 insertion(+)
arch/arm64/include/asm/hugetlb.h +1 -0
index a91d6219aa78..f43a38ac1779 100644
@@ -10,6 +10,7 @@
 #ifndef __ASM_HUGETLB_H
 #define __ASM_HUGETLB_H
 
+#include <asm/cacheflush.h>
 #include <asm/page.h>
 
 #ifdef CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION
Signature · 1 line
2.35.3
#3 lore raw

PATCH 3/3 riscv: include asm/cacheflush.h in asm/hugetlb.h

In reply to Hugh Dickins

PG_dcache_clean is used in asm/hugetlb.h but defined in asm/cacheflush.h:
builds rely on an accident of that being included via linux/mempolicy.h, but better include it directly (like arch/sh/include/asm/hugetlb.h does).

---
 arch/riscv/include/asm/hugetlb.h | 1 +
 1 file changed, 1 insertion(+)
arch/riscv/include/asm/hugetlb.h +1 -0
index ce1ebda1a49a..34e24f078cc1 100644
@@ -2,6 +2,7 @@
 #ifndef _ASM_RISCV_HUGETLB_H
 #define _ASM_RISCV_HUGETLB_H
 
+#include <asm/cacheflush.h>
 #include <asm/page.h>
 
 static inline void arch_clear_hugepage_flags(struct page *page)
Signature · 1 line
2.35.3
#4 lore raw
In reply to Hugh Dickins
This series was applied to riscv/linux.git (for-next) by Palmer Dabbelt <[email protected]>:

Hello:

This series was applied to riscv/linux.git (for-next) by Palmer Dabbelt <[email protected]>:

Quoted 8 lines · On Sun, 13 Aug 2023 21:50:34 -0700 (PDT) you wrote:

Three architectures are using PG_dcache_clean in their asm/hugetlb.h, but relying on accident to include the asm/cacheflush.h which defines it.

1/3 arm: include asm/cacheflush.h in asm/hugetlb.h 2/3 arm64: include asm/cacheflush.h in asm/hugetlb.h 3/3 riscv: include asm/cacheflush.h in asm/hugetlb.h

[...]

Here is the summary with links:
- [1/3] arm: include asm/cacheflush.h in asm/hugetlb.h (no matching commit)
- [2/3] arm64: include asm/cacheflush.h in asm/hugetlb.h (no matching commit)
- [3/3] riscv: include asm/cacheflush.h in asm/hugetlb.h

    https://git.kernel.org/riscv/c/3aaad36808b5

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
#5 lore raw

Re: (subset) [PATCH 0/3] arch: include asm/cacheflush.h in asm/hugetlb.h

In reply to Hugh Dickins
Quoted 8 lines · Hugh Dickins

Three architectures are using PG_dcache_clean in their asm/hugetlb.h, but relying on accident to include the asm/cacheflush.h which defines it.

1/3 arm: include asm/cacheflush.h in asm/hugetlb.h 2/3 arm64: include asm/cacheflush.h in asm/hugetlb.h 3/3 riscv: include asm/cacheflush.h in asm/hugetlb.h

[...]

Applied, thanks!

[3/3] riscv: include asm/cacheflush.h in asm/hugetlb.h

      https://git.kernel.org/palmer/c/3aaad36808b5

Best regards,

Signature · 1 line
Palmer Dabbelt <[email protected]>