lkml.org 
[lkml]   [2012]   [Jul]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [PATCH] MIPS: fix tc_id calculation
    From
    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
    >


    \
     
     \ /
      Last update: 2012-07-28 11:41    [W:0.024 / U:0.072 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site