diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-09-19 00:42:13 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-09-19 00:42:13 -0400 |
commit | 4a3381feb823e06c8e2da7e283c17b0b6fdbddcf (patch) | |
tree | e1bef4c3db854bb10fd13dc67415d77b5d999533 /include/asm-i386 | |
parent | fea63e38013ec628ab3f7fddc4c2148064b7910a (diff) | |
parent | 47a5c6fa0e204a2b63309c648bb2fde36836c826 (diff) |
Merge branch 'master' into upstream
Diffstat (limited to 'include/asm-i386')
-rw-r--r-- | include/asm-i386/Kbuild | 4 | ||||
-rw-r--r-- | include/asm-i386/elf.h | 10 | ||||
-rw-r--r-- | include/asm-i386/setup.h | 2 | ||||
-rw-r--r-- | include/asm-i386/signal.h | 4 | ||||
-rw-r--r-- | include/asm-i386/system.h | 8 | ||||
-rw-r--r-- | include/asm-i386/unistd.h | 4 |
6 files changed, 22 insertions, 10 deletions
diff --git a/include/asm-i386/Kbuild b/include/asm-i386/Kbuild index 335b2fa4e066..2308190321da 100644 --- a/include/asm-i386/Kbuild +++ b/include/asm-i386/Kbuild | |||
@@ -1,5 +1,5 @@ | |||
1 | include include/asm-generic/Kbuild.asm | 1 | include include/asm-generic/Kbuild.asm |
2 | 2 | ||
3 | header-y += boot.h debugreg.h ldt.h setup.h ucontext.h | 3 | header-y += boot.h debugreg.h ldt.h ucontext.h |
4 | 4 | ||
5 | unifdef-y += mtrr.h vm86.h | 5 | unifdef-y += mtrr.h setup.h vm86.h |
diff --git a/include/asm-i386/elf.h b/include/asm-i386/elf.h index 1eac92cb5b16..db4344d9f73f 100644 --- a/include/asm-i386/elf.h +++ b/include/asm-i386/elf.h | |||
@@ -7,10 +7,7 @@ | |||
7 | 7 | ||
8 | #include <asm/ptrace.h> | 8 | #include <asm/ptrace.h> |
9 | #include <asm/user.h> | 9 | #include <asm/user.h> |
10 | #include <asm/processor.h> | ||
11 | #include <asm/system.h> /* for savesegment */ | ||
12 | #include <asm/auxvec.h> | 10 | #include <asm/auxvec.h> |
13 | #include <asm/desc.h> | ||
14 | 11 | ||
15 | #include <linux/utsname.h> | 12 | #include <linux/utsname.h> |
16 | 13 | ||
@@ -48,6 +45,12 @@ typedef struct user_fxsr_struct elf_fpxregset_t; | |||
48 | #define ELF_DATA ELFDATA2LSB | 45 | #define ELF_DATA ELFDATA2LSB |
49 | #define ELF_ARCH EM_386 | 46 | #define ELF_ARCH EM_386 |
50 | 47 | ||
48 | #ifdef __KERNEL__ | ||
49 | |||
50 | #include <asm/processor.h> | ||
51 | #include <asm/system.h> /* for savesegment */ | ||
52 | #include <asm/desc.h> | ||
53 | |||
51 | /* SVR4/i386 ABI (pages 3-31, 3-32) says that when the program starts %edx | 54 | /* SVR4/i386 ABI (pages 3-31, 3-32) says that when the program starts %edx |
52 | contains a pointer to a function which might be registered using `atexit'. | 55 | contains a pointer to a function which might be registered using `atexit'. |
53 | This provides a mean for the dynamic linker to call DT_FINI functions for | 56 | This provides a mean for the dynamic linker to call DT_FINI functions for |
@@ -111,7 +114,6 @@ typedef struct user_fxsr_struct elf_fpxregset_t; | |||
111 | 114 | ||
112 | #define ELF_PLATFORM (system_utsname.machine) | 115 | #define ELF_PLATFORM (system_utsname.machine) |
113 | 116 | ||
114 | #ifdef __KERNEL__ | ||
115 | #define SET_PERSONALITY(ex, ibcs2) do { } while (0) | 117 | #define SET_PERSONALITY(ex, ibcs2) do { } while (0) |
116 | 118 | ||
117 | /* | 119 | /* |
diff --git a/include/asm-i386/setup.h b/include/asm-i386/setup.h index f737e423029e..2734909eff84 100644 --- a/include/asm-i386/setup.h +++ b/include/asm-i386/setup.h | |||
@@ -6,6 +6,7 @@ | |||
6 | #ifndef _i386_SETUP_H | 6 | #ifndef _i386_SETUP_H |
7 | #define _i386_SETUP_H | 7 | #define _i386_SETUP_H |
8 | 8 | ||
9 | #ifdef __KERNEL__ | ||
9 | #include <linux/pfn.h> | 10 | #include <linux/pfn.h> |
10 | 11 | ||
11 | /* | 12 | /* |
@@ -13,6 +14,7 @@ | |||
13 | */ | 14 | */ |
14 | #define MAXMEM_PFN PFN_DOWN(MAXMEM) | 15 | #define MAXMEM_PFN PFN_DOWN(MAXMEM) |
15 | #define MAX_NONPAE_PFN (1 << 20) | 16 | #define MAX_NONPAE_PFN (1 << 20) |
17 | #endif | ||
16 | 18 | ||
17 | #define PARAM_SIZE 4096 | 19 | #define PARAM_SIZE 4096 |
18 | #define COMMAND_LINE_SIZE 256 | 20 | #define COMMAND_LINE_SIZE 256 |
diff --git a/include/asm-i386/signal.h b/include/asm-i386/signal.h index 3824a502351f..c3e8adec5918 100644 --- a/include/asm-i386/signal.h +++ b/include/asm-i386/signal.h | |||
@@ -2,7 +2,6 @@ | |||
2 | #define _ASMi386_SIGNAL_H | 2 | #define _ASMi386_SIGNAL_H |
3 | 3 | ||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | #include <linux/linkage.h> | ||
6 | #include <linux/time.h> | 5 | #include <linux/time.h> |
7 | #include <linux/compiler.h> | 6 | #include <linux/compiler.h> |
8 | 7 | ||
@@ -10,6 +9,9 @@ | |||
10 | struct siginfo; | 9 | struct siginfo; |
11 | 10 | ||
12 | #ifdef __KERNEL__ | 11 | #ifdef __KERNEL__ |
12 | |||
13 | #include <linux/linkage.h> | ||
14 | |||
13 | /* Most things should be clean enough to redefine this at will, if care | 15 | /* Most things should be clean enough to redefine this at will, if care |
14 | is taken to make libc match. */ | 16 | is taken to make libc match. */ |
15 | 17 | ||
diff --git a/include/asm-i386/system.h b/include/asm-i386/system.h index 49928eb33f8b..098bcee94e38 100644 --- a/include/asm-i386/system.h +++ b/include/asm-i386/system.h | |||
@@ -11,9 +11,14 @@ | |||
11 | struct task_struct; /* one of the stranger aspects of C forward declarations.. */ | 11 | struct task_struct; /* one of the stranger aspects of C forward declarations.. */ |
12 | extern struct task_struct * FASTCALL(__switch_to(struct task_struct *prev, struct task_struct *next)); | 12 | extern struct task_struct * FASTCALL(__switch_to(struct task_struct *prev, struct task_struct *next)); |
13 | 13 | ||
14 | /* | ||
15 | * Saving eflags is important. It switches not only IOPL between tasks, | ||
16 | * it also protects other tasks from NT leaking through sysenter etc. | ||
17 | */ | ||
14 | #define switch_to(prev,next,last) do { \ | 18 | #define switch_to(prev,next,last) do { \ |
15 | unsigned long esi,edi; \ | 19 | unsigned long esi,edi; \ |
16 | asm volatile("pushl %%ebp\n\t" \ | 20 | asm volatile("pushfl\n\t" /* Save flags */ \ |
21 | "pushl %%ebp\n\t" \ | ||
17 | "movl %%esp,%0\n\t" /* save ESP */ \ | 22 | "movl %%esp,%0\n\t" /* save ESP */ \ |
18 | "movl %5,%%esp\n\t" /* restore ESP */ \ | 23 | "movl %5,%%esp\n\t" /* restore ESP */ \ |
19 | "movl $1f,%1\n\t" /* save EIP */ \ | 24 | "movl $1f,%1\n\t" /* save EIP */ \ |
@@ -21,6 +26,7 @@ extern struct task_struct * FASTCALL(__switch_to(struct task_struct *prev, struc | |||
21 | "jmp __switch_to\n" \ | 26 | "jmp __switch_to\n" \ |
22 | "1:\t" \ | 27 | "1:\t" \ |
23 | "popl %%ebp\n\t" \ | 28 | "popl %%ebp\n\t" \ |
29 | "popfl" \ | ||
24 | :"=m" (prev->thread.esp),"=m" (prev->thread.eip), \ | 30 | :"=m" (prev->thread.esp),"=m" (prev->thread.eip), \ |
25 | "=a" (last),"=S" (esi),"=D" (edi) \ | 31 | "=a" (last),"=S" (esi),"=D" (edi) \ |
26 | :"m" (next->thread.esp),"m" (next->thread.eip), \ | 32 | :"m" (next->thread.esp),"m" (next->thread.eip), \ |
diff --git a/include/asm-i386/unistd.h b/include/asm-i386/unistd.h index d983b74e4d9f..fc1c8ddae149 100644 --- a/include/asm-i386/unistd.h +++ b/include/asm-i386/unistd.h | |||
@@ -324,6 +324,8 @@ | |||
324 | #define __NR_vmsplice 316 | 324 | #define __NR_vmsplice 316 |
325 | #define __NR_move_pages 317 | 325 | #define __NR_move_pages 317 |
326 | 326 | ||
327 | #ifdef __KERNEL__ | ||
328 | |||
327 | #define NR_syscalls 318 | 329 | #define NR_syscalls 318 |
328 | 330 | ||
329 | /* | 331 | /* |
@@ -423,8 +425,6 @@ __asm__ volatile ("push %%ebp ; push %%ebx ; movl 4(%2),%%ebp ; " \ | |||
423 | __syscall_return(type,__res); \ | 425 | __syscall_return(type,__res); \ |
424 | } | 426 | } |
425 | 427 | ||
426 | #ifdef __KERNEL__ | ||
427 | |||
428 | #define __ARCH_WANT_IPC_PARSE_VERSION | 428 | #define __ARCH_WANT_IPC_PARSE_VERSION |
429 | #define __ARCH_WANT_OLD_READDIR | 429 | #define __ARCH_WANT_OLD_READDIR |
430 | #define __ARCH_WANT_OLD_STAT | 430 | #define __ARCH_WANT_OLD_STAT |