linux-mips
[Top] [All Lists]

Re: [PATCH] MIPS: fix tc_id calculation

To: linux-mips@linux-mips.org
Subject: Re: [PATCH] MIPS: fix tc_id calculation
From: RongQing Li <roy.qing.li@gmail.com>
Date: Sat, 28 Jul 2012 17:08:59 +0800
Cc: linux-kernel@vger.kernel.org
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=z7SkNGRZ70BVnzB7iFrNqvOiYYMEflKFV9Uo5+7Cbjw=; b=Y45NFkQzlrHGdERa87NXE7vIvEFpSPx6r6wciu/jOV+YRTCSC5j+fn1+yFAVI+5tBt 0k7VOnsgjwwT0DfddlDMmFaTsXlaDewSJReQUNv9LE0T9cv0sopIj5ecRyScWCsFdIqG 73eBi4nZ56iSsO7nZouufmeScHgCKuaEePBhkClUthns6HLg8++JxiXpAjjsPdIdU2if JOmLTY+53ehCcBgsi4uujh31YGmLe0PVCQvO+ko9JSz5KqC0xin1pOQHXMqmXp2gyLbM qTol0g84cgM3yJc9Zxrt4nLvAPQM9G4ZJm0A136qjZWsAZnnJ8QW2eO323YVYi7jG4Tn Rzyw==
In-reply-to: <1341203670-17544-1-git-send-email-roy.qing.li@gmail.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: <1341203670-17544-1-git-send-email-roy.qing.li@gmail.com>
Sender: linux-mips-bounce@linux-mips.org
Any advice

2012/7/2  <roy.qing.li@gmail.com>:
> From: RongQing.Li <roy.qing.li@gmail.com>
>
> Now the tc_id is:
>   (read_c0_tcbind() >> TCBIND_CURTC_SHIFT) & TCBIND_CURTC;
> After substitute macro:
>   (read_c0_tcbind() >> 21) & ((0xff) << 21)
> It should be:
>   (read_c0_tcbind() & ((0xff)<< 21)) >>21
>
> Signed-off-by: RongQing.Li <roy.qing.li@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 e7e03ec..afc379c 100644
> --- a/arch/mips/kernel/smp-cmp.c
> +++ b/arch/mips/kernel/smp-cmp.c
> @@ -102,7 +102,7 @@ static void cmp_init_secondary(void)
>         c->vpe_id = (read_c0_tcbind() >> TCBIND_CURVPE_SHIFT) & TCBIND_CURVPE;
>  #endif
>  #ifdef CONFIG_MIPS_MT_SMTC
> -       c->tc_id  = (read_c0_tcbind() >> TCBIND_CURTC_SHIFT) & TCBIND_CURTC;
> +       c->tc_id  = (read_c0_tcbind() & TCBIND_CURTC) >> TCBIND_CURTC_SHIFT;
>  #endif
>  }
>
> --
> 1.7.1
>

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