headers_check fixes for other architectures
Subsystems (11)
These are clean patches, I did not included anything which leads to any confusion or conflicts. I hope maintainers do not mind if these patches go to mainstream via Ingo's -tip along with other headers_check fixes.
Ingo please pull:
The following changes since commit 83c21698257b3bbd96926480b26eaffb5a8c3946:
Ingo Molnar (1):
Merge branch 'x86/apic'
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/jaswinder/linux-2.6-tip.git master
Jaswinder Singh Rajput (27):
headers_check fix: alpha, statfs.h
headers_check fix: alpha, swab.h
headers_check fix: arm, a.out.h
headers_check fix: arm, setup.h
headers_check fix: arm, swab.h
headers_check fix: avr32, swab.h
headers_check fix: blackfin, swab.h
headers_check fix: frv, swab.h
headers_check fix: h8300, swab.h
headers_check fix: ia64, fpu.h
headers_check fix: ia64, gcc_intrin.h
headers_check fix: ia64, intrinsics.h
headers_check fix: ia64, kvm.h
headers_check fix: ia64, swab.h
headers_check fix: m32r, swab.h
headers_check fix: mips, sigcontext.h
headers_check fix: mips, swab.h
headers_check fix: mn10300, swab.h
headers_check fix: parisc, pdc.h
headers_check fix: parisc, swab.h
headers_check fix: powerpc, bootx.h
headers_check fix: powerpc, elf.h
headers_check fix: powerpc, kvm.h
headers_check fix: powerpc, ps3fb.h
headers_check fix: powerpc, spu_info.h
headers_check fix: powerpc, swab.h
headers_check fix: xtensa, swab.h
arch/alpha/include/asm/statfs.h | 2 ++ arch/alpha/include/asm/swab.h | 2 +- arch/arm/include/asm/a.out.h | 2 +- arch/arm/include/asm/setup.h | 2 +- arch/arm/include/asm/swab.h | 2 +- arch/avr32/include/asm/swab.h | 2 +- arch/blackfin/include/asm/swab.h | 2 +- arch/h8300/include/asm/swab.h | 2 +- arch/ia64/include/asm/fpu.h | 2 +- arch/ia64/include/asm/gcc_intrin.h | 1 + arch/ia64/include/asm/intrinsics.h | 1 + arch/ia64/include/asm/kvm.h | 3 +-- arch/ia64/include/asm/swab.h | 2 +- arch/mips/include/asm/sigcontext.h | 1 + arch/mips/include/asm/swab.h | 2 +- arch/parisc/include/asm/pdc.h | 3 ++- arch/parisc/include/asm/swab.h | 2 +- arch/powerpc/include/asm/bootx.h | 2 +- arch/powerpc/include/asm/elf.h | 2 +- arch/powerpc/include/asm/kvm.h | 2 +- arch/powerpc/include/asm/ps3fb.h | 1 + arch/powerpc/include/asm/spu_info.h | 3 ++- arch/powerpc/include/asm/swab.h | 2 +- arch/xtensa/include/asm/swab.h | 2 +- include/asm-frv/swab.h | 2 +- include/asm-m32r/swab.h | 2 +- include/asm-mn10300/swab.h | 2 +- 27 files changed, 30 insertions(+), 23 deletions(-)
These patches fixes 41 headers_check warnings:/home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-alpha/statfs.h:6: found __[us]{8,16,32,64} type without #include <linux/types.h> /home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-alpha/swab.h:4: include of <linux/types.h> is preferred over <asm/types.h> /home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-alpha/swab.h:10: found __[us]{8,16,32,64} type without #include <linux/types.h> /home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-arm/a.out.h:5: include of <linux/types.h> is preferred over <asm/types.h> /home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-arm/a.out.h:9: found __[us]{8,16,32,64} type without #include <linux/types.h> /home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-arm/setup.h:17: include of <linux/types.h> is preferred over <asm/types.h> /home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-arm/setup.h:25: found __[us]{8,16,32,64} type without #include <linux/types.h> /home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-arm/swab.h:19: include of <linux/types.h> is preferred over <asm/types.h> /home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-arm/swab.h:25: found __[us]{8,16,32,64} type without #include <linux/types.h> /home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-avr32/swab.h:7: include of <linux/types.h> is preferred over <asm/types.h> /home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-avr32/swab.h:22: found __[us]{8,16,32,64} type without #include <linux/types.h> /home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-blackfin/swab.h:4: include of <linux/types.h> is preferred over <asm/types.h> /home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-blackfin/swab.h:13: found __[us]{8,16,32,64} type without #include <linux/types.h> /home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-frv/swab.h:4: include of <linux/types.h> is preferred over <asm/types.h> /home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-h8300/swab.h:4: include of <linux/types.h> is preferred over <asm/types.h> /home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-ia64/fpu.h:9: include of <linux/types.h> is preferred over <asm/types.h> /home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-ia64/gcc_intrin.h:63: found __[us]{8,16,32,64} type without #include <linux/types.h> /home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-ia64/intrinsics.h:57: found __[us]{8,16,32,64} type without #include <linux/types.h> /home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-ia64/kvm.h:24: include of <linux/types.h> is preferred over <asm/types.h> /home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-ia64/kvm.h:34: found __[us]{8,16,32,64} type without #include <linux/types.h> /home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-ia64/swab.h:9: include of <linux/types.h> is preferred over <asm/types.h> /home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-ia64/swab.h:13: found __[us]{8,16,32,64} type without #include <linux/types.h> /home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-m32r/swab.h:4: include of <linux/types.h> is preferred over <asm/types.h> /home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-mips/sigcontext.h:57: found __[us]{8,16,32,64} type without #include <linux/types.h> /home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-mips/swab.h:12: include of <linux/types.h> is preferred over <asm/types.h> /home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-mips/swab.h:18: found __[us]{8,16,32,64} type without #include <linux/types.h> /home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-mn10300/swab.h:14: include of <linux/types.h> is preferred over <asm/types.h> /home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-mn10300/swab.h:19: found __[us]{8,16,32,64} type without #include <linux/types.h> /home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-parisc/pdc.h:420: found __[us]{8,16,32,64} type without #include <linux/types.h> /home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-parisc/swab.h:4: include of <linux/types.h> is preferred over <asm/types.h> /home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-parisc/swab.h:9: found __[us]{8,16,32,64} type without #include <linux/types.h> /home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-powerpc/bootx.h:12: include of <linux/types.h> is preferred over <asm/types.h> /home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-powerpc/bootx.h:57: found __[us]{8,16,32,64} type without #include <linux/types.h> /home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-powerpc/elf.h:5: include of <linux/types.h> is preferred over <asm/types.h> /home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-powerpc/kvm.h:23: include of <linux/types.h> is preferred over <asm/types.h> /home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-powerpc/kvm.h:26: found __[us]{8,16,32,64} type without #include <linux/types.h> /home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-powerpc/ps3fb.h:33: found __[us]{8,16,32,64} type without #include <linux/types.h> /home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-powerpc/spu_info.h:27: found __[us]{8,16,32,64} type without #include <linux/types.h> /home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-powerpc/swab.h:11: include of <linux/types.h> is preferred over <asm/types.h> /home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-xtensa/swab.h:14: include of <linux/types.h> is preferred over <asm/types.h> /home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-xtensa/swab.h:19: found __[us]{8,16,32,64} type without #include <linux/types.h>
Complete diff:
arch/alpha/include/asm/statfs.h +2 -0
@@ -1,6 +1,8 @@#ifndef _ALPHA_STATFS_H#define _ALPHA_STATFS_H +#include <linux/types.h> +/* Alpha is the only 64-bit platform with 32-bit statfs. And doesn't even seem to implement statfs64 */ #define __statfs_word __u32
arch/alpha/include/asm/swab.h +1 -1
@@ -1,7 +1,7 @@#ifndef _ALPHA_SWAB_H#define _ALPHA_SWAB_H -#include <asm/types.h> +#include <linux/types.h> #include <linux/compiler.h> #include <asm/compiler.h>
arch/arm/include/asm/a.out.h +1 -1
@@ -2,7 +2,7 @@#define __ARM_A_OUT_H__#include <linux/personality.h> -#include <asm/types.h> +#include <linux/types.h> struct exec {
arch/arm/include/asm/setup.h +1 -1
@@ -14,7 +14,7 @@#ifndef __ASMARM_SETUP_H#define __ASMARM_SETUP_H -#include <asm/types.h> +#include <linux/types.h> #define COMMAND_LINE_SIZE 1024
arch/arm/include/asm/swab.h +1 -1
@@ -16,7 +16,7 @@#define __ASM_ARM_SWAB_H#include <linux/compiler.h> -#include <asm/types.h> +#include <linux/types.h> #if !defined(__STRICT_ANSI__) || defined(__KERNEL__)# define __SWAB_64_THRU_32__
arch/avr32/include/asm/swab.h +1 -1
@@ -4,7 +4,7 @@#ifndef __ASM_AVR32_SWAB_H#define __ASM_AVR32_SWAB_H -#include <asm/types.h> +#include <linux/types.h> #include <linux/compiler.h> #define __SWAB_64_THRU_32__
arch/blackfin/include/asm/swab.h +1 -1
@@ -1,7 +1,7 @@#ifndef _BLACKFIN_SWAB_H#define _BLACKFIN_SWAB_H -#include <asm/types.h> +#include <linux/types.h> #include <linux/compiler.h> #if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__)
arch/h8300/include/asm/swab.h +1 -1
@@ -1,7 +1,7 @@#ifndef _H8300_SWAB_H#define _H8300_SWAB_H -#include <asm/types.h> +#include <linux/types.h> #if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__)# define __SWAB_64_THRU_32__
arch/ia64/include/asm/fpu.h +1 -1
@@ -6,7 +6,7 @@* David Mosberger-Tang <[email protected]> */ -#include <asm/types.h> +#include <linux/types.h> /* floating point status register: */ #define FPSR_TRAP_VD (1 << 0)/* invalid op trap disabled */
arch/ia64/include/asm/gcc_intrin.h +1 -0
@@ -6,6 +6,7 @@* Copyright (C) 2002,2003 Suresh Siddha <[email protected]> */ +#include <linux/types.h> #include <linux/compiler.h> /* define this macro to get some asm stmts included in 'c' files */
arch/ia64/include/asm/intrinsics.h +1 -0
@@ -10,6 +10,7 @@#ifndef __ASSEMBLY__ +#include <linux/types.h> /* include compiler specific intrinsics */ #include <asm/ia64regs.h> #ifdef __INTEL_COMPILER
arch/ia64/include/asm/kvm.h +1 -2
@@ -21,8 +21,7 @@* */ -#include <asm/types.h> - +#include <linux/types.h> #include <linux/ioctl.h> /* Architectural interrupt line count. */
arch/ia64/include/asm/swab.h +1 -1
@@ -6,7 +6,7 @@* David Mosberger-Tang <[email protected]>, Hewlett-Packard Co. */ -#include <asm/types.h> +#include <linux/types.h> #include <asm/intrinsics.h> #include <linux/compiler.h>
arch/mips/include/asm/sigcontext.h +1 -0
@@ -9,6 +9,7 @@#ifndef _ASM_SIGCONTEXT_H#define _ASM_SIGCONTEXT_H +#include <linux/types.h> #include <asm/sgidefs.h> #if _MIPS_SIM == _MIPS_SIM_ABI32
arch/mips/include/asm/swab.h +1 -1
@@ -9,7 +9,7 @@#define _ASM_SWAB_H#include <linux/compiler.h> -#include <asm/types.h> +#include <linux/types.h> #define __SWAB_64_THRU_32__
arch/parisc/include/asm/pdc.h +2 -1
@@ -336,10 +336,11 @@#define NUM_PDC_RESULT 32#if !defined(__ASSEMBLY__) -#ifdef __KERNEL__#include <linux/types.h> +#ifdef __KERNEL__ +extern int pdc_type;/* Values for pdc_type */
arch/parisc/include/asm/swab.h +1 -1
@@ -1,7 +1,7 @@#ifndef _PARISC_SWAB_H#define _PARISC_SWAB_H -#include <asm/types.h> +#include <linux/types.h> #include <linux/compiler.h> #define __SWAB_64_THRU_32__
arch/powerpc/include/asm/bootx.h +1 -1
@@ -9,7 +9,7 @@#ifndef __ASM_BOOTX_H__#define __ASM_BOOTX_H__ -#include <asm/types.h> +#include <linux/types.h> #ifdef macintosh#include <Types.h>
arch/powerpc/include/asm/elf.h +1 -1
@@ -7,7 +7,7 @@#include <asm/string.h> #endif -#include <asm/types.h> +#include <linux/types.h> #include <asm/ptrace.h> #include <asm/cputable.h> #include <asm/auxvec.h>
arch/powerpc/include/asm/kvm.h +1 -1
@@ -20,7 +20,7 @@ #ifndef __LINUX_KVM_POWERPC_H #define __LINUX_KVM_POWERPC_H -#include <asm/types.h> +#include <linux/types.h> struct kvm_regs { __u64 pc;
arch/powerpc/include/asm/ps3fb.h +1 -0
@@ -19,6 +19,7 @@#ifndef _ASM_POWERPC_PS3FB_H_#define _ASM_POWERPC_PS3FB_H_ +#include <linux/types.h> #include <linux/ioctl.h> /* ioctl */
arch/powerpc/include/asm/spu_info.h +2 -1
@@ -23,9 +23,10 @@ #ifndef _SPU_INFO_H #define _SPU_INFO_H +#include <linux/types.h> + #ifdef __KERNEL__ #include <asm/spu.h> -#include <linux/types.h> #else struct mfc_cq_sr { __u64 mfc_cq_data0_RW;
arch/powerpc/include/asm/swab.h +1 -1
@@ -8,7 +8,7 @@* 2 of the License, or (at your option) any later version. */ -#include <asm/types.h> +#include <linux/types.h> #include <linux/compiler.h> #ifdef __GNUC__
arch/xtensa/include/asm/swab.h +1 -1
@@ -11,7 +11,7 @@#ifndef _XTENSA_SWAB_H#define _XTENSA_SWAB_H -#include <asm/types.h> +#include <linux/types.h> #include <linux/compiler.h> #define __SWAB_64_THRU_32__
include/asm-frv/swab.h +1 -1
@@ -1,7 +1,7 @@#ifndef _ASM_SWAB_H#define _ASM_SWAB_H -#include <asm/types.h> +#include <linux/types.h> #if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__)# define __SWAB_64_THRU_32__
include/asm-m32r/swab.h +1 -1
@@ -1,7 +1,7 @@#ifndef _ASM_M32R_SWAB_H#define _ASM_M32R_SWAB_H -#include <asm/types.h> +#include <linux/types.h> #if !defined(__STRICT_ANSI__) || defined(__KERNEL__)# define __SWAB_64_THRU_32__
include/asm-mn10300/swab.h +1 -1
@@ -11,7 +11,7 @@#ifndef _ASM_SWAB_H#define _ASM_SWAB_H -#include <asm/types.h> +#include <linux/types.h> #ifdef __GNUC__
Quoted 4 lines · Jaswinder Singh Rajput
These are clean patches, I did not included anything which leads to any confusion or conflicts. I hope maintainers do not mind if these patches go to mainstream via Ingo's -tip along with other
headers_checkfixes.
Quoted 8 lines
Ingo please pull:
The following changes since commit83c21698257b3bbd96926480b26eaffb5a8c3946:
Ingo Molnar (1):
Merge branch 'x86/apic'are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/jaswinder/linux-2.6-tip.gitmaster
looks good, but could you please do this like you did the previous one:
i.e. against your previous tree which was against Linus's tree?
The tree you did above includes a ton of other in-work trees that are in -tip, which orders your fixes to after those trees - i.e. to somewhere in the late 2.6.30 merge cycle.
So it's better to keep these separate. You can do this by basing your tree on tip:core/header-fixes:
git checkout -b my-new-tree tip/core/header-fixes
That will give you a base of your previous tree (in a Git friendly way), plus Sam's fix.
Then you can git-cherry-pick all your new commits into that new tree, and send a pull request if you are happy with it. Likewise, you can probably achieve the same (with a lot less work) by doing this in your master branch above:
git rebase --onto tip/core/header-fixes tip/master
(this assumes you have -tip set up as a remote repository.)
Ingo
Quoted 4 lines · Ingo Molnar
Then you can git-cherry-pick all your new commits into that new tree, and send a pull request if you are happy with it. Likewise, you can probably achieve the same (with a lot less work) by doing this in your master branch above:
The following changes since commit 7e3fa56141175026136b392fd026d5d07c49720e:
Sam Ravnborg (1):
kbuild: drop check for CONFIG_ in headers_check
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/jaswinder/linux-2.6-tip.git core/header-fixes
Jaswinder Singh Rajput (27):
headers_check fix: alpha, statfs.h
headers_check fix: alpha, swab.h
headers_check fix: arm, a.out.h
headers_check fix: arm, setup.h
headers_check fix: arm, swab.h
headers_check fix: avr32, swab.h
headers_check fix: blackfin, swab.h
headers_check fix: frv, swab.h
headers_check fix: h8300, swab.h
headers_check fix: ia64, fpu.h
headers_check fix: ia64, gcc_intrin.h
headers_check fix: ia64, intrinsics.h
headers_check fix: ia64, kvm.h
headers_check fix: ia64, swab.h
headers_check fix: m32r, swab.h
headers_check fix: mips, sigcontext.h
headers_check fix: mips, swab.h
headers_check fix: mn10300, swab.h
headers_check fix: parisc, pdc.h
headers_check fix: parisc, swab.h
headers_check fix: powerpc, bootx.h
headers_check fix: powerpc, elf.h
headers_check fix: powerpc, kvm.h
headers_check fix: powerpc, ps3fb.h
headers_check fix: powerpc, spu_info.h
headers_check fix: powerpc, swab.h
headers_check fix: xtensa, swab.h
arch/alpha/include/asm/statfs.h | 2 ++ arch/alpha/include/asm/swab.h | 2 +- arch/arm/include/asm/a.out.h | 2 +- arch/arm/include/asm/setup.h | 2 +- arch/arm/include/asm/swab.h | 2 +- arch/avr32/include/asm/swab.h | 2 +- arch/blackfin/include/asm/swab.h | 2 +- arch/h8300/include/asm/swab.h | 2 +- arch/ia64/include/asm/fpu.h | 2 +- arch/ia64/include/asm/gcc_intrin.h | 1 + arch/ia64/include/asm/intrinsics.h | 1 + arch/ia64/include/asm/kvm.h | 3 +-- arch/ia64/include/asm/swab.h | 2 +- arch/mips/include/asm/sigcontext.h | 1 + arch/mips/include/asm/swab.h | 2 +- arch/parisc/include/asm/pdc.h | 3 ++- arch/parisc/include/asm/swab.h | 2 +- arch/powerpc/include/asm/bootx.h | 2 +- arch/powerpc/include/asm/elf.h | 2 +- arch/powerpc/include/asm/kvm.h | 2 +- arch/powerpc/include/asm/ps3fb.h | 1 + arch/powerpc/include/asm/spu_info.h | 3 ++- arch/powerpc/include/asm/swab.h | 2 +- arch/xtensa/include/asm/swab.h | 2 +- include/asm-frv/swab.h | 2 +- include/asm-m32r/swab.h | 2 +- include/asm-mn10300/swab.h | 2 +- 27 files changed, 30 insertions(+), 23 deletions(-)
These patches fixes 41 headers_check warnings as shown in first email.
Complete diff:
arch/alpha/include/asm/statfs.h +2 -0
@@ -1,6 +1,8 @@#ifndef _ALPHA_STATFS_H#define _ALPHA_STATFS_H +#include <linux/types.h> +/* Alpha is the only 64-bit platform with 32-bit statfs. And doesn't even seem to implement statfs64 */ #define __statfs_word __u32
arch/alpha/include/asm/swab.h +1 -1
@@ -1,7 +1,7 @@#ifndef _ALPHA_SWAB_H#define _ALPHA_SWAB_H -#include <asm/types.h> +#include <linux/types.h> #include <linux/compiler.h> #include <asm/compiler.h>
arch/arm/include/asm/a.out.h +1 -1
@@ -2,7 +2,7 @@#define __ARM_A_OUT_H__#include <linux/personality.h> -#include <asm/types.h> +#include <linux/types.h> struct exec {
arch/arm/include/asm/setup.h +1 -1
@@ -14,7 +14,7 @@#ifndef __ASMARM_SETUP_H#define __ASMARM_SETUP_H -#include <asm/types.h> +#include <linux/types.h> #define COMMAND_LINE_SIZE 1024
arch/arm/include/asm/swab.h +1 -1
@@ -16,7 +16,7 @@#define __ASM_ARM_SWAB_H#include <linux/compiler.h> -#include <asm/types.h> +#include <linux/types.h> #if !defined(__STRICT_ANSI__) || defined(__KERNEL__)# define __SWAB_64_THRU_32__
arch/avr32/include/asm/swab.h +1 -1
@@ -4,7 +4,7 @@#ifndef __ASM_AVR32_SWAB_H#define __ASM_AVR32_SWAB_H -#include <asm/types.h> +#include <linux/types.h> #include <linux/compiler.h> #define __SWAB_64_THRU_32__
arch/blackfin/include/asm/swab.h +1 -1
@@ -1,7 +1,7 @@#ifndef _BLACKFIN_SWAB_H#define _BLACKFIN_SWAB_H -#include <asm/types.h> +#include <linux/types.h> #include <linux/compiler.h> #if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__)
arch/h8300/include/asm/swab.h +1 -1
@@ -1,7 +1,7 @@#ifndef _H8300_SWAB_H#define _H8300_SWAB_H -#include <asm/types.h> +#include <linux/types.h> #if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__)# define __SWAB_64_THRU_32__
arch/ia64/include/asm/fpu.h +1 -1
@@ -6,7 +6,7 @@* David Mosberger-Tang <[email protected]> */ -#include <asm/types.h> +#include <linux/types.h> /* floating point status register: */ #define FPSR_TRAP_VD (1 << 0)/* invalid op trap disabled */
arch/ia64/include/asm/gcc_intrin.h +1 -0
@@ -6,6 +6,7 @@* Copyright (C) 2002,2003 Suresh Siddha <[email protected]> */ +#include <linux/types.h> #include <linux/compiler.h> /* define this macro to get some asm stmts included in 'c' files */
arch/ia64/include/asm/intrinsics.h +1 -0
@@ -10,6 +10,7 @@#ifndef __ASSEMBLY__ +#include <linux/types.h> /* include compiler specific intrinsics */ #include <asm/ia64regs.h> #ifdef __INTEL_COMPILER
arch/ia64/include/asm/kvm.h +1 -2
@@ -21,8 +21,7 @@* */ -#include <asm/types.h> - +#include <linux/types.h> #include <linux/ioctl.h> /* Architectural interrupt line count. */
arch/ia64/include/asm/swab.h +1 -1
@@ -6,7 +6,7 @@* David Mosberger-Tang <[email protected]>, Hewlett-Packard Co. */ -#include <asm/types.h> +#include <linux/types.h> #include <asm/intrinsics.h> #include <linux/compiler.h>
arch/mips/include/asm/sigcontext.h +1 -0
@@ -9,6 +9,7 @@#ifndef _ASM_SIGCONTEXT_H#define _ASM_SIGCONTEXT_H +#include <linux/types.h> #include <asm/sgidefs.h> #if _MIPS_SIM == _MIPS_SIM_ABI32
arch/mips/include/asm/swab.h +1 -1
@@ -9,7 +9,7 @@#define _ASM_SWAB_H#include <linux/compiler.h> -#include <asm/types.h> +#include <linux/types.h> #define __SWAB_64_THRU_32__
arch/parisc/include/asm/pdc.h +2 -1
@@ -336,10 +336,11 @@#define NUM_PDC_RESULT 32#if !defined(__ASSEMBLY__) -#ifdef __KERNEL__#include <linux/types.h> +#ifdef __KERNEL__ +extern int pdc_type;/* Values for pdc_type */
arch/parisc/include/asm/swab.h +1 -1
@@ -1,7 +1,7 @@#ifndef _PARISC_SWAB_H#define _PARISC_SWAB_H -#include <asm/types.h> +#include <linux/types.h> #include <linux/compiler.h> #define __SWAB_64_THRU_32__
arch/powerpc/include/asm/bootx.h +1 -1
@@ -9,7 +9,7 @@#ifndef __ASM_BOOTX_H__#define __ASM_BOOTX_H__ -#include <asm/types.h> +#include <linux/types.h> #ifdef macintosh#include <Types.h>
arch/powerpc/include/asm/elf.h +1 -1
@@ -7,7 +7,7 @@#include <asm/string.h> #endif -#include <asm/types.h> +#include <linux/types.h> #include <asm/ptrace.h> #include <asm/cputable.h> #include <asm/auxvec.h>
arch/powerpc/include/asm/kvm.h +1 -1
@@ -20,7 +20,7 @@ #ifndef __LINUX_KVM_POWERPC_H #define __LINUX_KVM_POWERPC_H -#include <asm/types.h> +#include <linux/types.h> struct kvm_regs { __u64 pc;
arch/powerpc/include/asm/ps3fb.h +1 -0
@@ -19,6 +19,7 @@#ifndef _ASM_POWERPC_PS3FB_H_#define _ASM_POWERPC_PS3FB_H_ +#include <linux/types.h> #include <linux/ioctl.h> /* ioctl */
arch/powerpc/include/asm/spu_info.h +2 -1
@@ -23,9 +23,10 @@ #ifndef _SPU_INFO_H #define _SPU_INFO_H +#include <linux/types.h> + #ifdef __KERNEL__ #include <asm/spu.h> -#include <linux/types.h> #else struct mfc_cq_sr { __u64 mfc_cq_data0_RW;
arch/powerpc/include/asm/swab.h +1 -1
@@ -8,7 +8,7 @@* 2 of the License, or (at your option) any later version. */ -#include <asm/types.h> +#include <linux/types.h> #include <linux/compiler.h> #ifdef __GNUC__
arch/xtensa/include/asm/swab.h +1 -1
@@ -11,7 +11,7 @@#ifndef _XTENSA_SWAB_H#define _XTENSA_SWAB_H -#include <asm/types.h> +#include <linux/types.h> #include <linux/compiler.h> #define __SWAB_64_THRU_32__
include/asm-frv/swab.h +1 -1
@@ -1,7 +1,7 @@#ifndef _ASM_SWAB_H#define _ASM_SWAB_H -#include <asm/types.h> +#include <linux/types.h> #if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__)# define __SWAB_64_THRU_32__
include/asm-m32r/swab.h +1 -1
@@ -1,7 +1,7 @@#ifndef _ASM_M32R_SWAB_H#define _ASM_M32R_SWAB_H -#include <asm/types.h> +#include <linux/types.h> #if !defined(__STRICT_ANSI__) || defined(__KERNEL__)# define __SWAB_64_THRU_32__
include/asm-mn10300/swab.h +1 -1
@@ -11,7 +11,7 @@#ifndef _ASM_SWAB_H#define _ASM_SWAB_H -#include <asm/types.h> +#include <linux/types.h> #ifdef __GNUC__
Quoted 73 lines · Jaswinder Singh Rajput
Quoted 4 lines · Ingo Molnar
Then you can git-cherry-pick all your new commits into that new tree, and send a pull request if you are happy with it. Likewise, you can probably achieve the same (with a lot less work) by doing this in your master branch above:
The following changes since commit
7e3fa56141175026136b392fd026d5d07c49720e:
Sam Ravnborg (1):
kbuild: drop check forCONFIG_inheaders_checkare available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/jaswinder/linux-2.6-tip.gitcore/header-fixesJaswinder Singh Rajput (27):
headers_checkfix: alpha,statfs.h
headers_checkfix: alpha,swab.h
headers_checkfix: arm,a.out.h
headers_checkfix: arm,setup.h
headers_checkfix: arm,swab.h
headers_checkfix: avr32,swab.h
headers_checkfix: blackfin,swab.h
headers_checkfix: frv,swab.h
headers_checkfix: h8300,swab.h
headers_checkfix: ia64,fpu.h
headers_checkfix: ia64,gcc_intrin.h
headers_checkfix: ia64,intrinsics.h
headers_checkfix: ia64,kvm.h
headers_checkfix: ia64,swab.h
headers_checkfix: m32r,swab.h
headers_checkfix: mips,sigcontext.h
headers_checkfix: mips,swab.h
headers_checkfix: mn10300,swab.h
headers_checkfix: parisc,pdc.h
headers_checkfix: parisc,swab.h
headers_checkfix: powerpc,bootx.h
headers_checkfix: powerpc,elf.h
headers_checkfix: powerpc,kvm.h
headers_checkfix: powerpc,ps3fb.h
headers_checkfix: powerpc,spu_info.h
headers_checkfix: powerpc,swab.h
headers_checkfix: xtensa,swab.harch/alpha/include/asm/statfs.h | 2 ++ arch/alpha/include/asm/swab.h | 2 +- arch/arm/include/asm/a.out.h | 2 +- arch/arm/include/asm/setup.h | 2 +- arch/arm/include/asm/swab.h | 2 +- arch/avr32/include/asm/swab.h | 2 +- arch/blackfin/include/asm/swab.h | 2 +- arch/h8300/include/asm/swab.h | 2 +- arch/ia64/include/asm/fpu.h | 2 +- arch/ia64/include/asm/gcc_intrin.h | 1 + arch/ia64/include/asm/intrinsics.h | 1 + arch/ia64/include/asm/kvm.h | 3 +-- arch/ia64/include/asm/swab.h | 2 +- arch/mips/include/asm/sigcontext.h | 1 + arch/mips/include/asm/swab.h | 2 +- arch/parisc/include/asm/pdc.h | 3 ++- arch/parisc/include/asm/swab.h | 2 +- arch/powerpc/include/asm/bootx.h | 2 +- arch/powerpc/include/asm/elf.h | 2 +- arch/powerpc/include/asm/kvm.h | 2 +- arch/powerpc/include/asm/ps3fb.h | 1 + arch/powerpc/include/asm/spu_info.h | 3 ++- arch/powerpc/include/asm/swab.h | 2 +- arch/xtensa/include/asm/swab.h | 2 +- include/asm-frv/swab.h | 2 +- include/asm-m32r/swab.h | 2 +- include/asm-mn10300/swab.h | 2 +- 27 files changed, 30 insertions(+), 23 deletions(-)
Quoted 1 line
These patches fixes 41
headers_checkwarnings as shown in first email.
Pulled into tip/core/header-fixes, thanks Jaswinder!
Ingo
Quoted 3 lines · Ingo Molnar
Quoted 1 line
These patches fixes 41
headers_checkwarnings as shown in first email.Pulled into tip/core/header-fixes, thanks Jaswinder!
These are the remaining ones on x86:
17 /dev/shm/tip/usr/include/linux/reiserfs_fs.h
12 /dev/shm/tip/usr/include/linux/soundcard.h
6 /dev/shm/tip/usr/include/asm/setup.h
3 /dev/shm/tip/usr/include/linux/nubus.h
2 /dev/shm/tip/usr/include/linux/in6.h
1 /dev/shm/tip/usr/include/mtd/jffs2-user.h
1 /dev/shm/tip/usr/include/linux/socket.h
1 /dev/shm/tip/usr/include/linux/coda_psdev.h
1 /dev/shm/tip/usr/include/asm/prctl.hThey are all of the "extern's make no sense in userspace" type. What was the verdict, are they worth touching, or should we turn off this warning in 'make headers_check'?
Ingo
Quoted 19 lines · Ingo Molnar
Quoted 3 lines · Ingo Molnar
Quoted 1 line
These patches fixes 41
headers_checkwarnings as shown in first email.Pulled into tip/core/header-fixes, thanks Jaswinder!
These are the remaining ones on x86:
17 /dev/shm/tip/usr/include/linux/reiserfs_fs.h 12 /dev/shm/tip/usr/include/linux/soundcard.h 6 /dev/shm/tip/usr/include/asm/setup.h 3 /dev/shm/tip/usr/include/linux/nubus.h 2 /dev/shm/tip/usr/include/linux/in6.h 1 /dev/shm/tip/usr/include/mtd/jffs2-user.h 1 /dev/shm/tip/usr/include/linux/socket.h 1 /dev/shm/tip/usr/include/linux/coda_psdev.h 1 /dev/shm/tip/usr/include/asm/prctl.h
Quoted 3 lines
They are all of the "extern's make no sense in userspace" type. What was the verdict, are they worth touching, or should we turn off this warning in 'make
headers_check'?
So, what's this all about?
You know, if there's something that is relevant to others and you want to _add_ them to the CC, at least leave enough of the original message so the new people who are being CC'd have some clue what the hell the thread is about, and more importantly where to get the patches being discussed.
Until then, if this includes any ARM bits, NAK, because I don't know what those changes are.
Quoted 19 lines · Ingo Molnar
Quoted 3 lines · Ingo Molnar
Quoted 1 line
These patches fixes 41
headers_checkwarnings as shown in first email.Pulled into tip/core/header-fixes, thanks Jaswinder!
These are the remaining ones on x86:
17 /dev/shm/tip/usr/include/linux/reiserfs_fs.h 12 /dev/shm/tip/usr/include/linux/soundcard.h 6 /dev/shm/tip/usr/include/asm/setup.h 3 /dev/shm/tip/usr/include/linux/nubus.h 2 /dev/shm/tip/usr/include/linux/in6.h 1 /dev/shm/tip/usr/include/mtd/jffs2-user.h 1 /dev/shm/tip/usr/include/linux/socket.h 1 /dev/shm/tip/usr/include/linux/coda_psdev.h 1 /dev/shm/tip/usr/include/asm/prctl.h
Quoted 3 lines
They are all of the "extern's make no sense in userspace" type. What was the verdict, are they worth touching, or should we turn off this warning in 'make
headers_check'?
Ah, not a case of new-cc's added. A case of the rare event of non-spam eminating from hera.kernel.org falling foul of my manual local blacklist.
I'd appreciate it if someone could point me at the original patches being discussed.
Quoted 24 lines · Russell King - ARM Linux
Quoted 19 lines · Ingo Molnar
Quoted 3 lines · Ingo Molnar
Quoted 1 line
These patches fixes 41
headers_checkwarnings as shown in first email.Pulled into tip/core/header-fixes, thanks Jaswinder!
These are the remaining ones on x86:
17 /dev/shm/tip/usr/include/linux/reiserfs_fs.h 12 /dev/shm/tip/usr/include/linux/soundcard.h 6 /dev/shm/tip/usr/include/asm/setup.h 3 /dev/shm/tip/usr/include/linux/nubus.h 2 /dev/shm/tip/usr/include/linux/in6.h 1 /dev/shm/tip/usr/include/mtd/jffs2-user.h 1 /dev/shm/tip/usr/include/linux/socket.h 1 /dev/shm/tip/usr/include/linux/coda_psdev.h 1 /dev/shm/tip/usr/include/asm/prctl.hQuoted 3 lines
They are all of the "extern's make no sense in userspace" type. What was the verdict, are they worth touching, or should we turn off this warning in 'make
headers_check'?
Quoted 5 lines
Ah, not a case of new-cc's added. A case of the rare event of non-spam eminating from hera.kernel.org falling foul of my manual local blacklist.
I'd appreciate it if someone could point me at the original patches being discussed.
I am sorry, if you did not received the email but you was in CC list:
Ingo Molnar <[email protected]>,
Linus Torvalds <[email protected]>, Sam Ravnborg <[email protected]>,
Andrew Morton <[email protected]>, Russell King - ARM Linux <[email protected]>, [email protected], [email protected],
[email protected],
[email protected],
[email protected],
[email protected],
[email protected],
LKML <[email protected]>
Arms bits are :
These are clean patches, I did not included anything which leads to any confusion or conflicts. I hope maintainers do not mind if these patches go to mainstream via Ingo's -tip along with other headers_check fixes.
Jaswinder Singh Rajput (3):
headers_check fix: arm, a.out.h
headers_check fix: arm, setup.h
headers_check fix: arm, swab.h
arch/arm/include/asm/a.out.h +1 -1
@@ -2,7 +2,7 @@#define __ARM_A_OUT_H__#include <linux/personality.h> -#include <asm/types.h> +#include <linux/types.h> struct exec {
arch/arm/include/asm/setup.h +1 -1
@@ -14,7 +14,7 @@#ifndef __ASMARM_SETUP_H#define __ASMARM_SETUP_H -#include <asm/types.h> +#include <linux/types.h> #define COMMAND_LINE_SIZE 1024
arch/arm/include/asm/swab.h +1 -1
@@ -16,7 +16,7 @@#define __ASM_ARM_SWAB_H#include <linux/compiler.h> -#include <asm/types.h> +#include <linux/types.h> #if !defined(__STRICT_ANSI__) || defined(__KERNEL__)# define __SWAB_64_THRU_32__
Thanks,
--
JSR
Quoted 18 lines · Ingo Molnar
Quoted 3 lines · Ingo Molnar
Quoted 1 line
These patches fixes 41
headers_checkwarnings as shown in first email.Pulled into tip/core/header-fixes, thanks Jaswinder!
These are the remaining ones on x86:
17 /dev/shm/tip/usr/include/linux/reiserfs_fs.h 12 /dev/shm/tip/usr/include/linux/soundcard.h 6 /dev/shm/tip/usr/include/asm/setup.h 3 /dev/shm/tip/usr/include/linux/nubus.h 2 /dev/shm/tip/usr/include/linux/in6.h 1 /dev/shm/tip/usr/include/mtd/jffs2-user.h 1 /dev/shm/tip/usr/include/linux/socket.h 1 /dev/shm/tip/usr/include/linux/coda_psdev.h 1 /dev/shm/tip/usr/include/asm/prctl.h
Quoted 4 lines
They are all of the "extern's make no sense in userspace" type. What was the verdict, are they worth touching, or should we turn off this warning in 'make
headers_check'?
I have the patches in queue which fixes above warnings except:
12 /dev/shm/tip/usr/include/linux/soundcard.h
1 /dev/shm/tip/usr/include/mtd/jffs2-user.h
Because these two files are using userspace functions.
--
JSR
Quoted 12 lines · Ingo Molnar
These are the remaining ones on x86:
17 /dev/shm/tip/usr/include/linux/reiserfs_fs.h 12 /dev/shm/tip/usr/include/linux/soundcard.h 6 /dev/shm/tip/usr/include/asm/setup.h 3 /dev/shm/tip/usr/include/linux/nubus.h 2 /dev/shm/tip/usr/include/linux/in6.h 1 /dev/shm/tip/usr/include/mtd/jffs2-user.h 1 /dev/shm/tip/usr/include/linux/socket.h 1 /dev/shm/tip/usr/include/linux/coda_psdev.h 1 /dev/shm/tip/usr/include/asm/prctl.h
Quoted 3 lines
They are all of the "extern's make no sense in userspace" type. What was the verdict, are they worth touching, or should we turn off this warning in 'make
headers_check'?
the warning wouldnt have been added if it didnt make sense ... like it says, prototypes for kernel functions make no sense in userspace headers
as for how it gets solved, we can either patch it manually or automatically delete the prototypes ... but since prototypes are a big difficult to match properly with regexes, the former will probably be saner right now.
-mike
Quoted 13 lines · Mike Frysinger
Quoted 12 lines · Ingo Molnar
These are the remaining ones on x86:
17 /dev/shm/tip/usr/include/linux/reiserfs_fs.h 12 /dev/shm/tip/usr/include/linux/soundcard.h 6 /dev/shm/tip/usr/include/asm/setup.h 3 /dev/shm/tip/usr/include/linux/nubus.h 2 /dev/shm/tip/usr/include/linux/in6.h 1 /dev/shm/tip/usr/include/mtd/jffs2-user.h 1 /dev/shm/tip/usr/include/linux/socket.h 1 /dev/shm/tip/usr/include/linux/coda_psdev.h 1 /dev/shm/tip/usr/include/asm/prctl.h
Quoted 6 lines
Quoted 3 lines
They are all of the "extern's make no sense in userspace" type. What was the verdict, are they worth touching, or should we turn off this warning in 'make
headers_check'?the warning wouldnt have been added if it didnt make sense ... like it says, prototypes for kernel functions make no sense in userspace headers
the existence of a warning does not justify it. For example the CONFIG_* warnings were deemed largely bogus and were removed.
Ingo
Quoted 18 lines · Ingo Molnar
Quoted 17 lines · Mike Frysinger
Quoted 15 lines · Ingo Molnar
These are the remaining ones on x86:
17 /dev/shm/tip/usr/include/linux/reiserfs_fs.h 12 /dev/shm/tip/usr/include/linux/soundcard.h 6 /dev/shm/tip/usr/include/asm/setup.h 3 /dev/shm/tip/usr/include/linux/nubus.h 2 /dev/shm/tip/usr/include/linux/in6.h 1 /dev/shm/tip/usr/include/mtd/jffs2-user.h 1 /dev/shm/tip/usr/include/linux/socket.h 1 /dev/shm/tip/usr/include/linux/coda_psdev.h 1 /dev/shm/tip/usr/include/asm/prctl.hThey are all of the "extern's make no sense in userspace" type. What was the verdict, are they worth touching, or should we turn off this warning in 'make
headers_check'?
Quoted 5 lines
Quoted 2 lines
the warning wouldnt have been added if it didnt make sense ... like it says, prototypes for kernel functions make no sense in userspace headers
the existence of a warning does not justify it. For example the CONFIG_* warnings were deemed largely bogus and were removed.
kernel function prototypes make no sense in userspace, especially considering how much effort goes into avoiding namespace pollution. -mike
Quoted 19 lines · Mike Frysinger
Quoted 18 lines · Ingo Molnar
Quoted 17 lines · Mike Frysinger
Quoted 15 lines · Ingo Molnar
These are the remaining ones on x86:
17 /dev/shm/tip/usr/include/linux/reiserfs_fs.h 12 /dev/shm/tip/usr/include/linux/soundcard.h 6 /dev/shm/tip/usr/include/asm/setup.h 3 /dev/shm/tip/usr/include/linux/nubus.h 2 /dev/shm/tip/usr/include/linux/in6.h 1 /dev/shm/tip/usr/include/mtd/jffs2-user.h 1 /dev/shm/tip/usr/include/linux/socket.h 1 /dev/shm/tip/usr/include/linux/coda_psdev.h 1 /dev/shm/tip/usr/include/asm/prctl.hThey are all of the "extern's make no sense in userspace" type. What was the verdict, are they worth touching, or should we turn off this warning in 'make
headers_check'?
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
the warning wouldnt have been added if it didnt make sense ... like it says, prototypes for kernel functions make no sense in userspace headers
the existence of a warning does not justify it. For example the CONFIG_* warnings were deemed largely bogus and were removed.
kernel function prototypes make no sense in userspace, especially considering how much effort goes into avoiding namespace pollution.
i agree, i only addressed this rather incorrect statement:
"the warning wouldnt have been added if it didnt make sense ..."
Ingo
Quoted 10 lines · Jaswinder Singh Rajput
These are clean patches, I did not included anything which leads to any confusion or conflicts. I hope maintainers do not mind if these patches go to mainstream via Ingo's -tip along with other
headers_checkfixes.
headers_checkfix: ia64,fpu.harch/ia64/include/asm/fpu.h +0
-0
arch/ia64/include/asm/fpu.h line 12
Quoted 8 lines
arch/ia64/include/asm/fpu.h +1
-1@@ -6,7 +6,7 @@* David Mosberger-Tang <[email protected]> */ -#include <asm/types.h> +#include <linux/types.h> /* floating point status register: */ #define FPSR_TRAP_VD (1 << 0)/* invalid op trap disabled */
This one breaks the ia64 build for linux-next (since some assembly files include <asm/fpu.h> which then goes on to pull in a whole bunch of "C" include files that don't have __ASSEMBLY__ guards and so the assembler chokes on "enum" and "typedef" etc.)
Either revert this part ... or wrap the #include like this in fpu.h:
#ifndef __ASSEMBLY__
#include <linux/types.h>
#endif
Thanks
-Tony
Quoted 6 lines · Tony Luck
Either revert this part ... or wrap the #include like this in
fpu.h:#ifndef
__ASSEMBLY__
#include <linux/types.h>
#endif
That loses the
arch/ia64/include/asm/types.h:# define __IA64_UL(x) (x)
thing from <asm/types.h>, and makes some of the constants unusable from asm. Maybe nobody cares.
But it looks like that core really needs to use <asm/types.h> right now.
Linus
Quoted 8 lines · Linus Torvalds
Quoted 6 lines · Tony Luck
Either revert this part ... or wrap the #include like this in
fpu.h:#ifndef
__ASSEMBLY__
#include <linux/types.h>
#endif
Quoted 8 lines
That loses the
arch/ia64/include/asm/types.h:# define __IA64_UL(x) (x)thing from <
asm/types.h>, and makes some of the constants unusable from asm. Maybe nobody cares.But it looks like that core really needs to use <
asm/types.h> right now.
Note that these bits are not mainline yet, they are still being refined.
Jaswinder, because they can break the build we should proactively drop all architecture patches that do asm/types.h conversions.
I did build all the affected architectures via their defconfigs and they built just fine - but i cannot do wide coverage testing of them.
So i think we should drop these bits:
earth4:~/tip> gll --grep='asm/types.h' linus..core/header-fixes 1ff8f73: headers_check fix: xtensa, swab.h
4810987: headers_check fix: powerpc, swab.h
9f2cd96: headers_check fix: powerpc, kvm.h
785857f: headers_check fix: powerpc, elf.h
4be2c7f: headers_check fix: powerpc, bootx.h
726da1e: headers_check fix: parisc, swab.h
bef53ca: headers_check fix: mn10300, swab.h
a9f6acc: headers_check fix: mips, swab.h
d8cbec1: headers_check fix: m32r, swab.h
040c92b: headers_check fix: ia64, swab.h
6ce7950: headers_check fix: ia64, kvm.h
fa9ea6c: headers_check fix: ia64, fpu.h
295803e: headers_check fix: h8300, swab.h
dacd762: headers_check fix: frv, swab.h
350eb8b: headers_check fix: blackfin, swab.h
1c6ce70: headers_check fix: avr32, swab.h
e42ec24: headers_check fix: arm, swab.h
4af3bf6: headers_check fix: arm, setup.h
f100e6d: headers_check fix: arm, a.out.h
3fd5906: headers_check fix: alpha, swab.h
and send the rest to Linus if all outstanding observations have been addressed. What do you think?
Ingo
Quoted 30 lines · Ingo Molnar
Jaswinder, because they can break the build we should proactively drop all architecture patches that do
asm/types.hconversions.I did build all the affected architectures via their defconfigs and they built just fine - but i cannot do wide coverage testing of them.
So i think we should drop these bits:
earth4:~/tip> gll --grep='asm/types.h' linus..core/header-fixes 1ff8f73:
headers_checkfix: xtensa,swab.h
4810987:headers_checkfix: powerpc,swab.h
9f2cd96:headers_checkfix: powerpc,kvm.h
785857f:headers_checkfix: powerpc,elf.h
4be2c7f:headers_checkfix: powerpc,bootx.h
726da1e:headers_checkfix: parisc,swab.h
bef53ca:headers_checkfix: mn10300,swab.h
a9f6acc:headers_checkfix: mips,swab.h
d8cbec1:headers_checkfix: m32r,swab.h
040c92b:headers_checkfix: ia64,swab.h
6ce7950:headers_checkfix: ia64,kvm.h
fa9ea6c:headers_checkfix: ia64,fpu.h
295803e:headers_checkfix: h8300,swab.h
dacd762:headers_checkfix: frv,swab.h
350eb8b:headers_checkfix: blackfin,swab.h
1c6ce70:headers_checkfix: avr32,swab.h
e42ec24:headers_checkfix: arm,swab.h
4af3bf6:headers_checkfix: arm,setup.h
f100e6d:headers_checkfix: arm,a.out.h
3fd5906:headers_checkfix: alpha,swab.h
Quoted 3 lines
and send the rest to Linus if all outstanding observations have been addressed. What do you think?
The problem is if we include linux/types.h in assembly file we will get error.
We can solve this problem by four options (or may be more):
1. by wrapping #ifndef __ASSEMBLY__ files which are used by assembly code as suggested by Tony.
2. fix linux/types.h so that assembly file can also use it
3. drop patches which are used by assembly files
4. drop all architecture patches as you suggested.
Please do whatever seems best to you.
--
JSR
Quoted 1 line · Jaswinder Singh Rajput
2. fix
linux/types.hso that assembly file can also use it
considering checkpatch.pl also whines about asm/types.h -> linux/types.h, this sound reasonable. have the file pull in asm/types.h and wrap the rest of it in !__ASSEMBLY__ ... -mike
Quoted 43 lines · Jaswinder Singh Rajput
Quoted 30 lines · Ingo Molnar
Jaswinder, because they can break the build we should proactively drop all architecture patches that do
asm/types.hconversions.I did build all the affected architectures via their defconfigs and they built just fine - but i cannot do wide coverage testing of them.
So i think we should drop these bits:
earth4:~/tip> gll --grep='asm/types.h' linus..core/header-fixes 1ff8f73:
headers_checkfix: xtensa,swab.h
4810987:headers_checkfix: powerpc,swab.h
9f2cd96:headers_checkfix: powerpc,kvm.h
785857f:headers_checkfix: powerpc,elf.h
4be2c7f:headers_checkfix: powerpc,bootx.h
726da1e:headers_checkfix: parisc,swab.h
bef53ca:headers_checkfix: mn10300,swab.h
a9f6acc:headers_checkfix: mips,swab.h
d8cbec1:headers_checkfix: m32r,swab.h
040c92b:headers_checkfix: ia64,swab.h
6ce7950:headers_checkfix: ia64,kvm.h
fa9ea6c:headers_checkfix: ia64,fpu.h
295803e:headers_checkfix: h8300,swab.h
dacd762:headers_checkfix: frv,swab.h
350eb8b:headers_checkfix: blackfin,swab.h
1c6ce70:headers_checkfix: avr32,swab.h
e42ec24:headers_checkfix: arm,swab.h
4af3bf6:headers_checkfix: arm,setup.h
f100e6d:headers_checkfix: arm,a.out.h
3fd5906:headers_checkfix: alpha,swab.hQuoted 3 lines
and send the rest to Linus if all outstanding observations have been addressed. What do you think?
The problem is if we include
linux/types.hin assembly file we will get error.We can solve this problem by four options (or may be more):
1. by wrapping #ifndef__ASSEMBLY__files which are used by assembly code as suggested by Tony.
Quoted 5 lines
2. fix
linux/types.hso that assembly file can also use it3. drop patches which are used by assembly files
4. drop all architecture patches as you suggested.
hm, the highest quality approach seems to be #2, right?
Ingo
PATCH 1/1 revert headers_check fix: ia64, fpu.h
In reply to Jaswinder Singh Rajputarch/ia64/include/asm/fpu.h line 9
Quoted 10 lines
arch/ia64/include/asm/fpu.h +1
-1@@ -6,7 +6,7 @@* David Mosberger-Tang <[email protected]> */ -#include <asm/types.h> +#include <linux/types.h>
this change break ia64 build perfectly.
this patch seems don't tested at all.
Ingo, I hope you ask patch author how to test posted patch ;-)
=
Subject: [PATCH] revert headers_check fix: ia64, fpu.h
commit fa9ea6c7abd94482ecd84e130676b6a1b3e61c2c break ia64 build perfectly. it because ia64 has following include file dependency.
entry.S
-> asm/processor.h
-> asm/ptrace.h
-> asm/fpu.hThen, above commit introduce below dependency.
entry.S
-> asm/processor.h
-> asm/ptrace.h
-> asm/fpu.h
-> linux/types.h
-> linux/posix_types.h
-> linux/stddef.hThen, assembler can't intepret following statement in stddef.h
enum {
false = 0,
true = 1
};
Therefore, >100 line tons error was outputed.
--- arch/ia64/include/asm/fpu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Index: b/arch/ia64/include/asm/fpu.h =================================--- a/arch/ia64/include/asm/fpu.h +++ b/arch/ia64/include/asm/fpu.h
@@ -6,7 +6,7 @@
* David Mosberger-Tang <[email protected]>
*/
-#include <linux/types.h>
+#include <asm/types.h>
/* floating point status register: */
#define FPSR_TRAP_VD (1 << 0) /* invalid op trap disabled */
Re: [linux-next][PATCH] revert headers_check fix: ia64, fpu.h
Quoted 16 lines · KOSAKI Motohiro
Signed-off-by KOSAKI Motohiro <[email protected]>Cc Jaswinder Singh Rajput <[email protected]>Cc Andrew Morton <[email protected]>Cc linux-next <[email protected]>Cc linux-ia64 <[email protected]>Cc Tony Luck <[email protected]>--- arch/ia64/include/asm/fpu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Index:
b/arch/ia64/include/asm/fpu.h
===================================================================
arch/ia64/include/asm/fpu.h line 10
Quoted 6 lines
arch/ia64/include/asm/fpu.h +1
-1@@ -6,7 +6,7 @@* David Mosberger-Tang <[email protected]> */ -#include <linux/types.h> +#include <asm/types.h>
No , we do not even need asm/types.h
Subject: [PATCH] Neither asm/types.h nor linux/types.h is not required for arch/ia64/include/asm/fpu.h
--- arch/ia64/include/asm/fpu.h | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-)
arch/ia64/include/asm/fpu.h +0 -2
@@ -6,8 +6,6 @@* David Mosberger-Tang <[email protected]> */ -#include <linux/types.h> -/* floating point status register: */ #define FPSR_TRAP_VD (1 << 0)/* invalid op trap disabled */ #define FPSR_TRAP_DD (1 << 1)/* denormal trap disabled */
Signature · 1 line
1.6.1.1
From 64e19dcc60cf9cd1455af5b0a9aaf45e7f00dde8 Mon Sep 17 00:00:00 2001
From: Jaswinder Singh Rajput <[email protected]>
Date: Fri, 6 Feb 2009 08:43:29 +0000
Subject: [PATCH] Neither asm/types.h nor linux/types.h is not required for arch/ia64/include/asm/fpu.h
--- arch/ia64/include/asm/fpu.h | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-)
arch/ia64/include/asm/fpu.h +0 -2
@@ -6,8 +6,6 @@* David Mosberger-Tang <[email protected]> */ -#include <linux/types.h> -/* floating point status register: */ #define FPSR_TRAP_VD (1 << 0)/* invalid op trap disabled */ #define FPSR_TRAP_DD (1 << 1)/* denormal trap disabled */
Signature · 1 line
1.6.1.1
Re: [linux-next][PATCH] revert headers_check fix: ia64, fpu.h
Quoted 13 lines
arch/ia64/include/asm/fpu.h line 10
Quoted 10 lines
Index:
b/arch/ia64/include/asm/fpu.h=================================> > ---a/arch/ia64/include/asm/fpu.h+++b/arch/ia64/include/asm/fpu.harch/ia64/include/asm/fpu.h +1
-1@@ -6,7 +6,7 @@* David Mosberger-Tang <[email protected]> */ -#include <linux/types.h> +#include <asm/types.h> No , we do not even need
asm/types.h
Quoted 4 lines
Subject: [PATCH] Neither
asm/types.hnorlinux/types.his not required forarch/ia64/include/asm/fpu.hSigned-off-by Jaswinder Singh Rajput <[email protected]>
ok. I confirmed.
thanks.
Quoted 19 lines
--- arch/ia64/include/asm/fpu.h | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-)arch/ia64/include/asm/fpu.h +0
-2@@ -6,8 +6,6 @@* David Mosberger-Tang <[email protected]> */ -#include <linux/types.h> -/* floating point status register: */ #define FPSR_TRAP_VD (1 << 0)/* invalid op trap disabled */ #define FPSR_TRAP_DD (1 << 1)/* denormal trap disabled */ Signature · 1 line
1.6.1.1
Re: [linux-next][PATCH] revert headers_check fix: ia64, fpu.h
In reply to KOSAKI MotohiroQuoted 8 lines · KOSAKI Motohiro
Quoted 8 lines
arch/ia64/include/asm/fpu.h +0
-0@@ -6,7 +6,7 @@* David Mosberger-Tang <[email protected]> */
Quoted 7 lines
arch/ia64/include/asm/fpu.h line 9
Quoted 2 lines
arch/ia64/include/asm/fpu.h +1
-1-#include <asm/types.h> +#include <linux/types.h> this change break ia64 build perfectly.
this patch seems don't tested at all.Ingo, I hope you ask patch author how to test posted patch ;-)
Patch author test the patch by adding it to a git tree that hits -next. And this catched ths bug - so -next served its purpose.
Sam
Quoted 45 lines · Ingo Molnar
Quoted 43 lines · Jaswinder Singh Rajput
Quoted 30 lines · Ingo Molnar
Jaswinder, because they can break the build we should proactively drop all architecture patches that do
asm/types.hconversions.I did build all the affected architectures via their defconfigs and they built just fine - but i cannot do wide coverage testing of them.
So i think we should drop these bits:
earth4:~/tip> gll --grep='asm/types.h' linus..core/header-fixes 1ff8f73:
headers_checkfix: xtensa,swab.h
4810987:headers_checkfix: powerpc,swab.h
9f2cd96:headers_checkfix: powerpc,kvm.h
785857f:headers_checkfix: powerpc,elf.h
4be2c7f:headers_checkfix: powerpc,bootx.h
726da1e:headers_checkfix: parisc,swab.h
bef53ca:headers_checkfix: mn10300,swab.h
a9f6acc:headers_checkfix: mips,swab.h
d8cbec1:headers_checkfix: m32r,swab.h
040c92b:headers_checkfix: ia64,swab.h
6ce7950:headers_checkfix: ia64,kvm.h
fa9ea6c:headers_checkfix: ia64,fpu.h
295803e:headers_checkfix: h8300,swab.h
dacd762:headers_checkfix: frv,swab.h
350eb8b:headers_checkfix: blackfin,swab.h
1c6ce70:headers_checkfix: avr32,swab.h
e42ec24:headers_checkfix: arm,swab.h
4af3bf6:headers_checkfix: arm,setup.h
f100e6d:headers_checkfix: arm,a.out.h
3fd5906:headers_checkfix: alpha,swab.hQuoted 3 lines
and send the rest to Linus if all outstanding observations have been addressed. What do you think?
The problem is if we include
linux/types.hin assembly file we will get error.We can solve this problem by four options (or may be more):
1. by wrapping #ifndef__ASSEMBLY__files which are used by assembly code as suggested by Tony.
Quoted 8 lines
Quoted 5 lines
2. fix
linux/types.hso that assembly file can also use it3. drop patches which are used by assembly files
4. drop all architecture patches as you suggested.
hm, the highest quality approach seems to be #2, right?
Is this safe OR we can make it more safer:
Subject: [PATCH] make linux/types.h as assembly safe
--- include/linux/types.h | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
include/linux/types.h +2 -1
@@ -1,6 +1,7 @@#ifndef _LINUX_TYPES_H#define _LINUX_TYPES_H +#ifndef __ASSEMBLY__#ifdef __KERNEL__#define DECLARE_BITMAP (name,bits) \
@@ -212,5 +213,5 @@ struct ustat { };#endif /* __KERNEL__ */ - +#endif /* __ASSEMBLY__ */ #endif /* _LINUX_TYPES_H */
Signature · 1 line
1.6.0.6
Quoted 13 lines · Jaswinder Singh Rajput
include/linux/types.h +1
-0@@ -1,6 +1,7 @@#ifndef _LINUX_TYPES_H#define _LINUX_TYPES_H +#ifndef __ASSEMBLY__#ifdef __KERNEL__#define DECLARE_BITMAP (name,bits) \
include/linux/types.h struct ustat { · line 217
Quoted 6 lines
include/linux/types.h +1
-1@@ -212,5 +213,5 @@ struct ustat { };#endif /* __KERNEL__ */ - +#endif /* __ASSEMBLY__ */ #endif /* _LINUX_TYPES_H */
So no point including this file in assembly with this patch - the ifndef disables the entire file.
Quoted 16 lines · Russell King - ARM Linux
Quoted 15 lines · Jaswinder Singh Rajput
include/linux/types.h +1
-0@@ -1,6 +1,7 @@#ifndef _LINUX_TYPES_H#define _LINUX_TYPES_H +#ifndef __ASSEMBLY__#ifdef __KERNEL__#define DECLARE_BITMAP (name,bits) \@@ -212,5 +213,5 @@ struct ustat { };
Quoted 7 lines
include/linux/types.h struct ustat { · line 217
Quoted 4 lines
include/linux/types.h +1
-1#endif /* __KERNEL__ */ - +#endif /* __ASSEMBLY__ */ #endif /* _LINUX_TYPES_H */ So no point including this file in assembly with this patch - the ifndef disables the entire file.
Truth Table of linux/types.h :
If Assembly then N
otherwise Y
what your table says.
--
JSR
Quoted 25 lines · Jaswinder Singh Rajput
Quoted 16 lines · Russell King - ARM Linux
Quoted 15 lines · Jaswinder Singh Rajput
include/linux/types.h +1
-0@@ -1,6 +1,7 @@#ifndef _LINUX_TYPES_H#define _LINUX_TYPES_H +#ifndef __ASSEMBLY__#ifdef __KERNEL__#define DECLARE_BITMAP (name,bits) \@@ -212,5 +213,5 @@ struct ustat { };Quoted 7 lines
include/linux/types.h struct ustat { · line 217
Quoted 4 lines
include/linux/types.h +1
-1#endif /* __KERNEL__ */ - +#endif /* __ASSEMBLY__ */ #endif /* _LINUX_TYPES_H */ So no point including this file in assembly with this patch - the ifndef disables the entire file.
Quoted 6 lines
Truth Table of
linux/types.h:If Assembly then N
otherwise Ywhat your table says.
If the entire file is not suitable for assembly, don't include the file in assembly files. Nice and simple, and no need to add additional ifdefs.
Re: [linux-next][PATCH] revert headers_check fix: ia64, fpu.h
In reply to KOSAKI MotohiroQuoted 13 lines · KOSAKI Motohiro
Quoted 13 lines
arch/ia64/include/asm/fpu.h line 10
Quoted 10 lines
Index:
b/arch/ia64/include/asm/fpu.h=================================> > > ---a/arch/ia64/include/asm/fpu.h+++b/arch/ia64/include/asm/fpu.harch/ia64/include/asm/fpu.h +1
-1@@ -6,7 +6,7 @@* David Mosberger-Tang <[email protected]> */ -#include <linux/types.h> +#include <asm/types.h> No , we do not even need
asm/types.h
Quoted 8 lines
Quoted 4 lines
Subject: [PATCH] Neither
asm/types.hnorlinux/types.his not required forarch/ia64/include/asm/fpu.hSigned-off-by Jaswinder Singh Rajput <[email protected]>ok. I confirmed.
Tested-by KOSAKI Motohiro <[email protected]>Reviewed-by KOSAKI Motohiro <[email protected]>
Thanks.
Jaswinder, mind adding these tags to the commit and sending a pull request with all fixes?
Ingo
Quoted 28 lines · Russell King - ARM Linux
Quoted 27 lines · Jaswinder Singh Rajput
Quoted 16 lines · Russell King - ARM Linux
Quoted 15 lines · Jaswinder Singh Rajput
include/linux/types.h +1
-0@@ -1,6 +1,7 @@#ifndef _LINUX_TYPES_H#define _LINUX_TYPES_H +#ifndef __ASSEMBLY__#ifdef __KERNEL__#define DECLARE_BITMAP (name,bits) \@@ -212,5 +213,5 @@ struct ustat { };Quoted 7 lines
include/linux/types.h struct ustat { · line 217
Quoted 4 lines
include/linux/types.h +1
-1#endif /* __KERNEL__ */ - +#endif /* __ASSEMBLY__ */ #endif /* _LINUX_TYPES_H */ So no point including this file in assembly with this patch - the ifndef disables the entire file.
Truth Table of
linux/types.h:
Quoted 7 lines
Quoted 4 lines
If Assembly then N
otherwise Ywhat your table says.
If the entire file is not suitable for assembly, don't include the file in assembly files. Nice and simple, and no need to add additional ifdefs.
Well types.h easily gets included in other files though, which might be partially suited for assembly - and have !__ASSEMBLY__ portions that rely on a types.h include.
So making this file an invariant in .S files does not sound like a bad idea to me. Is there any downside?
Ingo
Quoted 6 lines · Russell King - ARM Linux
Quoted 6 lines
Quoted 3 lines
So no point including this file in assembly with this patch - the ifndef disables the entire file.
Truth Table of
linux/types.h:
Quoted 7 lines
Quoted 4 lines
If Assembly then N
otherwise Ywhat your table says.
If the entire file is not suitable for assembly, don't include the file in assembly files. Nice and simple, and no need to add additional ifdefs.
Ahh, so your truth table says:
If Assembly then make different header files
If C then make another header files
Do not you think your truth table is complex and very difficult to handle and maintain ?
Can we make things simple and easier.
Thanks,
--
JSR
Quoted 12 lines · Jaswinder Singh Rajput
Quoted 11 lines · Russell King - ARM Linux
Quoted 10 lines
Quoted 3 lines
So no point including this file in assembly with this patch - the ifndef disables the entire file.
Truth Table of
linux/types.h:If Assembly then N
otherwise Ywhat your table says.
Quoted 7 lines
Quoted 2 lines
If the entire file is not suitable for assembly, don't include the file in assembly files. Nice and simple, and no need to add additional ifdefs.
Ahh, so your truth table says:
If Assembly then make different header files
If C then make another header files
No. My point is exactly as I stated above, please don't twist my statement into something that it isn't.
Taking this further, if you're including linux/types.h into another header file, you're including it because you want some C type from that or an included file. Use of that type is also not ASM friendly, so the use is going to have to be excluded by ifndef in that header.
So why not do as we *already* do and ensure that the linux/types.h inclusion happens within that section.
Why change the rules?
Re: [linux-next][PATCH] revert headers_check fix: ia64, fpu.h
In reply to Ingo MolnarQuoted 21 lines · Ingo Molnar
Quoted 19 lines · KOSAKI Motohiro
Quoted 18 lines
arch/ia64/include/asm/fpu.h line 10
Quoted 11 lines
Index:
b/arch/ia64/include/asm/fpu.h
===================================================================arch/ia64/include/asm/fpu.h +1
-1@@ -6,7 +6,7 @@* David Mosberger-Tang <[email protected]> */ -#include <linux/types.h> +#include <asm/types.h> No , we do not even need
asm/types.hSubject: [PATCH] Neither
asm/types.hnorlinux/types.his not required forarch/ia64/include/asm/fpu.hSigned-off-by Jaswinder Singh Rajput <[email protected]>
Quoted 8 lines
Quoted 3 lines
ok. I confirmed.
Tested-by KOSAKI Motohiro <[email protected]>Reviewed-by KOSAKI Motohiro <[email protected]>Thanks.
Jaswinder, mind adding these tags to the commit and sending a pull request with all fixes?
The following changes since commit 0b86a4e34d885e734a4c4e46293376f3f1c639eb:
Ingo Molnar (1):
Merge branch 'core/header-fixes' of git://git.kernel.org/.../jaswinder/linux-2.6-tip into core/header-fixes
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/jaswinder/linux-2.6-tip.git core/header-fixes
Jaswinder Singh Rajput (2):
Neither asm/types.h nor linux/types.h is required for arch/ia64/include/asm/fpu.h make linux/types.h as assembly safe
arch/ia64/include/asm/fpu.h | 2 -- include/linux/types.h | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-)
Complete diff:
arch/ia64/include/asm/fpu.h +0 -2
@@ -6,8 +6,6 @@* David Mosberger-Tang <[email protected]> */ -#include <linux/types.h> -/* floating point status register: */ #define FPSR_TRAP_VD (1 << 0)/* invalid op trap disabled */ #define FPSR_TRAP_DD (1 << 1)/* denormal trap disabled */
include/linux/types.h +2 -1
@@ -1,6 +1,7 @@#ifndef _LINUX_TYPES_H#define _LINUX_TYPES_H +#ifndef __ASSEMBLY__#ifdef __KERNEL__#define DECLARE_BITMAP (name,bits) \
@@ -212,5 +213,5 @@ struct ustat { };#endif /* __KERNEL__ */ - +#endif /* __ASSEMBLY__ */ #endif /* _LINUX_TYPES_H */
Re: [linux-next][PATCH] revert headers_check fix: ia64, fpu.h
Quoted 34 lines · Jaswinder Singh Rajput
Quoted 20 lines · Ingo Molnar
Quoted 18 lines · KOSAKI Motohiro
Quoted 17 lines
arch/ia64/include/asm/fpu.h line 10
Quoted 10 lines
Index:
b/arch/ia64/include/asm/fpu.h=================================> > > > > ---a/arch/ia64/include/asm/fpu.h+++b/arch/ia64/include/asm/fpu.harch/ia64/include/asm/fpu.h +1
-1@@ -6,7 +6,7 @@* David Mosberger-Tang <[email protected]> */ -#include <linux/types.h> +#include <asm/types.h> No , we do not even need
asm/types.hSubject: [PATCH] Neither
asm/types.hnorlinux/types.his not required forarch/ia64/include/asm/fpu.hSigned-off-by Jaswinder Singh Rajput <[email protected]>Quoted 8 lines
Quoted 3 lines
ok. I confirmed.
Tested-by KOSAKI Motohiro <[email protected]>Reviewed-by KOSAKI Motohiro <[email protected]>Thanks.
Jaswinder, mind adding these tags to the commit and sending a pull request with all fixes?
The following changes since commit
0b86a4e34d885e734a4c4e46293376f3f1c639eb:
Ingo Molnar (1):
Merge branch 'core/header-fixes' ofgit://git.kernel.org/.../jaswinder/linux-2.6-tipinto core/header-fixes
Quoted 7 lines
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/jaswinder/linux-2.6-tip.gitcore/header-fixesJaswinder Singh Rajput (2):
Neitherasm/types.hnorlinux/types.his required forarch/ia64/include/asm/fpu.hmakelinux/types.has assembly safe
I continue to disagree with the need for the second patch.
Re: [linux-next][PATCH] revert headers_check fix: ia64, fpu.h
Quoted 37 lines · Russell King - ARM Linux
Quoted 36 lines · Jaswinder Singh Rajput
Quoted 20 lines · Ingo Molnar
Quoted 18 lines · KOSAKI Motohiro
Quoted 17 lines
arch/ia64/include/asm/fpu.h line 10
Quoted 10 lines
Index:
b/arch/ia64/include/asm/fpu.h=================================> > > > > > ---a/arch/ia64/include/asm/fpu.h+++b/arch/ia64/include/asm/fpu.harch/ia64/include/asm/fpu.h +1
-1@@ -6,7 +6,7 @@* David Mosberger-Tang <[email protected]> */ -#include <linux/types.h> +#include <asm/types.h> No , we do not even need
asm/types.hSubject: [PATCH] Neither
asm/types.hnorlinux/types.his not required forarch/ia64/include/asm/fpu.hSigned-off-by Jaswinder Singh Rajput <[email protected]>Quoted 8 lines
Quoted 3 lines
ok. I confirmed.
Tested-by KOSAKI Motohiro <[email protected]>Reviewed-by KOSAKI Motohiro <[email protected]>Thanks.
Jaswinder, mind adding these tags to the commit and sending a pull request with all fixes?
The following changes since commit
0b86a4e34d885e734a4c4e46293376f3f1c639eb:
Ingo Molnar (1):
Merge branch 'core/header-fixes' ofgit://git.kernel.org/.../jaswinder/linux-2.6-tipinto core/header-fixesare available in the git repository at:
Quoted 7 lines
Quoted 5 lines
git://git.kernel.org/pub/scm/linux/kernel/git/jaswinder/linux-2.6-tip.gitcore/header-fixesJaswinder Singh Rajput (2):
Neitherasm/types.hnorlinux/types.his required forarch/ia64/include/asm/fpu.hmakelinux/types.has assembly safeI continue to disagree with the need for the second patch.
But have not replied to my mail about that so far.
Why is it wrong to make types.h an assembly-invariant? It is positively helpful for mixed-mode headers and has no downsides whatsoever.
Ingo
Re: [linux-next][PATCH] revert headers_check fix: ia64, fpu.h
Quoted 11 lines · Ingo Molnar
Quoted 6 lines · Russell King - ARM Linux
Quoted 3 lines · Jaswinder Singh Rajput
Jaswinder Singh Rajput (2):
Neitherasm/types.hnorlinux/types.his required forarch/ia64/include/asm/fpu.hmakelinux/types.has assembly safeI continue to disagree with the need for the second patch.
But have not replied to my mail about that so far.
Sigh. No I didn't - because I also got a reply from Jaswinder and covered all points in _that_ reply.
Would you like me to re-send my reply so that you can appear in the To:
header?
Stop making this discussion stupidly obtuse.
Re: [linux-next][PATCH] revert headers_check fix: ia64, fpu.h
In reply to Russell King - ARM LinuxQuoted 38 lines · Russell King - ARM Linux
Quoted 37 lines · Jaswinder Singh Rajput
Quoted 21 lines · Ingo Molnar
Quoted 19 lines · KOSAKI Motohiro
Quoted 18 lines
arch/ia64/include/asm/fpu.h line 10
Quoted 11 lines
Index:
b/arch/ia64/include/asm/fpu.h
===================================================================arch/ia64/include/asm/fpu.h +1
-1@@ -6,7 +6,7 @@* David Mosberger-Tang <[email protected]> */ -#include <linux/types.h> +#include <asm/types.h> No , we do not even need
asm/types.hSubject: [PATCH] Neither
asm/types.hnorlinux/types.his not required forarch/ia64/include/asm/fpu.hSigned-off-by Jaswinder Singh Rajput <[email protected]>Quoted 8 lines
Quoted 3 lines
ok. I confirmed.
Tested-by KOSAKI Motohiro <[email protected]>Reviewed-by KOSAKI Motohiro <[email protected]>Thanks.
Jaswinder, mind adding these tags to the commit and sending a pull request with all fixes?
The following changes since commit
0b86a4e34d885e734a4c4e46293376f3f1c639eb:
Ingo Molnar (1):
Merge branch 'core/header-fixes' ofgit://git.kernel.org/.../jaswinder/linux-2.6-tipinto core/header-fixesare available in the git repository at:
Quoted 7 lines
Quoted 5 lines
git://git.kernel.org/pub/scm/linux/kernel/git/jaswinder/linux-2.6-tip.gitcore/header-fixesJaswinder Singh Rajput (2):
Neitherasm/types.hnorlinux/types.his required forarch/ia64/include/asm/fpu.hmakelinux/types.has assembly safeI continue to disagree with the need for the second patch.
Like Ingo suggested:
Quoted 7 lines · Ingo Molnar
Well
types.heasily gets included in other files though, which might be
partially suited for assembly - and have !__ASSEMBLY__ portions that rely on atypes.hinclude.So making this file an invariant in .S files does not sound like a bad idea to me. Is there any downside?
We cannot see any downside of this patch.
But we can see upside of this patch is:
1. No need to protect linux/types.h with #ifndef __ASSEMBLY__ in many files
2. So we trying to replace multiple #ifndef __ASSEMBLY__ with one.
Thanks,
--
JSR
Re: [linux-next][PATCH] revert headers_check fix: ia64, fpu.h
Quoted 19 lines · Jaswinder Singh Rajput
Quoted 6 lines · Russell King - ARM Linux
Quoted 3 lines · Jaswinder Singh Rajput
Jaswinder Singh Rajput (2):
Neitherasm/types.hnorlinux/types.his required forarch/ia64/include/asm/fpu.hmakelinux/types.has assembly safeI continue to disagree with the need for the second patch.
Like Ingo suggested:
Quoted 7 lines · Ingo Molnar
Well
types.heasily gets included in other files though, which might be
partially suited for assembly - and have !__ASSEMBLY__ portions that rely on atypes.hinclude.So making this file an invariant in .S files does not sound like a bad idea to me. Is there any downside?
Quoted 6 lines
We cannot see any downside of this patch.
But we can see upside of this patch is:
1. No need to protectlinux/types.hwith #ifndef__ASSEMBLY__in many files
2. So we trying to replace multiple #ifndef__ASSEMBLY__with one.
The point is:
1. If the parent include needs to include linux/types.h to get at C types _and_ the include file needs to also be included by assembly code, it itself needs to have #ifndef __ASSEMBLY__ to protect those uses from the assembly code.
In that case, the linux/types.h include should be contained within the #ifndef __ASSEMBLY__ .. #endif block along with all C only parts of the header file.
2. if it doesn't need C types from linux/types.h, then that header has no business including linux/types.h, and the include should be eliminated to save the already dirbolically slow compiler from having to read and parse that file, and more importantly allowing it to eliminate linux/types.h from the build dependencies.
Yes, you can wrap linux/types.h with that ifndef, and yes it will fix any problems, but I view it as a hack rather than fixing the real problem which is lazyness by code writers to get their include dependencies right.
Quoted 4 lines · Russell King - ARM Linux
Taking this further, if you're including
linux/types.hinto another header file, you're including it because you want some C type from that or an included file. Use of that type is also not ASM friendly, so the use is going to have to be excluded by ifndef in that header.
There's a ton of header files that can be included in assembly code and which also contain C declarations and definitions. This is achieved by adding a:
#ifndef __ASSEMBLY__
#endif
Blocks around the C code. Especially for smallish or single-purpose files this is often a cleaner method than splitting the file.
There's more than 40 such headers on x86 alone.
Ingo
Re: [linux-next][PATCH] revert headers_check fix: ia64, fpu.h
In reply to Russell King - ARM LinuxQuoted 13 lines · Russell King - ARM Linux
Quoted 11 lines · Ingo Molnar
Quoted 6 lines · Russell King - ARM Linux
Quoted 3 lines · Jaswinder Singh Rajput
Jaswinder Singh Rajput (2):
Neitherasm/types.hnorlinux/types.his required forarch/ia64/include/asm/fpu.hmakelinux/types.has assembly safeI continue to disagree with the need for the second patch.
But have not replied to my mail about that so far.
Quoted 7 lines
Sigh. No I didn't - because I also got a reply from Jaswinder and covered all points in _that_ reply.
Would you like me to re-send my reply so that you can appear in the To:
header?Stop making this discussion stupidly obtuse.
I am not making anything stupidly obtuse, your reply to Jaswinder was in a different (but related) portion of the thread, that i have not read yet at that point. I have read it now and have replied.
Ingo
Quoted 12 lines · Ingo Molnar
Quoted 4 lines · Russell King - ARM Linux
Taking this further, if you're including
linux/types.hinto another header file, you're including it because you want some C type from that or an included file. Use of that type is also not ASM friendly, so the use is going to have to be excluded by ifndef in that header.There's a ton of header files that can be included in assembly code and which also contain C declarations and definitions. This is achieved by adding a:
Quoted 5 lines
#ifndef
__ASSEMBLY__
#endifBlocks around the C code. Especially for smallish or single-purpose files this is often a cleaner method than splitting the file.
Err, yes, thank you for justifying my point.
And no, I didn't say anything about splitting files. Not sure why you brought that up.
Re: [linux-next][PATCH] revert headers_check fix: ia64, fpu.h
In reply to Russell King - ARM LinuxQuoted 9 lines · Russell King - ARM Linux
Quoted 6 lines
We cannot see any downside of this patch.
But we can see upside of this patch is:
1. No need to protectlinux/types.hwith #ifndef__ASSEMBLY__in many files
2. So we trying to replace multiple #ifndef__ASSEMBLY__with one.The point is:
Quoted 8 lines
1. If the parent include needs to include
linux/types.hto get at C types _and_ the include file needs to also be included by assembly code, it itself needs to have #ifndef__ASSEMBLY__to protect those uses from the assembly code.In that case, the
linux/types.hinclude should be contained within the #ifndef__ASSEMBLY__.. #endif block along with all C only parts of the header file.
That makes the code much less clean: putting #include's in the middle of a header is poor style and leads to people failing to consider dependencies. We generally put them to the header portion.
Putting an #include line in the middle of a header file is a receipe for a dependency hell (it can easily fall inside #ifdefs, can be overlooked, etc.), so it's _strongly_ discouraged (at least on arch/x86).
Quoted 9 lines
2. if it doesn't need C types from
linux/types.h, then that header has no business includinglinux/types.h, and the include should be eliminated to save the already dirbolically slow compiler from having to read and parse that file, and more importantly allowing it to eliminatelinux/types.hfrom the build dependencies.Yes, you can wrap
linux/types.hwith that ifndef, and yes it will fix any problems, but I view it as a hack rather than fixing the real problem which is lazyness by code writers to get their include dependencies right.
It is not about include dependencies at all - it is about the existing and accepted practice which you did not consider in your argument: the use of mixed-mode headers. A linux/types.h include there is perfectly clean and should not break the build.
Again, i repeat: there is nothing wrong about making a small number of very commonly used C header assembly-invariant. It results in better structured header files and cleaner code.
The argument is as simple as that, and up until this email you wrote roughly 10 replies and it's not even that you disagreed with our point on some honest basis that we could argue with - the ting is that you failed to even _realize_ this argument of us and you tried to force your partial (and trivially flawed) world view on us impatiently. In view of that you need to be more careful before calling people 'stupidly obtuse' ;-)
Ingo
Re: [linux-next][PATCH] revert headers_check fix: ia64, fpu.h
Quoted 21 lines · Ingo Molnar
Quoted 9 lines · Russell King - ARM Linux
Quoted 6 lines
We cannot see any downside of this patch.
But we can see upside of this patch is:
1. No need to protectlinux/types.hwith #ifndef__ASSEMBLY__in many files
2. So we trying to replace multiple #ifndef__ASSEMBLY__with one.The point is:
Quoted 8 lines
1. If the parent include needs to include
linux/types.hto get at C types _and_ the include file needs to also be included by assembly code, it itself needs to have #ifndef__ASSEMBLY__to protect those uses from the assembly code.In that case, the
linux/types.hinclude should be contained within the #ifndef__ASSEMBLY__.. #endif block along with all C only parts of the header file.
Quoted 7 lines
That makes the code much less clean: putting #include's in the middle of a header is poor style and leads to people failing to consider dependencies. We generally put them to the header portion.
Putting an #include line in the middle of a header file is a receipe for a dependency hell (it can easily fall inside #ifdefs, can be overlooked, etc.), so it's _strongly_ discouraged (at least on
arch/x86).
Put them at the top then with an additional ifndef.
Quoted 6 lines
Quoted 6 lines
2. if it doesn't need C types from
linux/types.h, then that header has no business includinglinux/types.h, and the include should be eliminated to save the already dirbolically slow compiler from having to read and parse that file, and more importantly allowing it to eliminatelinux/types.hfrom the build dependencies.
Quoted 8 lines
Quoted 3 lines
Yes, you can wrap
linux/types.hwith that ifndef, and yes it will fix any problems, but I view it as a hack rather than fixing the real problem which is lazyness by code writers to get their include dependencies right.It is not about include dependencies at all - it is about the existing and accepted practice which you did not consider in your argument: the use of mixed-mode headers. A
linux/types.hinclude there is perfectly clean and should not break the build.
It _is_ about include dependencies.
Quoted 10 lines
Again, i repeat: there is nothing wrong about making a small number of very commonly used C header assembly-invariant. It results in better structured header files and cleaner code.
The argument is as simple as that, and up until this email you wrote roughly 10 replies and it's not even that you disagreed with our point on some honest basis that we could argue with - the ting is that you failed to even _realize_ this argument of us and you tried to force your partial (and trivially flawed) world view on us impatiently. In view of that you need to be more careful before calling people 'stupidly obtuse' ;-)
If you think that I'm ignoring your argument, then screw you.
I'm making a counter argument which I believe is _equally_ valid and which I believe is actually far more important - at least it is _to_ _me_.
I don't wish to see my build times extended any more than they already have been by sloppy and lazy programming in the kernel. And if I didn't make that point earlier, what a shame. I'm making it NOW.
I've been trying over the last six months to (a) reduce the number of files included in the ARM sub-tree and (b) reduce the namespace pollution from ARM headers into the generic kernel both with the aim of trying to improve build time. That's something you can verify by looking through the commits in arch/arm/include/asm if you think I'm making this up, which clearly you will do.
Oh why bring it up after 11 replies. I guess I'm just useless at expressing myself clearly.
Re: [linux-next][PATCH] revert headers_check fix: ia64, fpu.h
Quoted 26 lines · Russell King - ARM Linux
Quoted 25 lines · Ingo Molnar
Quoted 9 lines · Russell King - ARM Linux
Quoted 6 lines
We cannot see any downside of this patch.
But we can see upside of this patch is:
1. No need to protectlinux/types.hwith #ifndef__ASSEMBLY__in many files
2. So we trying to replace multiple #ifndef__ASSEMBLY__with one.The point is:
Quoted 8 lines
1. If the parent include needs to include
linux/types.hto get at C types _and_ the include file needs to also be included by assembly code, it itself needs to have #ifndef__ASSEMBLY__to protect those uses from the assembly code.In that case, the
linux/types.hinclude should be contained within the #ifndef__ASSEMBLY__.. #endif block along with all C only parts of the header file.That makes the code much less clean: putting #include's in the middle of a header is poor style and leads to people failing to consider dependencies. We generally put them to the header portion.
Quoted 5 lines
Quoted 3 lines
Putting an #include line in the middle of a header file is a receipe for a dependency hell (it can easily fall inside #ifdefs, can be overlooked, etc.), so it's _strongly_ discouraged (at least on
arch/x86).Put them at the top then with an additional ifndef.
So you advocate 40 stupid pairs of #ifdefs spread out, instead of a _single_, obvious #ifdef in a commonly used header?
Case closed.
Ingo
Re: [linux-next][PATCH] revert headers_check fix: ia64, fpu.h
Quoted 29 lines · Ingo Molnar
Quoted 26 lines · Russell King - ARM Linux
Quoted 25 lines · Ingo Molnar
Quoted 9 lines · Russell King - ARM Linux
Quoted 6 lines
We cannot see any downside of this patch.
But we can see upside of this patch is:
1. No need to protectlinux/types.hwith #ifndef__ASSEMBLY__in many files
2. So we trying to replace multiple #ifndef__ASSEMBLY__with one.The point is:
Quoted 8 lines
1. If the parent include needs to include
linux/types.hto get at C types _and_ the include file needs to also be included by assembly code, it itself needs to have #ifndef__ASSEMBLY__to protect those uses from the assembly code.In that case, the
linux/types.hinclude should be contained within the #ifndef__ASSEMBLY__.. #endif block along with all C only parts of the header file.That makes the code much less clean: putting #include's in the middle of a header is poor style and leads to people failing to consider dependencies. We generally put them to the header portion.
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
Putting an #include line in the middle of a header file is a receipe for a dependency hell (it can easily fall inside #ifdefs, can be overlooked, etc.), so it's _strongly_ discouraged (at least on
arch/x86).Put them at the top then with an additional ifndef.
So you advocate 40 stupid pairs of #ifdefs spread out, instead of a _single_, obvious #ifdef in a commonly used header?
As I see it, if you want all your style points to be adhered to, then yes. And I do believe it to be a valid solution.
Personally, I'd put them nearer the C code.
That's precisely what I do with the ARM include files. Never been a problem.
Re: [linux-next][PATCH] revert headers_check fix: ia64, fpu.h
Quoted 39 lines · Russell King - ARM Linux
Quoted 29 lines · Ingo Molnar
Quoted 26 lines · Russell King - ARM Linux
Quoted 25 lines · Ingo Molnar
Quoted 9 lines · Russell King - ARM Linux
Quoted 6 lines
We cannot see any downside of this patch.
But we can see upside of this patch is:
1. No need to protectlinux/types.hwith #ifndef__ASSEMBLY__in many files
2. So we trying to replace multiple #ifndef__ASSEMBLY__with one.The point is:
Quoted 8 lines
1. If the parent include needs to include
linux/types.hto get at C types _and_ the include file needs to also be included by assembly code, it itself needs to have #ifndef__ASSEMBLY__to protect those uses from the assembly code.In that case, the
linux/types.hinclude should be contained within the #ifndef__ASSEMBLY__.. #endif block along with all C only parts of the header file.That makes the code much less clean: putting #include's in the middle of a header is poor style and leads to people failing to consider dependencies. We generally put them to the header portion.
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
Putting an #include line in the middle of a header file is a receipe for a dependency hell (it can easily fall inside #ifdefs, can be overlooked, etc.), so it's _strongly_ discouraged (at least on
arch/x86).Put them at the top then with an additional ifndef.
So you advocate 40 stupid pairs of #ifdefs spread out, instead of a _single_, obvious #ifdef in a commonly used header?
Quoted 7 lines
As I see it, if you want all your style points to be adhered to, then yes. And I do believe it to be a valid solution.
Personally, I'd put them nearer the C code.
That's precisely what I do with the ARM include files. Never been a problem.
I take this that you kind of agree that that removing ugly #ifdefs spread out is an upside. You failed to point out any downsides - you just seem to claim that you can live without the upsides. That is fine.
Ingo
Re: [linux-next][PATCH] revert headers_check fix: ia64, fpu.h
Quoted 3 lines · Ingo Molnar
I take this that you kind of agree that that removing ugly #ifdefs spread out is an upside. You failed to point out any downsides - you just seem to claim that you can live without the upsides. That is fine.
I'm sorry, I thought I pointed them out in my previous emails. Clearly you didn't read those emails in spite of replying to them.
Quoted 23 lines
Is this safe OR we can make it more safer:
Subject: [PATCH] make
linux/types.has assembly safeSigned-off-by Jaswinder Singh Rajput <[email protected]>--- include/linux/types.h | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)include/linux/types.h +1
-0@@ -1,6 +1,7 @@#ifndef _LINUX_TYPES_H#define _LINUX_TYPES_H +#ifndef __ASSEMBLY__#ifdef __KERNEL__#define DECLARE_BITMAP (name,bits) \
include/linux/types.h struct ustat { · line 217
Quoted 6 lines
include/linux/types.h +1
-1@@ -212,5 +213,5 @@ struct ustat { };#endif /* __KERNEL__ */ - +#endif /* __ASSEMBLY__ */ #endif /* _LINUX_TYPES_H */
This is wrong...
We should include the assumed assembly safe asm/types.h outside the __ASEMBLY__ ifdef.
Sam
Re: [linux-next][PATCH] revert headers_check fix: ia64, fpu.h
In reply to Russell King - ARM LinuxQuoted 44 lines · Russell King - ARM Linux
Quoted 19 lines · Jaswinder Singh Rajput
Quoted 6 lines · Russell King - ARM Linux
Quoted 3 lines · Jaswinder Singh Rajput
Jaswinder Singh Rajput (2):
Neitherasm/types.hnorlinux/types.his required forarch/ia64/include/asm/fpu.hmakelinux/types.has assembly safeI continue to disagree with the need for the second patch.
Like Ingo suggested:
Quoted 7 lines · Ingo Molnar
Well
types.heasily gets included in other files though, which might be
partially suited for assembly - and have !__ASSEMBLY__ portions that rely on atypes.hinclude.So making this file an invariant in .S files does not sound like a bad idea to me. Is there any downside?
Quoted 6 lines
We cannot see any downside of this patch.
But we can see upside of this patch is:
1. No need to protectlinux/types.hwith #ifndef__ASSEMBLY__in many files
2. So we trying to replace multiple #ifndef__ASSEMBLY__with one.The point is:
1. If the parent include needs to include
linux/types.hto get at C types _and_ the include file needs to also be included by assembly code, it itself needs to have #ifndef__ASSEMBLY__to protect those uses from the assembly code.In that case, the
linux/types.hinclude should be contained within the #ifndef__ASSEMBLY__.. #endif block along with all C only parts of the header file.2. if it doesn't need C types from
linux/types.h, then that header has no business includinglinux/types.h, and the include should be eliminated to save the already dirbolically slow compiler from having to read and parse that file, and more importantly allowing it to eliminatelinux/types.hfrom the build dependencies.
Quoted 3 lines
Yes, you can wrap
linux/types.hwith that ifndef, and yes it will fix any problems, but I view it as a hack rather than fixing the real problem which is lazyness by code writers to get their include dependencies right.
You guys are getting this wrong.
The patch from Jaswinder needs to be fixed so we unconditionally include <asm/types.h> from linux/types.h.
And then ll users can safely include linux/types.h and when we one day realize we can move some stuff used in .S files from asm/types.h to linux/types.h then we are all safe and no breakage.
the rule of thum is to include the linux/* variant if the same file exist in both linus/ and asm/ and types.h is in no way different here
And trying to make it different just becasue it is used in userspace intensively is just stupid and will be a cause of misunderstandings.
Sam
Quoted 25 lines · Sam Ravnborg
Quoted 25 lines
Is this safe OR we can make it more safer:
Subject: [PATCH] make
linux/types.has assembly safeSigned-off-by Jaswinder Singh Rajput <[email protected]>--- include/linux/types.h | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)include/linux/types.h +1
-0@@ -1,6 +1,7 @@#ifndef _LINUX_TYPES_H#define _LINUX_TYPES_H +#ifndef __ASSEMBLY__#ifdef __KERNEL__#define DECLARE_BITMAP (name,bits) \@@ -212,5 +213,5 @@ struct ustat { };
Quoted 8 lines
include/linux/types.h struct ustat { · line 217
Quoted 4 lines
include/linux/types.h +1
-1#endif /* __KERNEL__ */ - +#endif /* __ASSEMBLY__ */ #endif /* _LINUX_TYPES_H */ This is wrong...
We should include the assumed assembly safeasm/types.houtside the__ASEMBLY__ifdef.
agreed ...
Ingo
Re: [linux-next][PATCH] revert headers_check fix: ia64, fpu.h
In reply to Sam RavnborgQuoted 45 lines · Sam Ravnborg
Quoted 44 lines · Russell King - ARM Linux
Quoted 19 lines · Jaswinder Singh Rajput
Quoted 6 lines · Russell King - ARM Linux
Quoted 3 lines · Jaswinder Singh Rajput
Jaswinder Singh Rajput (2):
Neitherasm/types.hnorlinux/types.his required forarch/ia64/include/asm/fpu.hmakelinux/types.has assembly safeI continue to disagree with the need for the second patch.
Like Ingo suggested:
Quoted 7 lines · Ingo Molnar
Well
types.heasily gets included in other files though, which might be
partially suited for assembly - and have !__ASSEMBLY__ portions that rely on atypes.hinclude.So making this file an invariant in .S files does not sound like a bad idea to me. Is there any downside?
Quoted 6 lines
We cannot see any downside of this patch.
But we can see upside of this patch is:
1. No need to protectlinux/types.hwith #ifndef__ASSEMBLY__in many files
2. So we trying to replace multiple #ifndef__ASSEMBLY__with one.The point is:
1. If the parent include needs to include
linux/types.hto get at C types _and_ the include file needs to also be included by assembly code, it itself needs to have #ifndef__ASSEMBLY__to protect those uses from the assembly code.In that case, the
linux/types.hinclude should be contained within the #ifndef__ASSEMBLY__.. #endif block along with all C only parts of the header file.2. if it doesn't need C types from
linux/types.h, then that header has no business includinglinux/types.h, and the include should be eliminated to save the already dirbolically slow compiler from having to read and parse that file, and more importantly allowing it to eliminatelinux/types.hfrom the build dependencies.
Quoted 7 lines
Quoted 3 lines
Yes, you can wrap
linux/types.hwith that ifndef, and yes it will fix any problems, but I view it as a hack rather than fixing the real problem which is lazyness by code writers to get their include dependencies right.You guys are getting this wrong.
The patch from Jaswinder needs to be fixed so we unconditionally include <asm/types.h> fromlinux/types.h.
Yeah, that's true.
Quoted 3 lines
And then ll users can safely include
linux/types.hand when we one day realize we can move some stuff used in .S files fromasm/types.htolinux/types.hthen we are all safe and no breakage.
Yeah.
Ingo
Quoted 25 lines · Sam Ravnborg
Quoted 25 lines
Is this safe OR we can make it more safer:
Subject: [PATCH] make
linux/types.has assembly safeSigned-off-by Jaswinder Singh Rajput <[email protected]>--- include/linux/types.h | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)include/linux/types.h +1
-0@@ -1,6 +1,7 @@#ifndef _LINUX_TYPES_H#define _LINUX_TYPES_H +#ifndef __ASSEMBLY__#ifdef __KERNEL__#define DECLARE_BITMAP (name,bits) \@@ -212,5 +213,5 @@ struct ustat { };
Quoted 9 lines
include/linux/types.h struct ustat { · line 217
Quoted 4 lines
include/linux/types.h +1
-1#endif /* __KERNEL__ */ - +#endif /* __ASSEMBLY__ */ #endif /* _LINUX_TYPES_H */ This is wrong...
We should include the assumed assembly safeasm/types.houtside the__ASEMBLY__ifdef.
Subject: [PATCH] make linux/types.h as assembly safe
--- include/linux/types.h | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
include/linux/types.h +5 -1
@@ -1,6 +1,10 @@#ifndef _LINUX_TYPES_H#define _LINUX_TYPES_H +#ifdef __ASSEMBLY__ +# include <asm/types.h> +#else /* __ASSEMBLY__ */ +#ifdef __KERNEL__#define DECLARE_BITMAP (name,bits) \
@@ -212,5 +216,5 @@ struct ustat { };#endif /* __KERNEL__ */ - +#endif /* __ASSEMBLY__ */ #endif /* _LINUX_TYPES_H */
Signature · 1 line
1.6.0.6
Quoted 13 lines
Subject: [PATCH] make
linux/types.has assembly safeSigned-off-by Jaswinder Singh Rajput <[email protected]>--- include/linux/types.h | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)include/linux/types.h +0
-0
include/linux/types.h line 6
Quoted 6 lines
include/linux/types.h +3
-0@@ -1,6 +1,10 @@#ifndef _LINUX_TYPES_H#define _LINUX_TYPES_H +#ifdef __ASSEMBLY__ +# include <asm/types.h> +#else /* __ASSEMBLY__ */
Please use:
#ifndef __ASEMBLY__
This is what is used in the most cases.
And I think you need to nuke an include in the file a bit later so we do not include asm/types.h twice.
Sam
Luck, Tony
Acked-byRE: [linux-next][PATCH] revert headers_check fix: ia64, fpu.h
In reply to Jaswinder Singh RajputQuoted 5 lines
Review
Quoted 3 lines
(quoted diff) +1
-1-#include <linux/types.h> +#include <asm/types.h>No , we do not even need
asm/types.h
...
Review
Quoted 2 lines
(quoted diff) +0
-2-#include <linux/types.h> -
This works.
Quoted 23 lines · Sam Ravnborg
Quoted 13 lines
Subject: [PATCH] make
linux/types.has assembly safeSigned-off-by Jaswinder Singh Rajput <[email protected]>--- include/linux/types.h | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)include/linux/types.h +0
-0include/linux/types.h line 6
Quoted 6 lines
include/linux/types.h +3
-0@@ -1,6 +1,10 @@#ifndef _LINUX_TYPES_H#define _LINUX_TYPES_H +#ifdef __ASSEMBLY__ +# include <asm/types.h> +#else /* __ASSEMBLY__ */ Please use:
#ifndef__ASEMBLY__
Quoted 5 lines
This is what is used in the most cases.
And I think you need to nuke an include in the file a bit later so we do not include
asm/types.htwice.
Is this looks OK:
Subject: [PATCH] make linux/types.h as assembly safe
--- include/linux/types.h | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-)
include/linux/types.h +5 -2
@@ -1,6 +1,10 @@#ifndef _LINUX_TYPES_H#define _LINUX_TYPES_H +#include <asm/types.h> + +#ifndef __ASSEMBLY__ +#ifdef __KERNEL__#define DECLARE_BITMAP (name,bits) \
@@ -9,7 +13,6 @@#endif #include <linux/posix_types.h> -#include <asm/types.h> #ifndef __KERNEL_STRICT_NAMES
@@ -212,5 +215,5 @@ struct ustat { };#endif /* __KERNEL__ */ - +#endif /* __ASSEMBLY__ */ #endif /* _LINUX_TYPES_H */
Signature · 1 line
1.6.0.6
Quoted 25 lines · Sam Ravnborg
Quoted 25 lines
Is this safe OR we can make it more safer:
Subject: [PATCH] make
linux/types.has assembly safeSigned-off-by Jaswinder Singh Rajput <[email protected]>--- include/linux/types.h | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)include/linux/types.h +1
-0@@ -1,6 +1,7 @@#ifndef _LINUX_TYPES_H#define _LINUX_TYPES_H +#ifndef __ASSEMBLY__#ifdef __KERNEL__#define DECLARE_BITMAP (name,bits) \@@ -212,5 +213,5 @@ struct ustat { };
Quoted 9 lines
include/linux/types.h struct ustat { · line 217
Quoted 4 lines
include/linux/types.h +1
-1#endif /* __KERNEL__ */ - +#endif /* __ASSEMBLY__ */ #endif /* _LINUX_TYPES_H */ This is wrong...
We should include the assumed assembly safeasm/types.houtside the__ASEMBLY__ifdef.
The following changes since commit f6c727813e03ce0f58d73808da8c9a6bc227249e:
Ingo Molnar (1):
Merge branch 'core/header-fixes' of git://git.kernel.org/.../jaswinder/linux-2.6-tip into core/header-fixes
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/jaswinder/linux-2.6-tip.git core/header-fixes
Jaswinder Singh Rajput (1):
unconditionally include asm/types.h from linux/types.h
include/linux/types.h | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
Complete diff:
include/linux/types.h +2 -1
@@ -1,6 +1,8 @@#ifndef _LINUX_TYPES_H#define _LINUX_TYPES_H +#include <asm/types.h> +#ifndef __ASSEMBLY__#ifdef __KERNEL__
@@ -10,7 +12,6 @@#endif #include <linux/posix_types.h> -#include <asm/types.h> #ifndef __KERNEL_STRICT_NAMES
Quoted 42 lines · Jaswinder Singh Rajput
Quoted 25 lines · Sam Ravnborg
Quoted 25 lines
Is this safe OR we can make it more safer:
Subject: [PATCH] make
linux/types.has assembly safeSigned-off-by Jaswinder Singh Rajput <[email protected]>--- include/linux/types.h | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)include/linux/types.h +1
-0@@ -1,6 +1,7 @@#ifndef _LINUX_TYPES_H#define _LINUX_TYPES_H +#ifndef __ASSEMBLY__#ifdef __KERNEL__#define DECLARE_BITMAP (name,bits) \@@ -212,5 +213,5 @@ struct ustat { };Quoted 9 lines
include/linux/types.h struct ustat { · line 217
Quoted 4 lines
include/linux/types.h +1
-1#endif /* __KERNEL__ */ - +#endif /* __ASSEMBLY__ */ #endif /* _LINUX_TYPES_H */ This is wrong...
We should include the assumed assembly safeasm/types.houtside the__ASEMBLY__ifdef.The following changes since commit
f6c727813e03ce0f58d73808da8c9a6bc227249e:
Ingo Molnar (1):
Merge branch 'core/header-fixes' ofgit://git.kernel.org/.../jaswinder/linux-2.6-tipinto core/header-fixesare available in the git repository at:
Quoted 7 lines
git://git.kernel.org/pub/scm/linux/kernel/git/jaswinder/linux-2.6-tip.gitcore/header-fixesJaswinder Singh Rajput (1):
unconditionally includeasm/types.hfromlinux/types.hinclude/linux/types.h | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
Pulled into tip:core/header-fixes, thanks Jaswinder!
Ingo