[PATCH 1/2] powerpc: Add new CPU feature: CPU_FTR_UNALIGNED_LD_STD

Paul Mackerras paulus at samba.org
Wed Oct 29 09:05:49 EST 2008


Kumar Gala writes:

> I'm asking if we can come up with a better solution than using  
> CPU_FTR_ bits for extremely specific uses like this.

I haven't been able to think of an alternative that doesn't amount to
an ad-hoc reimplementation of the CPU feature mechanism.  Do you have
a suggestion?

We have code here that needs to know about the characteristics of the
processor we're running, and is somewhat performance-critical (and
__copy_tofrom_user, which Mark is working on next, will also use these
bits and is definitely performance-critical).  So it is natural to use
the CPU feature mechanism, which is there precisely to provide this
kind of information.

I assume you're worried about running out of feature bits.  The bit
Mark is adding is in the 64-bit section of the kernel feature mask,
so it doesn't affect 32-bit processors at all.  Anyway, we still have
8 free bits there after Mark's patch.  It's the user feature mask
where we're getting tight, since it's limited to 32 bits and we only
have 4 bits free.

Paul.



More information about the Linuxppc-dev mailing list