[PATCH] powerpc: Enable CPU_FTR_NEED_COHERENT for MPC52xx
Kumar Gala
kumar.gala at freescale.com
Wed Mar 18 00:49:11 EST 2009
On Mar 17, 2009, at 8:45 AM, Grant Likely wrote:
> On Tue, Mar 17, 2009 at 6:10 AM, Kumar Gala
> <kumar.gala at freescale.com> wrote:
>> On Mar 16, 2009, at 11:43 PM, Grant Likely wrote:
>>> diff --git a/arch/powerpc/include/asm/cputable.h
>>> b/arch/powerpc/include/asm/cput
>>> index 4911104..48d7f5f 100644
>>> --- a/arch/powerpc/include/asm/cputable.h
>>> +++ b/arch/powerpc/include/asm/cputable.h
>>> @@ -348,8 +348,15 @@ extern const char *powerpc_base_platform;
>>> CPU_FTR_PPC_LE | CPU_FTR_NEED_PAIRED_STWCX)
>>> #define CPU_FTRS_82XX (CPU_FTR_COMMON | \
>>> CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB)
>>> +
>>> +#if defined(CONFIG_PPC_MPC52xx)
>>> +#define CPU_FTRS_G2_LE (CPU_FTR_COMMON | CPU_FTR_MAYBE_CAN_DOZE | \
>>> + CPU_FTR_USE_TB | CPU_FTR_MAYBE_CAN_NAP |
>>> CPU_FTR_NEED_COHERENT)
>>> +#else
>>> #define CPU_FTRS_G2_LE (CPU_FTR_COMMON | CPU_FTR_MAYBE_CAN_DOZE | \
>>> CPU_FTR_USE_TB | CPU_FTR_MAYBE_CAN_NAP)
>>> +#endif
>>> +
>>> #define CPU_FTRS_E300 (CPU_FTR_MAYBE_CAN_DOZE | \
>>> CPU_FTR_USE_TB | CPU_FTR_MAYBE_CAN_NAP | \
>>> CPU_FTR_COMMON)
>>
>> Doing this via a static CPU FTR fixup isn't really the best way to
>> handle
>> it. I was thinking about this the other day in my patch to
>> actually make
>> G2/e300 cores respect _PAGE_COHERENT. We really should set this
>> via a
>> platform fixup. Just not sure if that's soon enough.
>
> I agree, but as Ben pointed out last night on IRC, feature fixup
> (early_init) occurs well before platform probe time. Platform code
> cannot fix it up until someone does the work of making platform probe
> time earlier. It's non-trivial.
>
> However, I need to get a fix in for this ASAP, otherwise the 5200 will
> be broken in 2.6.29. I don't see this patch as a final solution, but
> it works as a stop-gap until platform probing can be reworked.
So for .29 lets just go with the easy solution of adding
CONFIG_PPC_MPC52xx to the list that set CPU_FTR_NEED_COHERENT (10x,
83xx, etc..).
- k
More information about the Linuxppc-dev
mailing list