> -----Original Message-----
> From: Wood Scott-B07421
> Sent: Tuesday, July 30, 2013 1:27 AM
> To: Wang Dongsheng-B40534
> Cc: b...@kernel.crashing.org; ga...@kernel.crashing.org; Zhao Chenhui-
> B35336; Li Yang-R58472; Wang Dongsheng-B40534
> Subject: Re: [RFC 2/2] powerpc/cputable: add wait feature for CPU kernel
> features
> 
> On 07/10/2013 03:27:56 AM, Dongsheng Wang wrote:
> > From: Wang Dongsheng <dongsheng.w...@freescale.com>
> >
> > Signed-off-by: Wang Dongsheng <dongsheng.w...@freescale.com>
> >
> > diff --git a/arch/powerpc/include/asm/cputable.h
> > b/arch/powerpc/include/asm/cputable.h
> > index 6f3887d..0a8d0cb 100644
> > --- a/arch/powerpc/include/asm/cputable.h
> > +++ b/arch/powerpc/include/asm/cputable.h
> > @@ -138,6 +138,7 @@ extern const char *powerpc_base_platform;
> >  #define CPU_FTR_NOEXECUTE          ASM_CONST(0x10000000)
> >  #define CPU_FTR_INDEXED_DCR                ASM_CONST(0x20000000)
> >  #define CPU_FTR_EMB_HV                     ASM_CONST(0x40000000)
> > +#define CPU_FTR_CAN_WAIT           ASM_CONST(0x80000000)
> 
> Note that this is the last 32-bit CPU feature flag; it's time to start
> thinking about other mechanisms.  We should probably reserve feature
> flags for things that need to use code patching due to being on a
> performance critical path, and move other things into struct cpu_spec.
> CPU_FTR_CAN_WAIT seems like a good candidate to be moved.
> 
First of all, why should I do, I need to distinguish between the core, which
is to support the wait instruction. The CPU_FTR_CAN_WAIT looks easy.

How to fix this problem:
1/ I can drop this cpu feature, and move it into struct cpu_spec.
Add a pm_feature in struct cpu_spec? like,

struct cpu_spec {
        ...
        unsigned long pm_features;
        ...
}

2/ Drop this cpu feature, using CPU_FTRS_E6500/CPU_FTRS_E5500.. to distinguish 
wait or doze/nap.
Like,

CPU_FTRS_E500/CPU_FTRS_E500_2 support doze/nap.

CPU_FTRS_E500MC/CPU_FTRS_E5500/CPU_FTRS_E6500 support wait.

If using this method, inside the cpuidle driver needs to do a lot of judgment. 
So I'm not sure this
is a very good solution.

Thanks.
- dongsheng

_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Reply via email to