Skip to content

Commit 9a733dc

Browse files
pavelvkozlovvineetgarc
authored andcommitted
ARC: add hugetlb definitions
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 <[email protected]> Signed-off-by: Vineet Gupta <[email protected]>
1 parent 4eb69d0 commit 9a733dc

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

arch/arc/include/asm/hugepage.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@
1010
#include <linux/types.h>
1111
#include <asm-generic/pgtable-nopmd.h>
1212

13+
/*
14+
* Hugetlb definitions.
15+
*/
16+
#define HPAGE_SHIFT PMD_SHIFT
17+
#define HPAGE_SIZE (_AC(1, UL) << HPAGE_SHIFT)
18+
#define HPAGE_MASK (~(HPAGE_SIZE - 1))
19+
1320
static inline pte_t pmd_pte(pmd_t pmd)
1421
{
1522
return __pte(pmd_val(pmd));

0 commit comments

Comments
 (0)