Re: [PATCH] x86: do not expose CONFIG_BSWAP to userspace

From: Harvey Harrison
Date: Wed Jan 28 2009 - 17:40:56 EST


On Wed, 2009-01-28 at 14:13 -0800, Linus Torvalds wrote:
>
> On Wed, 28 Jan 2009, Harvey Harrison wrote:
> >
> > Use ifdef __i486__ to ensure the BSWAP instruction is available
> > on 32-bit x86.
> >
> > Signed-off-by: Harvey Harrison <harvey.harrison@xxxxxxxxx>
> > ---
> > HPA,
> >
> > I'm afraid my knowledge of gcc compiler flags for various models is
> > lacking, I used i486 as suggested, just wanted to make sure I understood
> > you corectly.
>
> I really don't think this works.
>
> Try this:
>
> cpp -dM -m32 -march=pentium t.c | grep i486
>
> and see the marked absense of __i486__ anywhere.
>
> At least CONFIG_X86_BSWAP gives the right behaviour for the kernel.

You're right, it doesn't work. Perhaps just exporting the bswap version
all the time and i386-only people can worry about patching it out?

Harvey



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/