Skip to contentSkip to conversation

[2.6.0] Huge TLB != 4M Fix

PATCH Ciaran McCreesh 2 participants 2 messages Dec 30, 2003

lore
Share & tools
lore
#0 lore raw

With 2.6.0 (plus Keith's patches) on sparc64, I get compile errors if CONFIG_HUGETLB_PAGE_SIZE is set to other than 4MB:

CC arch/sparc64/mm/generic.o
CC arch/sparc64/mm/hugetlbpage.o
arch/sparc64/mm/hugetlbpage.c: In function `set_huge_pte':
arch/sparc64/mm/hugetlbpage.c:130: error: `_PAGE_64K' undeclared (first use in this function) arch/sparc64/mm/hugetlbpage.c:130: error: (Each undeclared identifier is reported only once arch/sparc64/mm/hugetlbpage.c:130: error: for each function it appears in.) make[1]: *** [arch/sparc64/mm/hugetlbpage.o] Error 1
make: *** [arch/sparc64/mm] Error 2

The attached patch fixes this.

Signature · 3 lines
Ciaran McCreesh
Mail:    ciaranm at gentoo.org
Web:     http://dev.gentoo.org/~ciaranm
include/asm-sparc64/pgtable.h renamed from include/asm-sparc64/pgtable.h.orig +2 -2
@@ -145,9 +145,9 @@
 #if defined(CONFIG_HUGETLB_PAGE_SIZE_4MB)
 #define _PAGE_SZHUGE	_PAGE_SZ4MB
 #elif defined(CONFIG_HUGETLB_PAGE_SIZE_512K)
-#define _PAGE_SZHUGE	_PAGE_512K
+#define _PAGE_SZHUGE	_PAGE_SZ512K
 #elif defined(CONFIG_HUGETLB_PAGE_SIZE_64K)
-#define _PAGE_SZHUGE	_PAGE_64K
+#define _PAGE_SZHUGE	_PAGE_SZ64K
 #endif
 
 #define _PAGE_CACHE	(_PAGE_CP | _PAGE_CV)
#1 lore raw
Quoted 2 lines · On Tue, 30 Dec 2003 19:45:50 +0000 Ciaran McCreesh <[email protected]> wrote:

With 2.6.0 (plus Keith's patches) on sparc64, I get compile errors if CONFIG_HUGETLB_PAGE_SIZE is set to other than 4MB:

...

Quoted 1 line

The attached patch fixes this.

Patch applied, thanks Ciaran.