linux-mips
[Top] [All Lists]

[PATCH 04/10] MIPS: Netlogic: Split XLP L1 i-cache among threads

To: linux-mips@linux-mips.org, ralf@linux-mips.org
Subject: [PATCH 04/10] MIPS: Netlogic: Split XLP L1 i-cache among threads
From: "Jayachandran C" <jchandra@broadcom.com>
Date: Mon, 14 Jan 2013 21:41:56 +0530
Cc: "Jayachandran C" <jchandra@broadcom.com>
In-reply-to: <1358179922-26663-1-git-send-email-jchandra@broadcom.com>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
References: <1358179922-26663-1-git-send-email-jchandra@broadcom.com>
Sender: linux-mips-bounce@linux-mips.org
Since we now use r4k cache code for Netlogic XLP, it is
better to split L1 icache among the active threads, so that
threads won't step on each other while flushing icache.

The L1 dcache is already split among the threads in the core.

Signed-off-by: Jayachandran C <jchandra@broadcom.com>
---
 .../mips/include/asm/netlogic/xlp-hal/cpucontrol.h |    2 ++
 arch/mips/netlogic/common/smpboot.S                |    6 ++++++
 2 files changed, 8 insertions(+)

diff --git a/arch/mips/include/asm/netlogic/xlp-hal/cpucontrol.h 
b/arch/mips/include/asm/netlogic/xlp-hal/cpucontrol.h
index 7b63a6b..6d2e58a 100644
--- a/arch/mips/include/asm/netlogic/xlp-hal/cpucontrol.h
+++ b/arch/mips/include/asm/netlogic/xlp-hal/cpucontrol.h
@@ -46,6 +46,8 @@
 #define CPU_BLOCKID_FPU                9
 #define CPU_BLOCKID_MAP                10
 
+#define ICU_DEFEATURE          0x100
+
 #define LSU_DEFEATURE          0x304
 #define LSU_DEBUG_ADDR         0x305
 #define LSU_DEBUG_DATA0                0x306
diff --git a/arch/mips/netlogic/common/smpboot.S 
b/arch/mips/netlogic/common/smpboot.S
index a0b7487..d772a87 100644
--- a/arch/mips/netlogic/common/smpboot.S
+++ b/arch/mips/netlogic/common/smpboot.S
@@ -69,6 +69,12 @@
 #endif
        mtcr    t1, t0
 
+       li      t0, ICU_DEFEATURE
+       mfcr    t1, t0
+       ori     t1, 0x1000      /* Enable Icache partitioning */
+       mtcr    t1, t0
+
+
 #ifdef XLP_AX_WORKAROUND
        li      t0, SCHED_DEFEATURE
        lui     t1, 0x0100      /* Disable BRU accepting ALU ops */
-- 
1.7.9.5



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