linux-mips
[Top] [All Lists]

Re: [PATCH] MIPS: fix tc_id calculation

To: RongQing Li <roy.qing.li@gmail.com>
Subject: Re: [PATCH] MIPS: fix tc_id calculation
From: Hillf Danton <dhillf@gmail.com>
Date: Sun, 29 Jul 2012 09:19:23 +0800
Cc: linux-mips@linux-mips.org, linux-kernel@vger.kernel.org, Ralf Baechle <ralf@linux-mips.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=w/fxVMJTjCrLL5JlIZYI4UrXwkzQUAUCVxpwEUgC4ro=; b=STzRT6Rez3VYdQqyUBe/Sr96OpWUbVnI12xO8bcR6TXRcKvmpJnG2IXRPzhcTM2IR2 fszftlZUYOyD3YuaTNqCLTMDqHjniv+hsXV3L5lUCHxxOd2VtvPciq55U5BiVWLy9OF+ QZrbqV4E6FSeB/fIS8xv2ZDGQ4UXjNKau204sz+XMolVBsIik+j4T67swp7/ageP6T1G UG775vOHWGeP/w9nCruE3Ij5LbQwwcADvBbdTCtbIkSeOb5/+LZMPeIArRUuOsK8acnA e94u8CvoNG0hgSk1BCAbZLFVTkEywfGD1me47w/kXOobI0flfSZn7If4FD32HgEH83UH 1LSQ==
In-reply-to: <CAJFZqHxBE6wc2hJd=mKfx9D59S73qxJZFvbfqgmLkWZvtR7f_A@mail.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> <CAJFZqHxBE6wc2hJd=mKfx9D59S73qxJZFvbfqgmLkWZvtR7f_A@mail.gmail.com>
Sender: linux-mips-bounce@linux-mips.org
On Sat, Jul 28, 2012 at 5:08 PM, RongQing Li <roy.qing.li@gmail.com> wrote:
> 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>
>> ---

Good catch ;)

Thanks,
               Hillf


>>  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
>>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>
>

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