linux-mips
[Top] [All Lists]

[PATCH] MIPS:CMP Fix physical core number calculation logic

To: ralf@linux-mips.org
Subject: [PATCH] MIPS:CMP Fix physical core number calculation logic
From: jerin jacob <jerinjacobk@gmail.com>
Date: Thu, 11 Oct 2012 22:18:51 +0530
Cc: jerin jacob <jerinjacobk@gmail.com>, linux-mips@linux-mips.org
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer; bh=4yfvNuu3eLDjb6r1Mgsm2GKXDVyUW55XZy91JSgDuYU=; b=i8PNhGsrKvbi7BxQlojsCqrVr4bHeM1wLoV8Xu66HjVrJE6aIbdo4FabKJa8NwSgvH m7WhgwCJPuVt8UW05DI4ZFAh8u8ig5DpYeyHCivYO6kWjUxFly/+jBvP09hLzLLixLsw MmpocIFY1BRgZQudTf8ZlVl71h7UPNjHq4/sWSzVk04TY+luEo9FteXL+Lzg5UeNdaUi tRJVapM8hmqB4ycfpY9WEhhkg4COx5th1HUg2pTMaXcl130UsGSTOin1HKLQycrWxNuH qHhTsB66xRM1FW/fFcTcQvXrFplW6uBx6l0qxkmHSAwSvfzqaIGq/FXGGClgpRGJLpyK +A1A==
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>
Sender: linux-mips-bounce@linux-mips.org
CPUNum Field in EBase register is 10bit wide, so after 1 bit right shift, mask
value should be 0x1ff

Signed-off-by: jerin jacob <jerinjacobk@gmail.com>
---
 arch/mips/kernel/smp-cmp.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/mips/kernel/smp-cmp.c b/arch/mips/kernel/smp-cmp.c
index afc379c..06cd0c6 100644
--- a/arch/mips/kernel/smp-cmp.c
+++ b/arch/mips/kernel/smp-cmp.c
@@ -97,7 +97,7 @@ static void cmp_init_secondary(void)
 
        /* Enable per-cpu interrupts: platform specific */
 
-       c->core = (read_c0_ebase() >> 1) & 0xff;
+       c->core = (read_c0_ebase() >> 1) & 0x1ff;
 #if defined(CONFIG_MIPS_MT_SMP) || defined(CONFIG_MIPS_MT_SMTC)
        c->vpe_id = (read_c0_tcbind() >> TCBIND_CURVPE_SHIFT) & TCBIND_CURVPE;
 #endif
-- 
1.7.6.5


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