x86: fix 22 make headers_check warnings
Subsystems (3)
Hello Ingo,
The following changes since commit 206e00df0967f6e91d792df7f1d4ff352eb42f8f:
Ingo Molnar (1):
Merge branch 'x86/urgent'
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/jaswinder/linux-2.6-tiptop.git master
Jaswinder Singh Rajput (8):
x86: boot.h fix make headers_check
x86: e820.h fix make headers_check
x86: kvm.h fix make headers_check
x86: mce.h fix make headers_check
x86: mtrr.h fix make headers_check
x86: ptrace-abi.h fix make headers_check
x86: sigcontext.h fix make headers_check
x86: swab.h fix make headers_check
arch/x86/include/asm/boot.h | 2 ++ arch/x86/include/asm/e820.h | 11 ++++++++--- arch/x86/include/asm/kvm.h | 2 +- arch/x86/include/asm/mce.h | 5 +---- arch/x86/include/asm/mtrr.h | 1 + arch/x86/include/asm/ptrace-abi.h | 5 ++++- arch/x86/include/asm/sigcontext.h | 2 +- arch/x86/include/asm/swab.h | 21 +++++++++++++++++++-- 8 files changed, 37 insertions(+), 12 deletions(-)
arch/x86/include/asm/boot.h +2 -0
@@ -10,6 +10,7 @@#define EXTENDED_VGA 0xfffe/* 80x50 mode */ #define ASK_VGA 0xfffd/* ask for it at bootup */ +#ifdef __KERNEL__/* Physical address where kernel should be loaded. */ #define LOAD_PHYSICAL_ADDR ((CONFIG_PHYSICAL_START \ + (CONFIG_PHYSICAL_ALIGN - 1)) \
@@ -22,5 +23,6 @@#define BOOT_HEAP_SIZE 0x4000#define BOOT_STACK_SIZE 0x1000#endif +#endif /* __KERNEL__ */ #endif /* _ASM_X86_BOOT_H */
arch/x86/include/asm/e820.h +8 -3
@@ -5,8 +5,12 @@/* * Legacy E820 BIOS limits us to 128 (E820MAX) nodes due to the -* constrained space in the zeropage. If we have more nodes than -* that, and if we've booted off EFI firmware, then the EFI tables +* constrained space in the zeropage. +*/ + +#ifdef __KERNEL__ +/* If we have more nodes than that, and if we have +* booted off EFI firmware, then the EFI tables * passed us from the EFI firmware can list more nodes. Size our * internal memory map tables to have room for these additional * nodes, based on up to three entries per node for which the
@@ -26,7 +30,6 @@* to collapse the next two #ifdef lines to a single line: * #if defined(__KERNEL__) && defined(CONFIG_EFI) */ -#ifdef __KERNEL__#ifdef CONFIG_EFI #include <linux/numa.h> #define E820_X_MAX (E820MAX + 3 * MAX_NUMNODES)
@@ -49,6 +52,8 @@#define E820_RESERVED_KERN 128 #ifndef __ASSEMBLY__ +#include <linux/types.h> + struct e820entry { __u64 addr; /* start of memory segment */ __u64 size; /* size of memory segment */
arch/x86/include/asm/kvm.h +1 -1
@@ -6,7 +6,7 @@* */ -#include <asm/types.h> +#include <linux/types.h> #include <linux/ioctl.h> /* Architectural interrupt line count. */
arch/x86/include/asm/mce.h +1 -4
@@ -3,8 +3,8 @@#ifdef __x86_64__ +#include <linux/types.h> #include <asm/ioctls.h> -#include <asm/types.h> /* * Machine Check support for x86
@@ -115,8 +115,6 @@ extern int mce_notify_user(void);#endif /* !CONFIG_X86_32 */ - -#ifdef CONFIG_X86_MCE extern void mcheck_init (struct cpuinfo_x86 *c);#else
@@ -126,5 +124,4 @@ extern void stop_mce(void);extern void restart_mce (void );#endif /* __KERNEL__ */ -#endif /* _ASM_X86_MCE_H */
arch/x86/include/asm/mtrr.h +1 -0
@@ -23,6 +23,7 @@#ifndef _ASM_X86_MTRR_H#define _ASM_X86_MTRR_H +#include <linux/types.h> #include <linux/ioctl.h> #include <linux/errno.h>
arch/x86/include/asm/ptrace-abi.h +4 -1
@@ -80,10 +80,12 @@#define PTRACE_SINGLEBLOCK 33/* resume execution until next branch */ +#ifdef __KERNEL__ +#ifdef CONFIG_X86_PTRACE_BTS #ifndef __ASSEMBLY__ -#include <asm/types.h> +#include <linux/types.h> /* configuration/status structure used in PTRACE_BTS_CONFIG and PTRACE_BTS_STATUS commands.
@@ -141,5 +143,6 @@ struct ptrace_bts_config {Returns number of BTS records drained. */ #endif /* CONFIG_X86_PTRACE_BTS */ +#endif /* __KERNEL__ */ #endif /* _ASM_X86_PTRACE_ABI_H */
arch/x86/include/asm/sigcontext.h +1 -1
@@ -2,7 +2,7 @@#define _ASM_X86_SIGCONTEXT_H#include <linux/compiler.h> -#include <asm/types.h> +#include <linux/types.h> #define FP_XSTATE_MAGIC1 0x46505853U#define FP_XSTATE_MAGIC2 0x46505845U
arch/x86/include/asm/swab.h +19 -2
@@ -1,12 +1,15 @@#ifndef _ASM_X86_SWAB_H#define _ASM_X86_SWAB_H -#include <asm/types.h> +#include <linux/types.h> +#ifdef __KERNEL__#include <linux/compiler.h> +#endif /* __KERNEL__ */ static inline __attribute_const__ __u32 __arch_swab32(__u32 val) {#ifdef __i386__ +#ifdef __KERNEL__# ifdef CONFIG_X86_BSWAP asm("bswap %0" :"=r" (val) :"0" (val));# else
@@ -16,7 +19,13 @@ static inline __attribute_const__ __u32 __arch_swab32(__u32 val) : "=q" (val) : "0" (val));# endif - +#else /* __KERNEL__ */ + asm("xchgb %b0,%h0\n\t" /* swap lower bytes */ +"rorl $16,%0\n\t" /* swap words */ +"xchgb %b0,%h0" /* swap higher bytes */ + :"=q" (val) + :"0" (val)); +#endif /* __KERNEL__ */ #else /* __i386__ */ asm("bswapl %0" : "=r" (val)
@@ -37,6 +46,7 @@ static inline __attribute_const__ __u64 __arch_swab64(__u64 val)__u64 u; } v; v.u = val; +#ifdef __KERNEL__# ifdef CONFIG_X86_BSWAP asm("bswapl %0 ; bswapl %1 ; xchgl %0,%1" : "=r" (v.s.a), "=r" (v.s.b)
@@ -48,6 +58,13 @@ static inline __attribute_const__ __u64 __arch_swab64(__u64 val) : "=r" (v.s.a), "=r" (v.s.b) : "0" (v.s.a), "1" (v.s.b));# endif +#else /* __KERNEL__ */ + v.s.a =__arch_swab32 (v.s.a); + v.s.b =__arch_swab32 (v.s.b); + asm("xchgl %0,%1" + :"=r" (v.s.a),"=r" (v.s.b) + :"0" (v.s.a),"1" (v.s.b)); +#endif /* __KERNEL__ */ return v.u;#else /* __i386__ */ asm("bswapq %0"
Quoted 20 lines · Jaswinder Singh Rajput
Hello Ingo,
The following changes since commit
206e00df0967f6e91d792df7f1d4ff352eb42f8f:
Ingo Molnar (1):
Merge branch 'x86/urgent'are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/jaswinder/linux-2.6-tiptop.gitmasterJaswinder Singh Rajput (8):
x86:boot.hfix makeheaders_check
x86:e820.hfix makeheaders_check
x86:kvm.hfix makeheaders_check
x86:mce.hfix makeheaders_check
x86:mtrr.hfix makeheaders_check
x86:ptrace-abi.hfix makeheaders_check
x86:sigcontext.hfix makeheaders_check
x86:swab.hfix makeheaders_check
Quoted 9 lines
arch/x86/include/asm/boot.h | 2 ++ arch/x86/include/asm/e820.h | 11 ++++++++--- arch/x86/include/asm/kvm.h | 2 +- arch/x86/include/asm/mce.h | 5 +---- arch/x86/include/asm/mtrr.h | 1 + arch/x86/include/asm/ptrace-abi.h | 5 ++++- arch/x86/include/asm/sigcontext.h | 2 +- arch/x86/include/asm/swab.h | 21 +++++++++++++++++++-- 8 files changed, 37 insertions(+), 12 deletions(-)
Pulled into tip/core/header-fixes and started testing them, thanks Jaswinder!
Ingo
Cyrill Gorcunov
Applied[Ingo Molnar - Sat, Jan 17, 2009 at 05:41:08PM +0100]
| | * Jaswinder Singh Rajput <[email protected]> wrote: | | > Hello Ingo, | > | > The following changes since commit 206e00df0967f6e91d792df7f1d4ff352eb42f8f: | > Ingo Molnar (1): | > Merge branch 'x86/urgent' | > | > are available in the git repository at: | > | > git://git.kernel.org/pub/scm/linux/kernel/git/jaswinder/linux-2.6-tiptop.git master | > | > Jaswinder Singh Rajput (8): | > x86: boot.h fix make headers_check | > x86: e820.h fix make headers_check | > x86: kvm.h fix make headers_check | > x86: mce.h fix make headers_check | > x86: mtrr.h fix make headers_check | > x86: ptrace-abi.h fix make headers_check | > x86: sigcontext.h fix make headers_check | > x86: swab.h fix make headers_check | > | > arch/x86/include/asm/boot.h | 2 ++ | > arch/x86/include/asm/e820.h | 11 ++++++++--- | > arch/x86/include/asm/kvm.h | 2 +- | > arch/x86/include/asm/mce.h | 5 +---- | > arch/x86/include/asm/mtrr.h | 1 + | > arch/x86/include/asm/ptrace-abi.h | 5 ++++- | > arch/x86/include/asm/sigcontext.h | 2 +- | > arch/x86/include/asm/swab.h | 21 +++++++++++++++++++-- | > 8 files changed, 37 insertions(+), 12 deletions(-) | | Pulled into tip/core/header-fixes and started testing them, thanks | Jaswinder! | | Ingo |
I thought some of them I've already fixed, no?
...
From: "H. Peter Anvin" <[email protected]>
To: Cyrill Gorcunov <[email protected]>
CC: [email protected], [email protected], [email protected],
[email protected], [email protected]
Subject: Re: [patch 0/5] x86 -tip: headers cleanup
Date: Wed, 14 Jan 2009 15:41:34 -0800
Quoted 4 lines · Cyrill Gorcunov
Small series of headers cleanup, easy to bisect.
makeheaders_checkstill complains about vars
being found in comments but this is just a false
alarm. Please review.
Applied patch 1 to tip:x86/setup-lzma, and patches 2, 4 and 5 to tip:x86/header-fixes.
- Cyrill -
Quoted 40 lines · Cyrill Gorcunov
[Ingo Molnar - Sat, Jan 17, 2009 at 05:41:08PM +0100]
| | * Jaswinder Singh Rajput <[email protected]> wrote: | | > Hello Ingo, | > | > The following changes since commit 206e00df0967f6e91d792df7f1d4ff352eb42f8f: | > Ingo Molnar (1): | > Merge branch 'x86/urgent' | > | > are available in the git repository at: | > | > git://git.kernel.org/pub/scm/linux/kernel/git/jaswinder/linux-2.6-tiptop.git master | > | > Jaswinder Singh Rajput (8): | > x86: boot.h fix make headers_check | > x86: e820.h fix make headers_check | > x86: kvm.h fix make headers_check | > x86: mce.h fix make headers_check | > x86: mtrr.h fix make headers_check | > x86: ptrace-abi.h fix make headers_check | > x86: sigcontext.h fix make headers_check | > x86: swab.h fix make headers_check | > | > arch/x86/include/asm/boot.h | 2 ++ | > arch/x86/include/asm/e820.h | 11 ++++++++--- | > arch/x86/include/asm/kvm.h | 2 +- | > arch/x86/include/asm/mce.h | 5 +---- | > arch/x86/include/asm/mtrr.h | 1 + | > arch/x86/include/asm/ptrace-abi.h | 5 ++++- | > arch/x86/include/asm/sigcontext.h | 2 +- | > arch/x86/include/asm/swab.h | 21 +++++++++++++++++++-- | > 8 files changed, 37 insertions(+), 12 deletions(-) | | Pulled into tip/core/header-fixes and started testing them, thanks | Jaswinder! | | Ingo |
Quoted 2 lines
I thought some of them I've already fixed, no?
I just prepared these patches now based on the latest -tip and try to remove all the remaining warnings for x86 headers files:
INSTALL include/asm (52 files)
CHECK include/asm (52 files)
Thanks
--
JSR
Quoted 40 lines · Cyrill Gorcunov
[Ingo Molnar - Sat, Jan 17, 2009 at 05:41:08PM +0100]
| | * Jaswinder Singh Rajput <[email protected]> wrote: | | > Hello Ingo, | > | > The following changes since commit 206e00df0967f6e91d792df7f1d4ff352eb42f8f: | > Ingo Molnar (1): | > Merge branch 'x86/urgent' | > | > are available in the git repository at: | > | > git://git.kernel.org/pub/scm/linux/kernel/git/jaswinder/linux-2.6-tiptop.git master | > | > Jaswinder Singh Rajput (8): | > x86: boot.h fix make headers_check | > x86: e820.h fix make headers_check | > x86: kvm.h fix make headers_check | > x86: mce.h fix make headers_check | > x86: mtrr.h fix make headers_check | > x86: ptrace-abi.h fix make headers_check | > x86: sigcontext.h fix make headers_check | > x86: swab.h fix make headers_check | > | > arch/x86/include/asm/boot.h | 2 ++ | > arch/x86/include/asm/e820.h | 11 ++++++++--- | > arch/x86/include/asm/kvm.h | 2 +- | > arch/x86/include/asm/mce.h | 5 +---- | > arch/x86/include/asm/mtrr.h | 1 + | > arch/x86/include/asm/ptrace-abi.h | 5 ++++- | > arch/x86/include/asm/sigcontext.h | 2 +- | > arch/x86/include/asm/swab.h | 21 +++++++++++++++++++-- | > 8 files changed, 37 insertions(+), 12 deletions(-) | | Pulled into tip/core/header-fixes and started testing them, thanks | Jaswinder! | | Ingo |
Quoted 1 line
I thought some of them I've already fixed, no?
ah, indeed - tip/x86/setup-lzma is currently not in tip/master (due to a breakage that is being investigated), that's why i missed it.
So i took out the boot.h change from core/headers-fixes and your fix will take precedence.
btw:
Quoted 8 lines
Quoted 4 lines · Cyrill Gorcunov
Small series of headers cleanup, easy to bisect.
makeheaders_checkstill complains about vars
being found in comments but this is just a false
alarm. Please review.Applied patch 1 to tip:x86/setup-lzma, and patches 2, 4 and 5 to tip:x86/header-fixes.
those x86/header-fixes bits from you are in core/headers-fixes now:
dbca1df: x86: headers cleanup - setup.h
a7c4e68: x86: headers cleanup - sigcontext32.h
4440270: x86: headers cleanup - prctl.h
So i think we are all sorted, agreed?
Ingo
[Ingo Molnar - Sat, Jan 17, 2009 at 06:01:47PM +0100]
| | * Cyrill Gorcunov <[email protected]> wrote: | | > [Ingo Molnar - Sat, Jan 17, 2009 at 05:41:08PM +0100] | > | | > | * Jaswinder Singh Rajput <[email protected]> wrote: | > | | > | > Hello Ingo, | > | > | > | > The following changes since commit 206e00df0967f6e91d792df7f1d4ff352eb42f8f: | > | > Ingo Molnar (1): | > | > Merge branch 'x86/urgent' | > | > | > | > are available in the git repository at: | > | > | > | > git://git.kernel.org/pub/scm/linux/kernel/git/jaswinder/linux-2.6-tiptop.git master | > | > | > | > Jaswinder Singh Rajput (8): | > | > x86: boot.h fix make headers_check | > | > x86: e820.h fix make headers_check | > | > x86: kvm.h fix make headers_check | > | > x86: mce.h fix make headers_check | > | > x86: mtrr.h fix make headers_check | > | > x86: ptrace-abi.h fix make headers_check | > | > x86: sigcontext.h fix make headers_check | > | > x86: swab.h fix make headers_check | > | > | > | > arch/x86/include/asm/boot.h | 2 ++ | > | > arch/x86/include/asm/e820.h | 11 ++++++++--- | > | > arch/x86/include/asm/kvm.h | 2 +- | > | > arch/x86/include/asm/mce.h | 5 +---- | > | > arch/x86/include/asm/mtrr.h | 1 + | > | > arch/x86/include/asm/ptrace-abi.h | 5 ++++- | > | > arch/x86/include/asm/sigcontext.h | 2 +- | > | > arch/x86/include/asm/swab.h | 21 +++++++++++++++++++-- | > | > 8 files changed, 37 insertions(+), 12 deletions(-) | > | | > | Pulled into tip/core/header-fixes and started testing them, thanks | > | Jaswinder! | > | | > | Ingo | > | | > | > I thought some of them I've already fixed, no? | | ah, indeed - tip/x86/setup-lzma is currently not in tip/master (due to a | breakage that is being investigated), that's why i missed it. | | So i took out the boot.h change from core/headers-fixes and your fix will | take precedence. | | btw: | | > Cyrill Gorcunov wrote: | > > Small series of headers cleanup, easy to bisect. | > > make headers_check still complains about vars | > > being found in comments but this is just a false | > > alarm. Please review. | > | > Applied patch 1 to tip:x86/setup-lzma, and patches 2, 4 and 5 to | > tip:x86/header-fixes. | | those x86/header-fixes bits from you are in core/headers-fixes now: | | dbca1df: x86: headers cleanup - setup.h | a7c4e68: x86: headers cleanup - sigcontext32.h | 4440270: x86: headers cleanup - prctl.h | | So i think we are all sorted, agreed? | | Ingo |
yep :) Personally I don't really care which commits will be in tree (mine or Jaswinder). The only what matter -- the work is done :)
There was some conversation about ptrace-abi.h. Eventually we ended up that we should just remove CONFIG_ for branch tracing since ptrace_bts_config is supposed to be accessible from user space. At least that is how I understood the conversation with Peter.
- Cyrill -