linux-mips
[Top] [All Lists]

[PATCH] 16K page size in 32 bit kernel

To: Ralf Baechle <ralf@linux-mips.org>
Subject: [PATCH] 16K page size in 32 bit kernel
From: Dajie Tan <jiankemeng@gmail.com>
Date: Tue, 31 Jul 2007 17:09:51 +0400
Cc: linux-mips <linux-mips@linux-mips.org>
Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:received:date:from:to:cc:subject:message-id:mime-version:content-type:content-disposition:user-agent; b=JbShXYIrQPJLDgF9uhEKYZUcgtKUjZH+oQxZlRF01os42NjQ/dKiryyUvUXBhizrtNR4dJMhhUOauC1VIalVaiJ/0+OyBWzN0kDIAzmk8hCSRmsxD8eWkJ3qWHNBItlomifo3w3C28UtZJ8JUZYpaxUvyeCCCHQM052XKhnVQSc=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:date:from:to:cc:subject:message-id:mime-version:content-type:content-disposition:user-agent; b=CotNTZ2BoqGw9nlHA1A3JYk4fPqiid3AB+Btlhe2SpLX7bhVjVMoDe4HK+Lw3iTTK1ClLM4eU4QtElQFbYOZT+3PGfbXew7Ut52U4qATSKOgGKpX82uGp8X1Mx4Q/+LRiildYR8dlKcxt+pVbFlzxoNH/maCzJWLbGw9pbXHusg=
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.9i
32-bit Kernel for loongson2e currently use 16KB page size to avoid
cache alias problem.So, the definiton of PGDIR_SHIFT muse be 12+14.

Using 22 in 16K page size do not lead to a serious problem but the number
of pages allocated for page table is more than previous. (cat
/proc/vmstat | grep nr_page_table_pages)

It's been tested on FuLong mini PC(loongson2e inside).


Signed-off-by: Dajie Tan <jiankemeng@gmail.com>
---
 include/asm-mips/pgtable-32.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/asm-mips/pgtable-32.h b/include/asm-mips/pgtable-32.h
index 2fbd47e..8d34ebf 100644
--- a/include/asm-mips/pgtable-32.h
+++ b/include/asm-mips/pgtable-32.h
@@ -46,7 +46,7 @@ extern int add_temporary_entry(unsigned long entrylo0, 
unsigned long entrylo1,
 #ifdef CONFIG_64BIT_PHYS_ADDR
 #define PGDIR_SHIFT    21
 #else
-#define PGDIR_SHIFT    22
+#define PGDIR_SHIFT    (PAGE_SHIFT + (PAGE_SHIFT + PTE_ORDER - 2))
 #endif
 #define PGDIR_SIZE     (1UL << PGDIR_SHIFT)
 #define PGDIR_MASK     (~(PGDIR_SIZE-1))


<Prev in Thread] Current Thread [Next in Thread>