* [PATCH -tip] x86: headers - include linux/types.h instead of asm/types.h
@ 2009-01-13 12:09 Cyrill Gorcunov
2009-01-13 12:57 ` Cyrill Gorcunov
0 siblings, 1 reply; 10+ messages in thread
From: Cyrill Gorcunov @ 2009-01-13 12:09 UTC (permalink / raw)
To: Ingo Molnar, H. Peter Anvin, Thomas Gleixner
Cc: LKML, Harvey Harrison, Sam Ravnborg, Jaswinder Singh Rajput
Impact: cleanup
'make headers_check' warns that linux/types.h is
preferred over asm/types.h. So be it.
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
CC: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
CC: Sam Ravnborg <sam@ravnborg.org>
CC: Harvey Harrison <harvey.harrison@gmail.com>
---
arch/x86/include/asm/e820.h | 2 ++
arch/x86/include/asm/kvm.h | 2 +-
arch/x86/include/asm/mce.h | 2 +-
arch/x86/include/asm/mtrr.h | 1 +
arch/x86/include/asm/ptrace-abi.h | 2 +-
arch/x86/include/asm/sigcontext.h | 2 +-
arch/x86/include/asm/swab.h | 2 +-
7 files changed, 8 insertions(+), 5 deletions(-)
Index: linux-2.6.git/arch/x86/include/asm/e820.h
===================================================================
--- linux-2.6.git.orig/arch/x86/include/asm/e820.h
+++ linux-2.6.git/arch/x86/include/asm/e820.h
@@ -1,5 +1,6 @@
#ifndef _ASM_X86_E820_H
#define _ASM_X86_E820_H
+
#define E820MAP 0x2d0 /* our map */
#define E820MAX 128 /* number of entries in E820MAP */
@@ -49,6 +50,7 @@
#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 */
Index: linux-2.6.git/arch/x86/include/asm/kvm.h
===================================================================
--- linux-2.6.git.orig/arch/x86/include/asm/kvm.h
+++ linux-2.6.git/arch/x86/include/asm/kvm.h
@@ -6,7 +6,7 @@
*
*/
-#include <asm/types.h>
+#include <linux/types.h>
#include <linux/ioctl.h>
/* Architectural interrupt line count. */
Index: linux-2.6.git/arch/x86/include/asm/mce.h
===================================================================
--- linux-2.6.git.orig/arch/x86/include/asm/mce.h
+++ linux-2.6.git/arch/x86/include/asm/mce.h
@@ -4,7 +4,7 @@
#ifdef __x86_64__
#include <asm/ioctls.h>
-#include <asm/types.h>
+#include <linux/types.h>
/*
* Machine Check support for x86
Index: linux-2.6.git/arch/x86/include/asm/mtrr.h
===================================================================
--- linux-2.6.git.orig/arch/x86/include/asm/mtrr.h
+++ linux-2.6.git/arch/x86/include/asm/mtrr.h
@@ -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>
Index: linux-2.6.git/arch/x86/include/asm/ptrace-abi.h
===================================================================
--- linux-2.6.git.orig/arch/x86/include/asm/ptrace-abi.h
+++ linux-2.6.git/arch/x86/include/asm/ptrace-abi.h
@@ -83,7 +83,7 @@
#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.
Index: linux-2.6.git/arch/x86/include/asm/sigcontext.h
===================================================================
--- linux-2.6.git.orig/arch/x86/include/asm/sigcontext.h
+++ linux-2.6.git/arch/x86/include/asm/sigcontext.h
@@ -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
Index: linux-2.6.git/arch/x86/include/asm/swab.h
===================================================================
--- linux-2.6.git.orig/arch/x86/include/asm/swab.h
+++ linux-2.6.git/arch/x86/include/asm/swab.h
@@ -1,7 +1,7 @@
#ifndef _ASM_X86_SWAB_H
#define _ASM_X86_SWAB_H
-#include <asm/types.h>
+#include <linux/types.h>
#include <linux/compiler.h>
static inline __attribute_const__ __u32 __arch_swab32(__u32 val)
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH -tip] x86: headers - include linux/types.h instead of asm/types.h
2009-01-13 12:09 [PATCH -tip] x86: headers - include linux/types.h instead of asm/types.h Cyrill Gorcunov
@ 2009-01-13 12:57 ` Cyrill Gorcunov
2009-01-13 12:59 ` Ingo Molnar
2009-01-13 13:08 ` Jaswinder Singh Rajput
0 siblings, 2 replies; 10+ messages in thread
From: Cyrill Gorcunov @ 2009-01-13 12:57 UTC (permalink / raw)
To: Ingo Molnar, H. Peter Anvin, Thomas Gleixner, LKML,
Harvey Harrison, Sam Ravnborg, Jaswinder Singh Rajput
[Cyrill Gorcunov - Tue, Jan 13, 2009 at 03:09:05PM +0300]
| Impact: cleanup
|
| 'make headers_check' warns that linux/types.h is
| preferred over asm/types.h. So be it.
|
| Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
| CC: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
| CC: Sam Ravnborg <sam@ravnborg.org>
| CC: Harvey Harrison <harvey.harrison@gmail.com>
| ---
|
| arch/x86/include/asm/e820.h | 2 ++
| arch/x86/include/asm/kvm.h | 2 +-
| arch/x86/include/asm/mce.h | 2 +-
| arch/x86/include/asm/mtrr.h | 1 +
| arch/x86/include/asm/ptrace-abi.h | 2 +-
| arch/x86/include/asm/sigcontext.h | 2 +-
| arch/x86/include/asm/swab.h | 2 +-
| 7 files changed, 8 insertions(+), 5 deletions(-)
|
...
well... on the other hand I'm not sure if it's really
a good idea to include linux/types.h where we need only
__u[8,16] and so on definitions.
Ingo, don't apply this patch please -- have to check
for other ways.
- Cyrill -
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH -tip] x86: headers - include linux/types.h instead of asm/types.h
2009-01-13 12:57 ` Cyrill Gorcunov
@ 2009-01-13 12:59 ` Ingo Molnar
2009-01-13 13:10 ` Cyrill Gorcunov
2009-01-13 13:08 ` Jaswinder Singh Rajput
1 sibling, 1 reply; 10+ messages in thread
From: Ingo Molnar @ 2009-01-13 12:59 UTC (permalink / raw)
To: Cyrill Gorcunov
Cc: H. Peter Anvin, Thomas Gleixner, LKML, Harvey Harrison,
Sam Ravnborg, Jaswinder Singh Rajput
* Cyrill Gorcunov <gorcunov@gmail.com> wrote:
> [Cyrill Gorcunov - Tue, Jan 13, 2009 at 03:09:05PM +0300]
> | Impact: cleanup
> |
> | 'make headers_check' warns that linux/types.h is
> | preferred over asm/types.h. So be it.
> |
> | Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
> | CC: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
> | CC: Sam Ravnborg <sam@ravnborg.org>
> | CC: Harvey Harrison <harvey.harrison@gmail.com>
> | ---
> |
> | arch/x86/include/asm/e820.h | 2 ++
> | arch/x86/include/asm/kvm.h | 2 +-
> | arch/x86/include/asm/mce.h | 2 +-
> | arch/x86/include/asm/mtrr.h | 1 +
> | arch/x86/include/asm/ptrace-abi.h | 2 +-
> | arch/x86/include/asm/sigcontext.h | 2 +-
> | arch/x86/include/asm/swab.h | 2 +-
> | 7 files changed, 8 insertions(+), 5 deletions(-)
> |
> ...
>
> well... on the other hand I'm not sure if it's really
> a good idea to include linux/types.h where we need only
> __u[8,16] and so on definitions.
Well, linux/types.h is supposed to be a 'lightweight', 'core data types
only' kind of header file, so including it is not wrong per se.
Sam, is there some other preferred way perhaps to resolve these?
Ingo
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH -tip] x86: headers - include linux/types.h instead of asm/types.h
2009-01-13 12:57 ` Cyrill Gorcunov
2009-01-13 12:59 ` Ingo Molnar
@ 2009-01-13 13:08 ` Jaswinder Singh Rajput
2009-01-13 13:12 ` Cyrill Gorcunov
1 sibling, 1 reply; 10+ messages in thread
From: Jaswinder Singh Rajput @ 2009-01-13 13:08 UTC (permalink / raw)
To: Cyrill Gorcunov
Cc: Ingo Molnar, H. Peter Anvin, Thomas Gleixner, LKML,
Harvey Harrison, Sam Ravnborg, Jaswinder Singh Rajput
[-- Attachment #1: Type: text/plain, Size: 1242 bytes --]
On Tue, Jan 13, 2009 at 6:27 PM, Cyrill Gorcunov <gorcunov@gmail.com> wrote:
> [Cyrill Gorcunov - Tue, Jan 13, 2009 at 03:09:05PM +0300]
> | Impact: cleanup
> |
> | 'make headers_check' warns that linux/types.h is
> | preferred over asm/types.h. So be it.
> |
> | Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
> | CC: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
> | CC: Sam Ravnborg <sam@ravnborg.org>
> | CC: Harvey Harrison <harvey.harrison@gmail.com>
> | ---
> |
> | arch/x86/include/asm/e820.h | 2 ++
> | arch/x86/include/asm/kvm.h | 2 +-
> | arch/x86/include/asm/mce.h | 2 +-
> | arch/x86/include/asm/mtrr.h | 1 +
> | arch/x86/include/asm/ptrace-abi.h | 2 +-
> | arch/x86/include/asm/sigcontext.h | 2 +-
> | arch/x86/include/asm/swab.h | 2 +-
> | 7 files changed, 8 insertions(+), 5 deletions(-)
> |
> ...
>
> well... on the other hand I'm not sure if it's really
> a good idea to include linux/types.h where we need only
> __u[8,16] and so on definitions.
>
> Ingo, don't apply this patch please -- have to check
> for other ways.
>
I am attaching usr/include/linux/types.h for your reference which
includes all these definations for userspace.
Thanks
--
JSR
[-- Attachment #2: types.h --]
[-- Type: text/plain, Size: 3385 bytes --]
#ifndef _LINUX_TYPES_H
#define _LINUX_TYPES_H
#include <linux/posix_types.h>
#include <asm/types.h>
#ifndef __KERNEL_STRICT_NAMES
typedef __u32 __kernel_dev_t;
typedef __kernel_fd_set fd_set;
typedef __kernel_dev_t dev_t;
typedef __kernel_ino_t ino_t;
typedef __kernel_mode_t mode_t;
typedef __kernel_nlink_t nlink_t;
typedef __kernel_off_t off_t;
typedef __kernel_pid_t pid_t;
typedef __kernel_daddr_t daddr_t;
typedef __kernel_key_t key_t;
typedef __kernel_suseconds_t suseconds_t;
typedef __kernel_timer_t timer_t;
typedef __kernel_clockid_t clockid_t;
typedef __kernel_mqd_t mqd_t;
typedef __kernel_uid_t uid_t;
typedef __kernel_gid_t gid_t;
#if defined(__GNUC__)
typedef __kernel_loff_t loff_t;
#endif
/*
* The following typedefs are also protected by individual ifdefs for
* historical reasons:
*/
#ifndef _SIZE_T
#define _SIZE_T
typedef __kernel_size_t size_t;
#endif
#ifndef _SSIZE_T
#define _SSIZE_T
typedef __kernel_ssize_t ssize_t;
#endif
#ifndef _PTRDIFF_T
#define _PTRDIFF_T
typedef __kernel_ptrdiff_t ptrdiff_t;
#endif
#ifndef _TIME_T
#define _TIME_T
typedef __kernel_time_t time_t;
#endif
#ifndef _CLOCK_T
#define _CLOCK_T
typedef __kernel_clock_t clock_t;
#endif
#ifndef _CADDR_T
#define _CADDR_T
typedef __kernel_caddr_t caddr_t;
#endif
/* bsd */
typedef unsigned char u_char;
typedef unsigned short u_short;
typedef unsigned int u_int;
typedef unsigned long u_long;
/* sysv */
typedef unsigned char unchar;
typedef unsigned short ushort;
typedef unsigned int uint;
typedef unsigned long ulong;
#ifndef __BIT_TYPES_DEFINED__
#define __BIT_TYPES_DEFINED__
typedef __u8 u_int8_t;
typedef __s8 int8_t;
typedef __u16 u_int16_t;
typedef __s16 int16_t;
typedef __u32 u_int32_t;
typedef __s32 int32_t;
#endif /* !(__BIT_TYPES_DEFINED__) */
typedef __u8 uint8_t;
typedef __u16 uint16_t;
typedef __u32 uint32_t;
#if defined(__GNUC__)
typedef __u64 uint64_t;
typedef __u64 u_int64_t;
typedef __s64 int64_t;
#endif
/* this is a special 64bit data type that is 8-byte aligned */
#define aligned_u64 __u64 __attribute__((aligned(8)))
#define aligned_be64 __be64 __attribute__((aligned(8)))
#define aligned_le64 __le64 __attribute__((aligned(8)))
/**
* The type used for indexing onto a disc or disc partition.
*
* Linux always considers sectors to be 512 bytes long independently
* of the devices real block size.
*
* blkcnt_t is the type of the inode's block count.
*/
#ifdef CONFIG_LBD
typedef u64 sector_t;
typedef u64 blkcnt_t;
#else
typedef unsigned long sector_t;
typedef unsigned long blkcnt_t;
#endif
/*
* The type of an index into the pagecache. Use a #define so asm/types.h
* can override it.
*/
#ifndef pgoff_t
#define pgoff_t unsigned long
#endif
#endif /* __KERNEL_STRICT_NAMES */
/*
* Below are truly Linux-specific types that should never collide with
* any application/library that wants linux/types.h.
*/
#ifdef __CHECKER__
#define __bitwise__ __attribute__((bitwise))
#else
#define __bitwise__
#endif
#ifdef __CHECK_ENDIAN__
#define __bitwise __bitwise__
#else
#define __bitwise
#endif
typedef __u16 __bitwise __le16;
typedef __u16 __bitwise __be16;
typedef __u32 __bitwise __le32;
typedef __u32 __bitwise __be32;
typedef __u64 __bitwise __le64;
typedef __u64 __bitwise __be64;
typedef __u16 __bitwise __sum16;
typedef __u32 __bitwise __wsum;
#endif /* _LINUX_TYPES_H */
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH -tip] x86: headers - include linux/types.h instead of asm/types.h
2009-01-13 12:59 ` Ingo Molnar
@ 2009-01-13 13:10 ` Cyrill Gorcunov
2009-01-13 13:25 ` Cyrill Gorcunov
2009-01-13 14:45 ` Ingo Molnar
0 siblings, 2 replies; 10+ messages in thread
From: Cyrill Gorcunov @ 2009-01-13 13:10 UTC (permalink / raw)
To: Ingo Molnar
Cc: H. Peter Anvin, Thomas Gleixner, LKML, Harvey Harrison,
Sam Ravnborg, Jaswinder Singh Rajput
[Ingo Molnar - Tue, Jan 13, 2009 at 01:59:28PM +0100]
|
| * Cyrill Gorcunov <gorcunov@gmail.com> wrote:
|
| > [Cyrill Gorcunov - Tue, Jan 13, 2009 at 03:09:05PM +0300]
| > | Impact: cleanup
| > |
| > | 'make headers_check' warns that linux/types.h is
| > | preferred over asm/types.h. So be it.
| > |
| > | Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
| > | CC: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
| > | CC: Sam Ravnborg <sam@ravnborg.org>
| > | CC: Harvey Harrison <harvey.harrison@gmail.com>
| > | ---
| > |
| > | arch/x86/include/asm/e820.h | 2 ++
| > | arch/x86/include/asm/kvm.h | 2 +-
| > | arch/x86/include/asm/mce.h | 2 +-
| > | arch/x86/include/asm/mtrr.h | 1 +
| > | arch/x86/include/asm/ptrace-abi.h | 2 +-
| > | arch/x86/include/asm/sigcontext.h | 2 +-
| > | arch/x86/include/asm/swab.h | 2 +-
| > | 7 files changed, 8 insertions(+), 5 deletions(-)
| > |
| > ...
| >
| > well... on the other hand I'm not sure if it's really
| > a good idea to include linux/types.h where we need only
| > __u[8,16] and so on definitions.
|
| Well, linux/types.h is supposed to be a 'lightweight', 'core data types
| only' kind of header file, so including it is not wrong per se.
|
| Sam, is there some other preferred way perhaps to resolve these?
|
| Ingo
|
Until such a file not passed to some *.S. For example for e820.h
we have it included to arch/x86/boot/header.S but fortunately
we're bound by __ASSEMBLY__. So there linux/types.h shouldn't hurt.
Will check others and report then.
- Cyrill -
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH -tip] x86: headers - include linux/types.h instead of asm/types.h
2009-01-13 13:08 ` Jaswinder Singh Rajput
@ 2009-01-13 13:12 ` Cyrill Gorcunov
0 siblings, 0 replies; 10+ messages in thread
From: Cyrill Gorcunov @ 2009-01-13 13:12 UTC (permalink / raw)
To: Jaswinder Singh Rajput
Cc: Ingo Molnar, H. Peter Anvin, Thomas Gleixner, LKML,
Harvey Harrison, Sam Ravnborg, Jaswinder Singh Rajput
[Jaswinder Singh Rajput - Tue, Jan 13, 2009 at 06:38:02PM +0530]
| On Tue, Jan 13, 2009 at 6:27 PM, Cyrill Gorcunov <gorcunov@gmail.com> wrote:
| > [Cyrill Gorcunov - Tue, Jan 13, 2009 at 03:09:05PM +0300]
| > | Impact: cleanup
| > |
| > | 'make headers_check' warns that linux/types.h is
| > | preferred over asm/types.h. So be it.
| > |
| > | Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
| > | CC: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
| > | CC: Sam Ravnborg <sam@ravnborg.org>
| > | CC: Harvey Harrison <harvey.harrison@gmail.com>
| > | ---
| > |
| > | arch/x86/include/asm/e820.h | 2 ++
| > | arch/x86/include/asm/kvm.h | 2 +-
| > | arch/x86/include/asm/mce.h | 2 +-
| > | arch/x86/include/asm/mtrr.h | 1 +
| > | arch/x86/include/asm/ptrace-abi.h | 2 +-
| > | arch/x86/include/asm/sigcontext.h | 2 +-
| > | arch/x86/include/asm/swab.h | 2 +-
| > | 7 files changed, 8 insertions(+), 5 deletions(-)
| > |
| > ...
| >
| > well... on the other hand I'm not sure if it's really
| > a good idea to include linux/types.h where we need only
| > __u[8,16] and so on definitions.
| >
| > Ingo, don't apply this patch please -- have to check
| > for other ways.
| >
|
| I am attaching usr/include/linux/types.h for your reference which
| includes all these definations for userspace.
|
| Thanks
| --
| JSR
yeah, thanks! I already have one in my git clone but anyway ;-)
- Cyrill -
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH -tip] x86: headers - include linux/types.h instead of asm/types.h
2009-01-13 13:10 ` Cyrill Gorcunov
@ 2009-01-13 13:25 ` Cyrill Gorcunov
2009-01-13 14:45 ` Ingo Molnar
1 sibling, 0 replies; 10+ messages in thread
From: Cyrill Gorcunov @ 2009-01-13 13:25 UTC (permalink / raw)
To: Ingo Molnar, H. Peter Anvin, Thomas Gleixner, LKML,
Harvey Harrison, Sam Ravnborg, Jaswinder Singh Rajput
[Cyrill Gorcunov - Tue, Jan 13, 2009 at 04:10:20PM +0300]
...
| | >
| | > well... on the other hand I'm not sure if it's really
| | > a good idea to include linux/types.h where we need only
| | > __u[8,16] and so on definitions.
| |
| | Well, linux/types.h is supposed to be a 'lightweight', 'core data types
| | only' kind of header file, so including it is not wrong per se.
| |
| | Sam, is there some other preferred way perhaps to resolve these?
| |
| | Ingo
| |
|
| Until such a file not passed to some *.S. For example for e820.h
| we have it included to arch/x86/boot/header.S but fortunately
| we're bound by __ASSEMBLY__. So there linux/types.h shouldn't hurt.
| Will check others and report then.
|
| - Cyrill -
ok, have checked -- this patch seems to be safe.
- Cyrill -
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH -tip] x86: headers - include linux/types.h instead of asm/types.h
2009-01-13 13:10 ` Cyrill Gorcunov
2009-01-13 13:25 ` Cyrill Gorcunov
@ 2009-01-13 14:45 ` Ingo Molnar
2009-01-13 14:49 ` Cyrill Gorcunov
1 sibling, 1 reply; 10+ messages in thread
From: Ingo Molnar @ 2009-01-13 14:45 UTC (permalink / raw)
To: Cyrill Gorcunov
Cc: H. Peter Anvin, Thomas Gleixner, LKML, Harvey Harrison,
Sam Ravnborg, Jaswinder Singh Rajput
* Cyrill Gorcunov <gorcunov@gmail.com> wrote:
> [Ingo Molnar - Tue, Jan 13, 2009 at 01:59:28PM +0100]
> |
> | * Cyrill Gorcunov <gorcunov@gmail.com> wrote:
> |
> | > [Cyrill Gorcunov - Tue, Jan 13, 2009 at 03:09:05PM +0300]
> | > | Impact: cleanup
> | > |
> | > | 'make headers_check' warns that linux/types.h is
> | > | preferred over asm/types.h. So be it.
> | > |
> | > | Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
> | > | CC: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
> | > | CC: Sam Ravnborg <sam@ravnborg.org>
> | > | CC: Harvey Harrison <harvey.harrison@gmail.com>
> | > | ---
> | > |
> | > | arch/x86/include/asm/e820.h | 2 ++
> | > | arch/x86/include/asm/kvm.h | 2 +-
> | > | arch/x86/include/asm/mce.h | 2 +-
> | > | arch/x86/include/asm/mtrr.h | 1 +
> | > | arch/x86/include/asm/ptrace-abi.h | 2 +-
> | > | arch/x86/include/asm/sigcontext.h | 2 +-
> | > | arch/x86/include/asm/swab.h | 2 +-
> | > | 7 files changed, 8 insertions(+), 5 deletions(-)
> | > |
> | > ...
> | >
> | > well... on the other hand I'm not sure if it's really
> | > a good idea to include linux/types.h where we need only
> | > __u[8,16] and so on definitions.
> |
> | Well, linux/types.h is supposed to be a 'lightweight', 'core data types
> | only' kind of header file, so including it is not wrong per se.
> |
> | Sam, is there some other preferred way perhaps to resolve these?
> |
> | Ingo
> |
>
> Until such a file not passed to some *.S. For example for e820.h we have
> it included to arch/x86/boot/header.S but fortunately we're bound by
> __ASSEMBLY__. So there linux/types.h shouldn't hurt. Will check others
> and report then.
Any reason to not protect types.h with #ifndef __ASSEMBLY__ ?
Ingo
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH -tip] x86: headers - include linux/types.h instead of asm/types.h
2009-01-13 14:45 ` Ingo Molnar
@ 2009-01-13 14:49 ` Cyrill Gorcunov
2009-01-13 15:06 ` Cyrill Gorcunov
0 siblings, 1 reply; 10+ messages in thread
From: Cyrill Gorcunov @ 2009-01-13 14:49 UTC (permalink / raw)
To: Ingo Molnar
Cc: H. Peter Anvin, Thomas Gleixner, LKML, Harvey Harrison,
Sam Ravnborg, Jaswinder Singh Rajput
[Ingo Molnar - Tue, Jan 13, 2009 at 03:45:05PM +0100]
...
| >
| > Until such a file not passed to some *.S. For example for e820.h we have
| > it included to arch/x86/boot/header.S but fortunately we're bound by
| > __ASSEMBLY__. So there linux/types.h shouldn't hurt. Will check others
| > and report then.
|
| Any reason to not protect types.h with #ifndef __ASSEMBLY__ ?
|
| Ingo
|
hmm... good question :) letme check
- Cyrill -
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH -tip] x86: headers - include linux/types.h instead of asm/types.h
2009-01-13 14:49 ` Cyrill Gorcunov
@ 2009-01-13 15:06 ` Cyrill Gorcunov
0 siblings, 0 replies; 10+ messages in thread
From: Cyrill Gorcunov @ 2009-01-13 15:06 UTC (permalink / raw)
To: Ingo Molnar, H. Peter Anvin, Thomas Gleixner, LKML,
Harvey Harrison, Sam Ravnborg, Jaswinder Singh Rajput
[Cyrill Gorcunov - Tue, Jan 13, 2009 at 05:49:56PM +0300]
| [Ingo Molnar - Tue, Jan 13, 2009 at 03:45:05PM +0100]
| ...
| | >
| | > Until such a file not passed to some *.S. For example for e820.h we have
| | > it included to arch/x86/boot/header.S but fortunately we're bound by
| | > __ASSEMBLY__. So there linux/types.h shouldn't hurt. Will check others
| | > and report then.
| |
| | Any reason to not protect types.h with #ifndef __ASSEMBLY__ ?
| |
| | Ingo
| |
|
| hmm... good question :) letme check
|
| - Cyrill -
Dunno Ingo, it's dubious. I don't like the idea
to start including types.h into any kind of *.S
with #ifndef __ASSEMBLY__ protection. We export it
into user space and I don't remember if it mentioned
somewhere that user is not allowed to use -D__ASSEMBLY__.
Someone more experienced (then me) in this area should
asked first :-)
- Cyrill -
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2009-01-13 15:07 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-13 12:09 [PATCH -tip] x86: headers - include linux/types.h instead of asm/types.h Cyrill Gorcunov
2009-01-13 12:57 ` Cyrill Gorcunov
2009-01-13 12:59 ` Ingo Molnar
2009-01-13 13:10 ` Cyrill Gorcunov
2009-01-13 13:25 ` Cyrill Gorcunov
2009-01-13 14:45 ` Ingo Molnar
2009-01-13 14:49 ` Cyrill Gorcunov
2009-01-13 15:06 ` Cyrill Gorcunov
2009-01-13 13:08 ` Jaswinder Singh Rajput
2009-01-13 13:12 ` Cyrill Gorcunov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox