calling giveup_altivec on machine with no altivec!?

Frank Rowand frank_rowand at mvista.com
Fri Feb 16 09:47:58 EST 2001


Troy Benjegerdes wrote:


> > Is it possible that the MSR had the MSR_VEC bit set at some point?  One
> > IBM processor user's manual says "the reserved fields should be written
> > as 0 and read as __undefined__.  This is, when writing to a register with
> > a reserved field, write a 0 to the reserved field.  When reading from a
> > register with a reserved field, ignore that bit."


> In either case, if that's what the IBM manuals say, then the code is
> incorrect and should probably be re-done to check that it's actually
> running on a kernel with an altivec unit. Any suggestions on the best way
> to fix it?

Assuming a CONFIG_ALTIVEC flag (or equivalent) existed, then in processor.h:

#ifdef CONFIG_ALTIVEC
#define MSR_VEC         (1<<25)
#else
#define MSR_VEC         (0)
#endif

-Frank
--
Frank Rowand <frank_rowand at mvista.com>
MontaVista Software, Inc

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






More information about the Linuxppc-dev mailing list