Linux MIPS Architecture development
 help / color / mirror / Atom feed
* [PATCH] 16K page size in 32 bit kernel
@ 2007-07-31 13:09 Dajie Tan
  2007-07-31  9:37 ` Songmao Tian
  2007-07-31 10:00 ` Ralf Baechle
  0 siblings, 2 replies; 7+ messages in thread
From: Dajie Tan @ 2007-07-31 13:09 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: linux-mips


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))

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-08-01  0:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-31 13:09 [PATCH] 16K page size in 32 bit kernel Dajie Tan
2007-07-31  9:37 ` Songmao Tian
2007-07-31  9:37   ` Songmao Tian
2007-07-31 10:00 ` Ralf Baechle
2007-07-31 13:49   ` Songmao Tian
2007-07-31 20:45     ` Ralf Baechle
2007-08-01  0:47       ` Songmao Tian

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox