Re: [PATCH] ARC: add hugetlb definitions

2023-12-13 Thread Vineet Gupta



On 12/13/23 07:07, Pavel Kozlov wrote:
> From: Pavel Kozlov 
>
> Add hugetlb definitions if THP enabled. ARC doesn't support
> HugeTLB FS but it supports THP. Some kernel code such as pagemap
> uses hugetlb definitions with THP.
>
> This patch fixes ARC build issue (HPAGE_SIZE undeclared error) with
> TRANSPARENT_HUGEPAGE enabled.
>
> Signed-off-by: Pavel Kozlov 

Added to for-curr.

I'll pile this will rest of patches for some linux-next soaking.

Thx,
-Vineet

___
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc


[PATCH] ARC: add hugetlb definitions

2023-12-13 Thread Pavel Kozlov
From: Pavel Kozlov 

Add hugetlb definitions if THP enabled. ARC doesn't support
HugeTLB FS but it supports THP. Some kernel code such as pagemap
uses hugetlb definitions with THP.

This patch fixes ARC build issue (HPAGE_SIZE undeclared error) with
TRANSPARENT_HUGEPAGE enabled.

Signed-off-by: Pavel Kozlov 
---
 arch/arc/include/asm/hugepage.h | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/arch/arc/include/asm/hugepage.h b/arch/arc/include/asm/hugepage.h
index ef8d4166370c..8a2441670a8f 100644
--- a/arch/arc/include/asm/hugepage.h
+++ b/arch/arc/include/asm/hugepage.h
@@ -10,6 +10,13 @@
 #include 
 #include 
 
+/*
+ * Hugetlb definitions.
+ */
+#define HPAGE_SHIFTPMD_SHIFT
+#define HPAGE_SIZE (_AC(1, UL) << HPAGE_SHIFT)
+#define HPAGE_MASK (~(HPAGE_SIZE - 1))
+
 static inline pte_t pmd_pte(pmd_t pmd)
 {
return __pte(pmd_val(pmd));
-- 
2.25.1


___
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc