Subject: Re: calling giveup_altivec on machine with no altivec!?

From: Frank Rowand <[email-masked]>
Date: Thu, 15 Feb 2001 14:47:58 -0800

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 <[email-masked]>
MontaVista Software, Inc

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