* Re: [PATCH] MIPS: fix tc_id calculation
[not found] <1341203670-17544-1-git-send-email-roy.qing.li@gmail.com>
@ 2012-07-28 9:08 ` RongQing Li
2012-07-29 1:19 ` Hillf Danton
0 siblings, 1 reply; 2+ messages in thread
From: RongQing Li @ 2012-07-28 9:08 UTC (permalink / raw)
To: linux-mips; +Cc: linux-kernel
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
>
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] MIPS: fix tc_id calculation
2012-07-28 9:08 ` [PATCH] MIPS: fix tc_id calculation RongQing Li
@ 2012-07-29 1:19 ` Hillf Danton
0 siblings, 0 replies; 2+ messages in thread
From: Hillf Danton @ 2012-07-29 1:19 UTC (permalink / raw)
To: RongQing Li; +Cc: linux-mips, linux-kernel, Ralf Baechle
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/
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-07-29 1:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <1341203670-17544-1-git-send-email-roy.qing.li@gmail.com>
2012-07-28 9:08 ` [PATCH] MIPS: fix tc_id calculation RongQing Li
2012-07-29 1:19 ` Hillf Danton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).