From: Mark Nelson <hidden> Date: 2008-10-27 10:42:56
Add a new CPU feature bit, CPU_FTR_UNALIGNED_LD_STD, to be added
to the 64bit powerpc chips that can do unaligned load double and
store double (and not take a performance hit from it).
This is added to Power6 and Cell and will be used in an upcoming
patch to do the alignment in memcpy() only on CPUs that require
it.
Signed-off-by: Mark Nelson <redacted>
---
arch/powerpc/include/asm/cputable.h | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
Index: upstream/arch/powerpc/include/asm/cputable.h
===================================================================
From: Kumar Gala <hidden> Date: 2008-10-27 13:45:01
On Oct 27, 2008, at 5:43 AM, Mark Nelson wrote:
Add a new CPU feature bit, CPU_FTR_UNALIGNED_LD_STD, to be added
to the 64bit powerpc chips that can do unaligned load double and
store double (and not take a performance hit from it).
This is added to Power6 and Cell and will be used in an upcoming
patch to do the alignment in memcpy() only on CPUs that require
it.
Signed-off-by: Mark Nelson <redacted>
---
arch/powerpc/include/asm/cputable.h | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
not that I have anything against this patch but is there anything we
can do about the CPU_FTR_ usage for one of things like this?
- k
From: Paul Mackerras <hidden> Date: 2008-10-28 22:05:49
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.