Subject: Re: How to dynamically disable/enable CPU features?

From: Benjamin Herrenschmidt <[email-masked]>
Date: Sat, 23 Feb 2008 09:26:19 +1100

On Thu, 2008-02-21 at 21:07 +0100, Gerhard Pircher wrote:
> Hi,
> 
> I'm wondering how to disable or enable CPU features based on the board the
> kernel is running on. In my case I want to disable the
> CPU_FTR_NEED_COHERENT flag for 74xx CPUs, because it locks up the machine.
> I tried to clear the flag in the platform's *_probe() function with the
> following code:
> 
> cur_cpu_spec->cpu_features &= ~CPU_FTR_NEED_COHERENT;

That works on 64 bits but unfortunately not on 32 bits. This is a
longstanding issue that we need to fix. ie. we need to move the
fixups later in the boot process (if possible put them in the 
same place for 32 and 64 bits), though that needs to be done very
carefully, making sure nothing that requires those fixups ends up
happening before they happen as a result of the move.

Ben.