[PATCH] powerpc: Don't use CONFIG_PPC64 in user-visible header files

Benjamin Herrenschmidt benh at kernel.crashing.org
Tue Dec 13 11:01:06 EST 2005


On Tue, 2005-12-13 at 00:37 +0100, Arnd Bergmann wrote:
> Am Montag 12 Dezember 2005 23:50 schrieb Benjamin Herrenschmidt:
> > They should not to that.
> 
> Of course they should not. But if they did such things on 2.6.14 it might have
> worked and if it fails in 2.6.15 that is a regression.

No, it's not. They shouldn't do it, period. It's not a regression to
break a bogus/forbidden behaviour.

> Both these files have sections marked #ifdef __KERNEL__ in them, so the
> assumption is that the other parts are actually written in a way that they
> don't hurt if they get included.

Yah, historical from when systemcfg still was sort-of supported.

> Traditionally, asm/io.h gets included on i386 in order to do nasty things with
> iopl() and direct device access from user space. The way that
> include/asm-powerpc/io.h is written allows you to call the 
> {in,out}_{be,le}{8,16,32,64} on /dev/mem or similar files. While this is
> probably a bad idea, I can see why someone might have started using
> it and it should not just stop working.

Good, that way they get a chance to fix their code.

> The comment in asm/vdso_data.h suggests that it actually is meant to
> be a user space ABI header (even though a misguided attempt at doing
> so). An application including it to get the expected ppc64 data structure
> layout will be silently broken by relying on CONFIG_PPC64.

It used to be and I'm changing that so it's not anymore.

Ben.





More information about the Linuxppc64-dev mailing list