[Top] [All Lists]

[PATCH 1/2] Loongson: disable PAGE_SIZE_4KB

To: Ralf Baechle <>
Subject: [PATCH 1/2] Loongson: disable PAGE_SIZE_4KB
From: Wu Zhangjin <>
Date: Tue, 1 Dec 2009 14:55:25 +0800
Cc:,, Wu Zhangjin <>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer; bh=FaHKPCCGS+EkoEUOTtJEUisoHXUNm02T3M6l+h9WLWo=; b=QrfxaWLm6LxXaq6ZYLKOlIO5GQZZ9+ClH1J/5qGX4gadf3WmMeuhGEHBj9ORBPaRyU zz3RsfQYzFCsEC7y37L43sAjwJOMluUp5lqBa3mb0aA/CQt33QJDKYuODPkTQnoxo/bJ ITrNd7gBCy1oXZgJIWSIQ5cjgJv0VR2IiP2MY=
Domainkey-signature: a=rsa-sha1; c=nofws;; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=FjJWjTf24Wu4kPAylt4bgnRTw1u0xYrrYE7MRKhtrIq4RCHqMV4pqd9Aqf1UNEy/uU doa8S2QWqbiweZW1ScSJhQKyowX9dJGR1FwunhG2Nawhy66KbpKGk0ouWTcwkeCD/e9o F/hnOgEz2STxO+xFM/4z1bmXAVruhjcKCHxm4=
Original-recipient: rfc822;
From: Wu Zhangjin <>

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 <>
 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
         This option select the standard 4kB Linux page size.  On some
         R3000-family processors this is the only available page size.  Using

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