Proposed changes to io.h

John Whitney johnw at sands-edge.com
Thu Apr 1 05:57:14 EST 2004


I wonder will it work on 4xx CPUs which don't have floating point unit?
>
> #ifndef CONFIG_PPC_CLASSIC_FPU?
>

I don't see this in arch/ppc/Kconfig (or anywhere else) in the 2.6.5
kernel which I am using (or in arch/ppc/config.in, for 2.4.25).  I can
certainly create a patch to Kconfig that does this, or I could check
for PPC_FEATURE_HAS_FPU in cur_cpu_spec[0]->cpu_user_features  in
__raw_readq/writeq():

unsigned long long __raw_readq (int addr)
{
   if (cur_cpu_spec[0]->cpu_user_features & PPC_FEATURE_HAS_FPU) {
     ...
   } else {
     return *((volatile unsigned long long *) addr);
}

or somesuch.  This would work as long as the compiler doesn't have a
snitfit with FP instructions, even if the processor can't use them...

Which would the maintainers prefer?


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc-dev mailing list