linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] Loongson: disable PAGE_SIZE_4KB
@ 2009-12-01  6:55 Wu Zhangjin
  2009-12-01 15:58 ` Ralf Baechle
  0 siblings, 1 reply; 2+ messages in thread
From: Wu Zhangjin @ 2009-12-01  6:55 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: linux-mips, zhangfx, Wu Zhangjin

From: Wu Zhangjin <wuzhangjin@gmail.com>

Currently, with PAGE_SIZE_4KB, the kernel for loongson will hang on:

Kernel panic - not syncing: Attempted to kill init!

The possible reason is the cache aliases problem:

Loongson 2F has 64kb, 4 way L1 Cache, the way size is 16kb, which is
bigger then 4kb. so, If using 4kb page size, there is cache aliases
problem(Documentation/cachetlb.txt), to avoid such problem, we may need
extra cache flushing. but with 16kb page size, there is no cache aliases
problem and no corresponding operations needed to cope with that
problem, so, it's better to disable 4kb page size directly before the
above problem is solved.

Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
---
 arch/mips/Kconfig |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index b03af82..8bf36d2 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -1510,6 +1510,7 @@ choice
 
 config PAGE_SIZE_4KB
 	bool "4kB"
+	depends on !CPU_LOONGSON2
 	help
 	 This option select the standard 4kB Linux page size.  On some
 	 R3000-family processors this is the only available page size.  Using
-- 
1.6.2.1

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

* Re: [PATCH 1/2] Loongson: disable PAGE_SIZE_4KB
  2009-12-01  6:55 [PATCH 1/2] Loongson: disable PAGE_SIZE_4KB Wu Zhangjin
@ 2009-12-01 15:58 ` Ralf Baechle
  0 siblings, 0 replies; 2+ messages in thread
From: Ralf Baechle @ 2009-12-01 15:58 UTC (permalink / raw)
  To: Wu Zhangjin; +Cc: linux-mips, zhangfx

On Tue, Dec 01, 2009 at 02:55:25PM +0800, Wu Zhangjin wrote:
> From: Wu Zhangjin <wuzhangjin@gmail.com>
> Date:   Tue,  1 Dec 2009 14:55:25 +0800
> To: Ralf Baechle <ralf@linux-mips.org>
> Cc: linux-mips@linux-mips.org, zhangfx@lemote.com,
> 	Wu Zhangjin <wuzhangjin@gmail.com>
> Subject: [PATCH 1/2] Loongson: disable PAGE_SIZE_4KB
> 
> From: Wu Zhangjin <wuzhangjin@gmail.com>
> 
> Currently, with PAGE_SIZE_4KB, the kernel for loongson will hang on:
> 
> Kernel panic - not syncing: Attempted to kill init!
> 
> The possible reason is the cache aliases problem:
> 
> Loongson 2F has 64kb, 4 way L1 Cache, the way size is 16kb, which is
> bigger then 4kb. so, If using 4kb page size, there is cache aliases
> problem(Documentation/cachetlb.txt), to avoid such problem, we may need
> extra cache flushing. but with 16kb page size, there is no cache aliases
> problem and no corresponding operations needed to cope with that
> problem, so, it's better to disable 4kb page size directly before the
> above problem is solved.
> 
> Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>

Applied - though I'm not so sure if I can get this one to Linus as
close to a release as we are now.

Thanks!

  Ralf

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

end of thread, other threads:[~2009-12-01 15:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-01  6:55 [PATCH 1/2] Loongson: disable PAGE_SIZE_4KB Wu Zhangjin
2009-12-01 15:58 ` Ralf Baechle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).