Richard Henderson wrote:
On Mon, Jul 11, 2005 at 09:52:22AM -0700, Dan Kegel wrote:

No, this code is protected by various system checks.

We want -mcpu=ev5 such that the kernel as a whole will run everywhere,
but we require these specific instructions on specific ev56/ev6 systems
for i/o.

rth, can you eyeball the summary I posted at http://marc.theaimsgroup.com/?l=linux-kernel&m=112109202911699&w=2 ?
My limited understanding is that gcc is fine, no need to revert anything,
but the linux kernel configury needs to stop doing
 -mcpu=ev5 -Wa,-mev6
for CONFIG_ALPHA_EV5/CONFIG_ALPHA_GENERIC, since those specific instructions
really aren't there on real ev5 machines, and passing
-Wa,-mev6 keeps it from substituting a macro.


Absolutely not.  While one can argue about which in the gcc+binutils
pair is buggy, the kernel is *not* buggy.

Please re-read my problem description above, and recall that this is
for a GENERIC kernel, that runs on ALL alpha systems.

Maybe I'm missing something.  include/asm-alpha/compiler.h says:

#if defined(__alpha_bwx__)
#define __kernel_ldbu(mem)      (mem)
...
#else
#define __kernel_ldbu(mem)                              \
   ({ unsigned char __kir;                               \
      __asm__("ldbu %0,%1" : "=r"(__kir) : "m"(mem));    \
      __kir; })

For -mcpu=ev5, the #else branch is taken, and the ldbu instruction
is given to the assembler, right?
And since arch/alpha/Makefile does
  CFLAGS += $(cflags-y) -Wa,-mev6
unconditionally, real ldbu instructions are used instead of
the emulation.  And that means that __kernel_ldbu(mem) won't
work on pure ev5 machines.  Are you saying that __kernel_ldbu(mem)
is never called on pure ev5 machines, then?

Thanks,
Dan

--
Trying to get a job as a c++ developer?  See 
http://kegel.com/academy/getting-hired.html

Reply via email to