On Tue, 13 May 2014, Arnd Bergmann wrote: > On Tuesday 13 May 2014 15:11:33 Geert Uytterhoeven wrote: > > On Tue, May 13, 2014 at 2:07 PM, Thomas Gleixner <tglx@xxxxxxxxxxxxx> wrote: > > > On Tue, 13 May 2014, Arnd Bergmann wrote: > > >> On Tuesday 13 May 2014 18:17:40 Ley Foon Tan wrote: > > >> > When we export this posix_types.h file for user software, they need to > > >> > define this config, eg: CONFIG_32BIT_TIME to use 32 bit time. Is this > > >> > what we want to do? > > >> > > >> No, this doesn't really work: You can't use CONFIG_* symbols in > > >> user-visible header files. > > > > > > Then make the config symbol generate the header from a template. > > > > Indeed. I think it's worthwhile to add CONFIG_* expansion for such "hard" > > CONFIG symbols to make headers_install, cfr. the existing unifdef support. > > > > We do such a hard work to improve asm-generic, so new architectures can > > just use that, only to see early adaptors now having to migrate away from it > > (e.g. OpenRISC suddenly gaining uapi/asm/posix_types.h). > > This was always the idea: New architectures should use the default ABI > as it is defined at the time when they get added. When we later change > the ABI, everything that is already there is no longer using the default, > so they now have to change. > > > Or is there another solution? > > We could in theory have a versioned ABI, and define for instance that > openrisc uses the 3.1 version while nios2 uses the 3.16 version. > > Doing that would introduce other problems I guess, but it would > avoid the use of changing lots of architectures when the default > ABI changes. The most simple solution is to use the existing unifdef machinery for the export version and make the #ifdef maze use CONFIG_ARCH_XXX. For the simple architectures you just need the CONFIG_ARCH_NAME, for such which support 32 and 64 or some more ABI versions you need to look for a matching one or a combination of several config options. You even can combine that with versioning: #ifdef CONFIG_ARCH_OPENRISC # include <asm-generic/hdr-v31.h> #endif That gives you a nice history in a single place and avoids updating the world and some when you change stuff. Hmm? tglx -- To unsubscribe from this list: send the line "unsubscribe linux-arch" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html