Kconfig: ARCH=x86 causes wrong utsname.machine
The new ARCH=x86 kernel build causes weired machine strings on 32-bit. For a cross-compiled kernel I have $ uname -m x66_64 For a kernel natively built on a 32 bit machine I have $ uname -m x66 Looking at the sources, I think that utsname->machine was initially set as "x86_64" and "x86", respectively. But in arch/x86/kernel/cpu/bugs.c in check_bugs() the second character is set to '6' on my K7. I think the right solution for that problem is to use "x86_64" as the machine name for 64-bit and to keep the old "i[3456]86" strings for 32-bit kernels. Several tools (e.g. the kernel build itself) will be confused otherwise (*). Regards, Andreas (*) Example: $ uname -m x66_64 $ make menuconfig Makefile:425: /projects/linux-2.6-x86/arch/x66_64/Makefile: No such file or directory make: *** No rule to make target `/projects/linux-2.6-x86/arch/x66_64/Makefile'. Stop. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: Kconfig: ARCH=x86 causes wrong utsname.machine
Andreas Herrmann wrote: The new ARCH=x86 kernel build causes weired machine strings on 32-bit. For a cross-compiled kernel I have $ uname -m x66_64 For a kernel natively built on a 32 bit machine I have $ uname -m x66 Looking at the sources, I think that utsname->machine was initially set as "x86_64" and "x86", respectively. But in arch/x86/kernel/cpu/bugs.c in check_bugs() the second character is set to '6' on my K7. I think the right solution for that problem is to use "x86_64" as the machine name for 64-bit and to keep the old "i[3456]86" strings for 32-bit kernels. Absolutely. This would be userspace-visible ABI breakage. -hpa - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: Kconfig: ARCH=x86 causes wrong utsname.machine
On Fri, Nov 16, 2007 at 07:20:15AM -0800, H. Peter Anvin wrote: > Andreas Herrmann wrote: > >The new ARCH=x86 kernel build causes weired machine strings on 32-bit. > >For a cross-compiled kernel I have > > > > $ uname -m > > x66_64 > > > >For a kernel natively built on a 32 bit machine I have > > > > $ uname -m > > x66 > > > >Looking at the sources, I think that utsname->machine was initially > >set as "x86_64" and "x86", respectively. > >But in arch/x86/kernel/cpu/bugs.c in check_bugs() the second character > >is set to '6' on my K7. > > > >I think the right solution for that problem is to use "x86_64" as the > >machine name for 64-bit and to keep the old "i[3456]86" strings for > >32-bit kernels. > > Absolutely. This would be userspace-visible ABI breakage. Any good suggestions here??? UTS_MACHINE is set in top-level Makefile and if we specify make ARCH=x86 we do not know if i386 or x86_&4 is correct until the configuration has been read. Should we report a "make ARCH=x86" as uname -m == x86?? Sam - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: Kconfig: ARCH=x86 causes wrong utsname.machine
Sam Ravnborg wrote: On Fri, Nov 16, 2007 at 07:20:15AM -0800, H. Peter Anvin wrote: Andreas Herrmann wrote: The new ARCH=x86 kernel build causes weired machine strings on 32-bit. For a cross-compiled kernel I have $ uname -m x66_64 For a kernel natively built on a 32 bit machine I have $ uname -m x66 Looking at the sources, I think that utsname->machine was initially set as "x86_64" and "x86", respectively. But in arch/x86/kernel/cpu/bugs.c in check_bugs() the second character is set to '6' on my K7. I think the right solution for that problem is to use "x86_64" as the machine name for 64-bit and to keep the old "i[3456]86" strings for 32-bit kernels. Absolutely. This would be userspace-visible ABI breakage. Any good suggestions here??? UTS_MACHINE is set in top-level Makefile and if we specify make ARCH=x86 we do not know if i386 or x86_&4 is correct until the configuration has been read. Should we report a "make ARCH=x86" as uname -m == x86?? That would break 5 years of a stable ABI. I don't think that is even remotely feasible. -hpa - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: Kconfig: ARCH=x86 causes wrong utsname.machine
H. Peter Anvin wrote: Should we report a "make ARCH=x86" as uname -m == x86?? That would break 5 years of a stable ABI. I don't think that is even remotely feasible. Make that 5 years for x86-64, 16 years for i386... -hpa - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: Kconfig: ARCH=x86 causes wrong utsname.machine
> > > >Any good suggestions here??? > >UTS_MACHINE is set in top-level Makefile and if we specify > >make ARCH=x86 > >we do not know if i386 or x86_&4 is correct until the configuration > >has been read. > > > >Should we report a "make ARCH=x86" as uname -m == x86?? > > > > That would break 5 years of a stable ABI. I don't think that is even > remotely feasible. I will try to cook up a patch that sets CONFIG_UTS_MACHINE and then we will use that value unless it is undefined in which case we fall back to UTS_MACHINE (as today). Sam - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/