Skip to content

Commit 70bd68d

Browse files
committed
parisc: Prepare for Block-TLB support on 32-bit kernel
Change HUGEPAGE_SIZE to become 4 MB on 32-bit kernels, which leads that kernel code and kernel data will start on 4 MB boundaries. Although a 32-bit kernel does not support huge pages, most machines have support for Block-TLBs (BTLB) which allow to configure the system to use large pages (block TLBs) to minimize the TLB contention. This is done through calls to PDC and the 32-bit kernel can then call BTLB PDC functions to tell the machine to optimize the TLBs. Signed-off-by: Helge Deller <deller@gmx.de>
1 parent 3f09138 commit 70bd68d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

arch/parisc/kernel/asm-offsets.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,8 @@ int main(void)
275275
* and kernel data on physical huge pages */
276276
#ifdef CONFIG_HUGETLB_PAGE
277277
DEFINE(HUGEPAGE_SIZE, 1UL << REAL_HPAGE_SHIFT);
278+
#elif !defined(CONFIG_64BIT)
279+
DEFINE(HUGEPAGE_SIZE, 4*1024*1024);
278280
#else
279281
DEFINE(HUGEPAGE_SIZE, PAGE_SIZE);
280282
#endif

0 commit comments

Comments
 (0)