diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2006-09-21 10:18:14 -0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-09-21 10:18:14 -0400 |
commit | 91fa47964165a42401fbc1f41caa63ab78564305 (patch) | |
tree | 8f4ffdcbdedd845563630c3bcacd9407c75ccb52 /include | |
parent | 56965536b8056f57830219efbba4b85218d96d6c (diff) | |
parent | e478bec0ba0a83a48a0f6982934b6de079e7e6b3 (diff) |
Merge branch 'master' into gfs2
Diffstat (limited to 'include')
37 files changed, 260 insertions, 137 deletions
diff --git a/include/asm-alpha/Kbuild b/include/asm-alpha/Kbuild index e57fd57538b8..2b06b3bad5ff 100644 --- a/include/asm-alpha/Kbuild +++ b/include/asm-alpha/Kbuild | |||
@@ -1,5 +1,5 @@ | |||
1 | include include/asm-generic/Kbuild.asm | 1 | include include/asm-generic/Kbuild.asm |
2 | 2 | ||
3 | unifdef-y += console.h fpu.h sysinfo.h | 3 | unifdef-y += console.h fpu.h sysinfo.h compiler.h |
4 | 4 | ||
5 | header-y += gentrap.h regdef.h pal.h reg.h | 5 | header-y += gentrap.h regdef.h pal.h reg.h |
diff --git a/include/asm-alpha/compiler.h b/include/asm-alpha/compiler.h index 00c6f57ad9a7..d2768cc3d7a4 100644 --- a/include/asm-alpha/compiler.h +++ b/include/asm-alpha/compiler.h | |||
@@ -90,6 +90,7 @@ | |||
90 | __asm__("stw %1,%0" : "=m"(mem) : "r"(val)) | 90 | __asm__("stw %1,%0" : "=m"(mem) : "r"(val)) |
91 | #endif | 91 | #endif |
92 | 92 | ||
93 | #ifdef __KERNEL__ | ||
93 | /* Some idiots over in <linux/compiler.h> thought inline should imply | 94 | /* Some idiots over in <linux/compiler.h> thought inline should imply |
94 | always_inline. This breaks stuff. We'll include this file whenever | 95 | always_inline. This breaks stuff. We'll include this file whenever |
95 | we run into such problems. */ | 96 | we run into such problems. */ |
@@ -101,4 +102,6 @@ | |||
101 | #undef __always_inline | 102 | #undef __always_inline |
102 | #define __always_inline inline __attribute__((always_inline)) | 103 | #define __always_inline inline __attribute__((always_inline)) |
103 | 104 | ||
105 | #endif /* __KERNEL__ */ | ||
106 | |||
104 | #endif /* __ALPHA_COMPILER_H */ | 107 | #endif /* __ALPHA_COMPILER_H */ |
diff --git a/include/asm-alpha/page.h b/include/asm-alpha/page.h index 8c7cd50d4eae..d2bed3cb33ff 100644 --- a/include/asm-alpha/page.h +++ b/include/asm-alpha/page.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef _ALPHA_PAGE_H | 1 | #ifndef _ALPHA_PAGE_H |
2 | #define _ALPHA_PAGE_H | 2 | #define _ALPHA_PAGE_H |
3 | 3 | ||
4 | #ifdef __KERNEL__ | ||
5 | |||
4 | #include <asm/pal.h> | 6 | #include <asm/pal.h> |
5 | 7 | ||
6 | /* PAGE_SHIFT determines the page size */ | 8 | /* PAGE_SHIFT determines the page size */ |
@@ -8,8 +10,6 @@ | |||
8 | #define PAGE_SIZE (1UL << PAGE_SHIFT) | 10 | #define PAGE_SIZE (1UL << PAGE_SHIFT) |
9 | #define PAGE_MASK (~(PAGE_SIZE-1)) | 11 | #define PAGE_MASK (~(PAGE_SIZE-1)) |
10 | 12 | ||
11 | #ifdef __KERNEL__ | ||
12 | |||
13 | #ifndef __ASSEMBLY__ | 13 | #ifndef __ASSEMBLY__ |
14 | 14 | ||
15 | #define STRICT_MM_TYPECHECKS | 15 | #define STRICT_MM_TYPECHECKS |
@@ -92,9 +92,9 @@ typedef unsigned long pgprot_t; | |||
92 | 92 | ||
93 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ | 93 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ |
94 | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) | 94 | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) |
95 | #endif /* __KERNEL__ */ | ||
96 | 95 | ||
97 | #include <asm-generic/memory_model.h> | 96 | #include <asm-generic/memory_model.h> |
98 | #include <asm-generic/page.h> | 97 | #include <asm-generic/page.h> |
99 | 98 | ||
99 | #endif /* __KERNEL__ */ | ||
100 | #endif /* _ALPHA_PAGE_H */ | 100 | #endif /* _ALPHA_PAGE_H */ |
diff --git a/include/asm-arm/arch-s3c2410/regs-power.h b/include/asm-arm/arch-s3c2410/regs-power.h new file mode 100644 index 000000000000..6c319ea2afac --- /dev/null +++ b/include/asm-arm/arch-s3c2410/regs-power.h | |||
@@ -0,0 +1,34 @@ | |||
1 | /* linux/include/asm/arch-s3c2410/regs-power.h | ||
2 | * | ||
3 | * Copyright (c) 2003,2004,2005,2006 Simtec Electronics <linux@simtec.co.uk> | ||
4 | * http://armlinux.simtec.co.uk/ | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | * S3C24XX power control register definitions | ||
11 | */ | ||
12 | |||
13 | #ifndef __ASM_ARM_REGS_PWR | ||
14 | #define __ASM_ARM_REGS_PWR __FILE__ | ||
15 | |||
16 | #define S3C24XX_PWRREG(x) ((x) + S3C24XX_VA_CLKPWR) | ||
17 | |||
18 | #define S3C2412_PWRMODECON S3C24XX_PWRREG(0x20) | ||
19 | #define S3C2412_PWRCFG S3C24XX_PWRREG(0x24) | ||
20 | |||
21 | #define S3C2412_PWRCFG_BATF_IGNORE (0<<0) | ||
22 | #define S3C2412_PWRCFG_BATF_SLEEP (3<<0) | ||
23 | #define S3C2412_PWRCFG_BATF_MASK (3<<0) | ||
24 | |||
25 | #define S3C2412_PWRCFG_STANDBYWFI_IGNORE (0<<6) | ||
26 | #define S3C2412_PWRCFG_STANDBYWFI_IDLE (1<<6) | ||
27 | #define S3C2412_PWRCFG_STANDBYWFI_STOP (2<<6) | ||
28 | #define S3C2412_PWRCFG_STANDBYWFI_SLEEP (3<<6) | ||
29 | #define S3C2412_PWRCFG_STANDBYWFI_MASK (3<<6) | ||
30 | |||
31 | #define S3C2412_PWRCFG_RTC_MASKIRQ (1<<8) | ||
32 | #define S3C2412_PWRCFG_NAND_NORST (1<<9) | ||
33 | |||
34 | #endif /* __ASM_ARM_REGS_PWR */ | ||
diff --git a/include/asm-arm/elf.h b/include/asm-arm/elf.h index 71061ca5c5d0..ae7baa6c73f7 100644 --- a/include/asm-arm/elf.h +++ b/include/asm-arm/elf.h | |||
@@ -8,7 +8,9 @@ | |||
8 | 8 | ||
9 | #include <asm/ptrace.h> | 9 | #include <asm/ptrace.h> |
10 | #include <asm/user.h> | 10 | #include <asm/user.h> |
11 | #ifdef __KERNEL | ||
11 | #include <asm/procinfo.h> | 12 | #include <asm/procinfo.h> |
13 | #endif | ||
12 | 14 | ||
13 | typedef unsigned long elf_greg_t; | 15 | typedef unsigned long elf_greg_t; |
14 | typedef unsigned long elf_freg_t[3]; | 16 | typedef unsigned long elf_freg_t[3]; |
diff --git a/include/asm-arm/page.h b/include/asm-arm/page.h index 63d12f0244c5..b721270b9986 100644 --- a/include/asm-arm/page.h +++ b/include/asm-arm/page.h | |||
@@ -193,8 +193,8 @@ extern pmd_t *top_pmd; | |||
193 | #define ARCH_SLAB_MINALIGN 8 | 193 | #define ARCH_SLAB_MINALIGN 8 |
194 | #endif | 194 | #endif |
195 | 195 | ||
196 | #endif /* __KERNEL__ */ | ||
197 | |||
198 | #include <asm-generic/page.h> | 196 | #include <asm-generic/page.h> |
199 | 197 | ||
198 | #endif /* __KERNEL__ */ | ||
199 | |||
200 | #endif | 200 | #endif |
diff --git a/include/asm-generic/Kbuild.asm b/include/asm-generic/Kbuild.asm index 6b16dda18115..c00de6028fa8 100644 --- a/include/asm-generic/Kbuild.asm +++ b/include/asm-generic/Kbuild.asm | |||
@@ -2,7 +2,7 @@ unifdef-y += a.out.h auxvec.h byteorder.h errno.h fcntl.h ioctl.h \ | |||
2 | ioctls.h ipcbuf.h mman.h msgbuf.h param.h poll.h \ | 2 | ioctls.h ipcbuf.h mman.h msgbuf.h param.h poll.h \ |
3 | posix_types.h ptrace.h resource.h sembuf.h shmbuf.h shmparam.h \ | 3 | posix_types.h ptrace.h resource.h sembuf.h shmbuf.h shmparam.h \ |
4 | sigcontext.h siginfo.h signal.h socket.h sockios.h stat.h \ | 4 | sigcontext.h siginfo.h signal.h socket.h sockios.h stat.h \ |
5 | statfs.h termbits.h termios.h timex.h types.h unistd.h user.h | 5 | statfs.h termbits.h termios.h types.h unistd.h user.h |
6 | 6 | ||
7 | # These probably shouldn't be exported | 7 | # These probably shouldn't be exported |
8 | unifdef-y += elf.h page.h | 8 | unifdef-y += elf.h page.h |
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 |
diff --git a/include/asm-ia64/Kbuild b/include/asm-ia64/Kbuild index 85d6f8005eb4..f1cb00f39c22 100644 --- a/include/asm-ia64/Kbuild +++ b/include/asm-ia64/Kbuild | |||
@@ -4,4 +4,4 @@ header-y += break.h fpu.h fpswa.h gcc_intrin.h ia64regs.h \ | |||
4 | intel_intrin.h intrinsics.h perfmon_default_smpl.h \ | 4 | intel_intrin.h intrinsics.h perfmon_default_smpl.h \ |
5 | ptrace_offsets.h rse.h setup.h ucontext.h | 5 | ptrace_offsets.h rse.h setup.h ucontext.h |
6 | 6 | ||
7 | unifdef-y += perfmon.h | 7 | unifdef-y += perfmon.h ustack.h |
diff --git a/include/asm-ia64/page.h b/include/asm-ia64/page.h index f5a949ec6e1e..947cb72b520e 100644 --- a/include/asm-ia64/page.h +++ b/include/asm-ia64/page.h | |||
@@ -7,6 +7,7 @@ | |||
7 | * David Mosberger-Tang <davidm@hpl.hp.com> | 7 | * David Mosberger-Tang <davidm@hpl.hp.com> |
8 | */ | 8 | */ |
9 | 9 | ||
10 | # ifdef __KERNEL__ | ||
10 | 11 | ||
11 | #include <asm/intrinsics.h> | 12 | #include <asm/intrinsics.h> |
12 | #include <asm/types.h> | 13 | #include <asm/types.h> |
@@ -64,7 +65,6 @@ | |||
64 | # define __pa(x) ((x) - PAGE_OFFSET) | 65 | # define __pa(x) ((x) - PAGE_OFFSET) |
65 | # define __va(x) ((x) + PAGE_OFFSET) | 66 | # define __va(x) ((x) + PAGE_OFFSET) |
66 | #else /* !__ASSEMBLY */ | 67 | #else /* !__ASSEMBLY */ |
67 | # ifdef __KERNEL__ | ||
68 | # define STRICT_MM_TYPECHECKS | 68 | # define STRICT_MM_TYPECHECKS |
69 | 69 | ||
70 | extern void clear_page (void *page); | 70 | extern void clear_page (void *page); |
@@ -174,7 +174,6 @@ get_order (unsigned long size) | |||
174 | return order; | 174 | return order; |
175 | } | 175 | } |
176 | 176 | ||
177 | # endif /* __KERNEL__ */ | ||
178 | #endif /* !__ASSEMBLY__ */ | 177 | #endif /* !__ASSEMBLY__ */ |
179 | 178 | ||
180 | #ifdef STRICT_MM_TYPECHECKS | 179 | #ifdef STRICT_MM_TYPECHECKS |
@@ -228,4 +227,5 @@ get_order (unsigned long size) | |||
228 | (((current->personality & READ_IMPLIES_EXEC) != 0) \ | 227 | (((current->personality & READ_IMPLIES_EXEC) != 0) \ |
229 | ? VM_EXEC : 0)) | 228 | ? VM_EXEC : 0)) |
230 | 229 | ||
230 | # endif /* __KERNEL__ */ | ||
231 | #endif /* _ASM_IA64_PAGE_H */ | 231 | #endif /* _ASM_IA64_PAGE_H */ |
diff --git a/include/asm-ia64/ptrace.h b/include/asm-ia64/ptrace.h index 415abb23b210..1414316efd40 100644 --- a/include/asm-ia64/ptrace.h +++ b/include/asm-ia64/ptrace.h | |||
@@ -56,6 +56,8 @@ | |||
56 | 56 | ||
57 | 57 | ||
58 | #include <asm/fpu.h> | 58 | #include <asm/fpu.h> |
59 | |||
60 | #ifdef __KERNEL__ | ||
59 | #ifndef ASM_OFFSETS_C | 61 | #ifndef ASM_OFFSETS_C |
60 | #include <asm/asm-offsets.h> | 62 | #include <asm/asm-offsets.h> |
61 | #endif | 63 | #endif |
@@ -79,10 +81,9 @@ | |||
79 | 81 | ||
80 | #define KERNEL_STACK_SIZE IA64_STK_OFFSET | 82 | #define KERNEL_STACK_SIZE IA64_STK_OFFSET |
81 | 83 | ||
82 | #ifndef __ASSEMBLY__ | 84 | #endif /* __KERNEL__ */ |
83 | 85 | ||
84 | #include <asm/current.h> | 86 | #ifndef __ASSEMBLY__ |
85 | #include <asm/page.h> | ||
86 | 87 | ||
87 | /* | 88 | /* |
88 | * This struct defines the way the registers are saved on system | 89 | * This struct defines the way the registers are saved on system |
@@ -229,6 +230,9 @@ struct switch_stack { | |||
229 | 230 | ||
230 | #ifdef __KERNEL__ | 231 | #ifdef __KERNEL__ |
231 | 232 | ||
233 | #include <asm/current.h> | ||
234 | #include <asm/page.h> | ||
235 | |||
232 | #define __ARCH_SYS_PTRACE 1 | 236 | #define __ARCH_SYS_PTRACE 1 |
233 | 237 | ||
234 | /* | 238 | /* |
diff --git a/include/asm-ia64/ustack.h b/include/asm-ia64/ustack.h index da55c91246e3..a349467913ea 100644 --- a/include/asm-ia64/ustack.h +++ b/include/asm-ia64/ustack.h | |||
@@ -5,12 +5,15 @@ | |||
5 | * Constants for the user stack size | 5 | * Constants for the user stack size |
6 | */ | 6 | */ |
7 | 7 | ||
8 | #ifdef __KERNEL__ | ||
8 | #include <asm/page.h> | 9 | #include <asm/page.h> |
9 | 10 | ||
10 | /* The absolute hard limit for stack size is 1/2 of the mappable space in the region */ | 11 | /* The absolute hard limit for stack size is 1/2 of the mappable space in the region */ |
11 | #define MAX_USER_STACK_SIZE (RGN_MAP_LIMIT/2) | 12 | #define MAX_USER_STACK_SIZE (RGN_MAP_LIMIT/2) |
12 | /* Make a default stack size of 2GB */ | ||
13 | #define DEFAULT_USER_STACK_SIZE (1UL << 31) | ||
14 | #define STACK_TOP (0x6000000000000000UL + RGN_MAP_LIMIT) | 13 | #define STACK_TOP (0x6000000000000000UL + RGN_MAP_LIMIT) |
14 | #endif | ||
15 | |||
16 | /* Make a default stack size of 2GiB */ | ||
17 | #define DEFAULT_USER_STACK_SIZE (1UL << 31) | ||
15 | 18 | ||
16 | #endif /* _ASM_IA64_USTACK_H */ | 19 | #endif /* _ASM_IA64_USTACK_H */ |
diff --git a/include/asm-m68k/page.h b/include/asm-m68k/page.h index db017f838c29..fcc165ddd09e 100644 --- a/include/asm-m68k/page.h +++ b/include/asm-m68k/page.h | |||
@@ -2,6 +2,8 @@ | |||
2 | #define _M68K_PAGE_H | 2 | #define _M68K_PAGE_H |
3 | 3 | ||
4 | 4 | ||
5 | #ifdef __KERNEL__ | ||
6 | |||
5 | /* PAGE_SHIFT determines the page size */ | 7 | /* PAGE_SHIFT determines the page size */ |
6 | #ifndef CONFIG_SUN3 | 8 | #ifndef CONFIG_SUN3 |
7 | #define PAGE_SHIFT (12) | 9 | #define PAGE_SHIFT (12) |
@@ -15,8 +17,6 @@ | |||
15 | #endif | 17 | #endif |
16 | #define PAGE_MASK (~(PAGE_SIZE-1)) | 18 | #define PAGE_MASK (~(PAGE_SIZE-1)) |
17 | 19 | ||
18 | #ifdef __KERNEL__ | ||
19 | |||
20 | #include <asm/setup.h> | 20 | #include <asm/setup.h> |
21 | 21 | ||
22 | #if PAGE_SHIFT < 13 | 22 | #if PAGE_SHIFT < 13 |
@@ -175,8 +175,8 @@ static inline void *__va(unsigned long x) | |||
175 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ | 175 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ |
176 | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) | 176 | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) |
177 | 177 | ||
178 | #endif /* __KERNEL__ */ | ||
179 | |||
180 | #include <asm-generic/page.h> | 178 | #include <asm-generic/page.h> |
181 | 179 | ||
180 | #endif /* __KERNEL__ */ | ||
181 | |||
182 | #endif /* _M68K_PAGE_H */ | 182 | #endif /* _M68K_PAGE_H */ |
diff --git a/include/asm-mips/page.h b/include/asm-mips/page.h index 6ed1151a05a3..219d359861f3 100644 --- a/include/asm-mips/page.h +++ b/include/asm-mips/page.h | |||
@@ -14,8 +14,6 @@ | |||
14 | 14 | ||
15 | #include <spaces.h> | 15 | #include <spaces.h> |
16 | 16 | ||
17 | #endif | ||
18 | |||
19 | /* | 17 | /* |
20 | * PAGE_SHIFT determines the page size | 18 | * PAGE_SHIFT determines the page size |
21 | */ | 19 | */ |
@@ -34,8 +32,6 @@ | |||
34 | #define PAGE_SIZE (1UL << PAGE_SHIFT) | 32 | #define PAGE_SIZE (1UL << PAGE_SHIFT) |
35 | #define PAGE_MASK (~((1 << PAGE_SHIFT) - 1)) | 33 | #define PAGE_MASK (~((1 << PAGE_SHIFT) - 1)) |
36 | 34 | ||
37 | |||
38 | #ifdef __KERNEL__ | ||
39 | #ifndef __ASSEMBLY__ | 35 | #ifndef __ASSEMBLY__ |
40 | 36 | ||
41 | extern void clear_page(void * page); | 37 | extern void clear_page(void * page); |
@@ -168,8 +164,6 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
168 | #define UNCAC_ADDR(addr) ((addr) - PAGE_OFFSET + UNCAC_BASE) | 164 | #define UNCAC_ADDR(addr) ((addr) - PAGE_OFFSET + UNCAC_BASE) |
169 | #define CAC_ADDR(addr) ((addr) - UNCAC_BASE + PAGE_OFFSET) | 165 | #define CAC_ADDR(addr) ((addr) - UNCAC_BASE + PAGE_OFFSET) |
170 | 166 | ||
171 | #endif /* defined (__KERNEL__) */ | ||
172 | |||
173 | #ifdef CONFIG_LIMITED_DMA | 167 | #ifdef CONFIG_LIMITED_DMA |
174 | #define WANT_PAGE_VIRTUAL | 168 | #define WANT_PAGE_VIRTUAL |
175 | #endif | 169 | #endif |
@@ -177,4 +171,6 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
177 | #include <asm-generic/memory_model.h> | 171 | #include <asm-generic/memory_model.h> |
178 | #include <asm-generic/page.h> | 172 | #include <asm-generic/page.h> |
179 | 173 | ||
174 | #endif /* defined (__KERNEL__) */ | ||
175 | |||
180 | #endif /* _ASM_PAGE_H */ | 176 | #endif /* _ASM_PAGE_H */ |
diff --git a/include/asm-parisc/page.h b/include/asm-parisc/page.h index 0695bc958d56..57d6d82756dd 100644 --- a/include/asm-parisc/page.h +++ b/include/asm-parisc/page.h | |||
@@ -1,22 +1,14 @@ | |||
1 | #ifndef _PARISC_PAGE_H | 1 | #ifndef _PARISC_PAGE_H |
2 | #define _PARISC_PAGE_H | 2 | #define _PARISC_PAGE_H |
3 | 3 | ||
4 | #if !defined(__KERNEL__) | ||
5 | /* this is for userspace applications (4k page size) */ | ||
6 | # define PAGE_SHIFT 12 /* 4k */ | ||
7 | # define PAGE_SIZE (1UL << PAGE_SHIFT) | ||
8 | # define PAGE_MASK (~(PAGE_SIZE-1)) | ||
9 | #endif | ||
10 | |||
11 | |||
12 | #ifdef __KERNEL__ | 4 | #ifdef __KERNEL__ |
13 | 5 | ||
14 | #if defined(CONFIG_PARISC_PAGE_SIZE_4KB) | 6 | #if defined(CONFIG_PARISC_PAGE_SIZE_4KB) |
15 | # define PAGE_SHIFT 12 /* 4k */ | 7 | # define PAGE_SHIFT 12 |
16 | #elif defined(CONFIG_PARISC_PAGE_SIZE_16KB) | 8 | #elif defined(CONFIG_PARISC_PAGE_SIZE_16KB) |
17 | # define PAGE_SHIFT 14 /* 16k */ | 9 | # define PAGE_SHIFT 14 |
18 | #elif defined(CONFIG_PARISC_PAGE_SIZE_64KB) | 10 | #elif defined(CONFIG_PARISC_PAGE_SIZE_64KB) |
19 | # define PAGE_SHIFT 16 /* 64k */ | 11 | # define PAGE_SHIFT 16 |
20 | #else | 12 | #else |
21 | # error "unknown default kernel page size" | 13 | # error "unknown default kernel page size" |
22 | #endif | 14 | #endif |
@@ -188,9 +180,9 @@ extern int npmem_ranges; | |||
188 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ | 180 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ |
189 | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) | 181 | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) |
190 | 182 | ||
191 | #endif /* __KERNEL__ */ | ||
192 | |||
193 | #include <asm-generic/memory_model.h> | 183 | #include <asm-generic/memory_model.h> |
194 | #include <asm-generic/page.h> | 184 | #include <asm-generic/page.h> |
195 | 185 | ||
186 | #endif /* __KERNEL__ */ | ||
187 | |||
196 | #endif /* _PARISC_PAGE_H */ | 188 | #endif /* _PARISC_PAGE_H */ |
diff --git a/include/asm-powerpc/eeh.h b/include/asm-powerpc/eeh.h index 4df3e80118f4..6a784396660b 100644 --- a/include/asm-powerpc/eeh.h +++ b/include/asm-powerpc/eeh.h | |||
@@ -205,6 +205,7 @@ static inline void eeh_memset_io(volatile void __iomem *addr, int c, | |||
205 | lc |= lc << 8; | 205 | lc |= lc << 8; |
206 | lc |= lc << 16; | 206 | lc |= lc << 16; |
207 | 207 | ||
208 | __asm__ __volatile__ ("sync" : : : "memory"); | ||
208 | while(n && !EEH_CHECK_ALIGN(p, 4)) { | 209 | while(n && !EEH_CHECK_ALIGN(p, 4)) { |
209 | *((volatile u8 *)p) = c; | 210 | *((volatile u8 *)p) = c; |
210 | p++; | 211 | p++; |
@@ -229,6 +230,7 @@ static inline void eeh_memcpy_fromio(void *dest, const volatile void __iomem *sr | |||
229 | void *destsave = dest; | 230 | void *destsave = dest; |
230 | unsigned long nsave = n; | 231 | unsigned long nsave = n; |
231 | 232 | ||
233 | __asm__ __volatile__ ("sync" : : : "memory"); | ||
232 | while(n && (!EEH_CHECK_ALIGN(vsrc, 4) || !EEH_CHECK_ALIGN(dest, 4))) { | 234 | while(n && (!EEH_CHECK_ALIGN(vsrc, 4) || !EEH_CHECK_ALIGN(dest, 4))) { |
233 | *((u8 *)dest) = *((volatile u8 *)vsrc); | 235 | *((u8 *)dest) = *((volatile u8 *)vsrc); |
234 | __asm__ __volatile__ ("eieio" : : : "memory"); | 236 | __asm__ __volatile__ ("eieio" : : : "memory"); |
@@ -266,6 +268,7 @@ static inline void eeh_memcpy_toio(volatile void __iomem *dest, const void *src, | |||
266 | { | 268 | { |
267 | void *vdest = (void __force *) dest; | 269 | void *vdest = (void __force *) dest; |
268 | 270 | ||
271 | __asm__ __volatile__ ("sync" : : : "memory"); | ||
269 | while(n && (!EEH_CHECK_ALIGN(vdest, 4) || !EEH_CHECK_ALIGN(src, 4))) { | 272 | while(n && (!EEH_CHECK_ALIGN(vdest, 4) || !EEH_CHECK_ALIGN(src, 4))) { |
270 | *((volatile u8 *)vdest) = *((u8 *)src); | 273 | *((volatile u8 *)vdest) = *((u8 *)src); |
271 | src++; | 274 | src++; |
diff --git a/include/asm-powerpc/futex.h b/include/asm-powerpc/futex.h index f1b3c00bc1ce..936422e54891 100644 --- a/include/asm-powerpc/futex.h +++ b/include/asm-powerpc/futex.h | |||
@@ -84,7 +84,33 @@ static inline int futex_atomic_op_inuser (int encoded_op, int __user *uaddr) | |||
84 | static inline int | 84 | static inline int |
85 | futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval) | 85 | futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval) |
86 | { | 86 | { |
87 | return -ENOSYS; | 87 | int prev; |
88 | |||
89 | if (!access_ok(VERIFY_WRITE, uaddr, sizeof(int))) | ||
90 | return -EFAULT; | ||
91 | |||
92 | __asm__ __volatile__ ( | ||
93 | LWSYNC_ON_SMP | ||
94 | "1: lwarx %0,0,%2 # futex_atomic_cmpxchg_inatomic\n\ | ||
95 | cmpw 0,%0,%3\n\ | ||
96 | bne- 3f\n" | ||
97 | PPC405_ERR77(0,%2) | ||
98 | "2: stwcx. %4,0,%2\n\ | ||
99 | bne- 1b\n" | ||
100 | ISYNC_ON_SMP | ||
101 | "3: .section .fixup,\"ax\"\n\ | ||
102 | 4: li %0,%5\n\ | ||
103 | b 3b\n\ | ||
104 | .previous\n\ | ||
105 | .section __ex_table,\"a\"\n\ | ||
106 | .align 3\n\ | ||
107 | " PPC_LONG "1b,4b,2b,4b\n\ | ||
108 | .previous" \ | ||
109 | : "=&r" (prev), "+m" (*uaddr) | ||
110 | : "r" (uaddr), "r" (oldval), "r" (newval), "i" (-EFAULT) | ||
111 | : "cc", "memory"); | ||
112 | |||
113 | return prev; | ||
88 | } | 114 | } |
89 | 115 | ||
90 | #endif /* __KERNEL__ */ | 116 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-powerpc/io.h b/include/asm-powerpc/io.h index 36c4c34bf565..212428db0d8b 100644 --- a/include/asm-powerpc/io.h +++ b/include/asm-powerpc/io.h | |||
@@ -19,6 +19,7 @@ extern int check_legacy_ioport(unsigned long base_port); | |||
19 | #include <linux/compiler.h> | 19 | #include <linux/compiler.h> |
20 | #include <asm/page.h> | 20 | #include <asm/page.h> |
21 | #include <asm/byteorder.h> | 21 | #include <asm/byteorder.h> |
22 | #include <asm/paca.h> | ||
22 | #ifdef CONFIG_PPC_ISERIES | 23 | #ifdef CONFIG_PPC_ISERIES |
23 | #include <asm/iseries/iseries_io.h> | 24 | #include <asm/iseries/iseries_io.h> |
24 | #endif | 25 | #endif |
@@ -162,7 +163,11 @@ extern void _outsw_ns(volatile u16 __iomem *port, const void *buf, int ns); | |||
162 | extern void _insl_ns(volatile u32 __iomem *port, void *buf, int nl); | 163 | extern void _insl_ns(volatile u32 __iomem *port, void *buf, int nl); |
163 | extern void _outsl_ns(volatile u32 __iomem *port, const void *buf, int nl); | 164 | extern void _outsl_ns(volatile u32 __iomem *port, const void *buf, int nl); |
164 | 165 | ||
165 | #define mmiowb() | 166 | static inline void mmiowb(void) |
167 | { | ||
168 | __asm__ __volatile__ ("sync" : : : "memory"); | ||
169 | get_paca()->io_sync = 0; | ||
170 | } | ||
166 | 171 | ||
167 | /* | 172 | /* |
168 | * output pause versions need a delay at least for the | 173 | * output pause versions need a delay at least for the |
@@ -278,22 +283,23 @@ static inline int in_8(const volatile unsigned char __iomem *addr) | |||
278 | { | 283 | { |
279 | int ret; | 284 | int ret; |
280 | 285 | ||
281 | __asm__ __volatile__("lbz%U1%X1 %0,%1; twi 0,%0,0; isync" | 286 | __asm__ __volatile__("sync; lbz%U1%X1 %0,%1; twi 0,%0,0; isync" |
282 | : "=r" (ret) : "m" (*addr)); | 287 | : "=r" (ret) : "m" (*addr)); |
283 | return ret; | 288 | return ret; |
284 | } | 289 | } |
285 | 290 | ||
286 | static inline void out_8(volatile unsigned char __iomem *addr, int val) | 291 | static inline void out_8(volatile unsigned char __iomem *addr, int val) |
287 | { | 292 | { |
288 | __asm__ __volatile__("stb%U0%X0 %1,%0; sync" | 293 | __asm__ __volatile__("sync; stb%U0%X0 %1,%0" |
289 | : "=m" (*addr) : "r" (val)); | 294 | : "=m" (*addr) : "r" (val)); |
295 | get_paca()->io_sync = 1; | ||
290 | } | 296 | } |
291 | 297 | ||
292 | static inline int in_le16(const volatile unsigned short __iomem *addr) | 298 | static inline int in_le16(const volatile unsigned short __iomem *addr) |
293 | { | 299 | { |
294 | int ret; | 300 | int ret; |
295 | 301 | ||
296 | __asm__ __volatile__("lhbrx %0,0,%1; twi 0,%0,0; isync" | 302 | __asm__ __volatile__("sync; lhbrx %0,0,%1; twi 0,%0,0; isync" |
297 | : "=r" (ret) : "r" (addr), "m" (*addr)); | 303 | : "=r" (ret) : "r" (addr), "m" (*addr)); |
298 | return ret; | 304 | return ret; |
299 | } | 305 | } |
@@ -302,28 +308,30 @@ static inline int in_be16(const volatile unsigned short __iomem *addr) | |||
302 | { | 308 | { |
303 | int ret; | 309 | int ret; |
304 | 310 | ||
305 | __asm__ __volatile__("lhz%U1%X1 %0,%1; twi 0,%0,0; isync" | 311 | __asm__ __volatile__("sync; lhz%U1%X1 %0,%1; twi 0,%0,0; isync" |
306 | : "=r" (ret) : "m" (*addr)); | 312 | : "=r" (ret) : "m" (*addr)); |
307 | return ret; | 313 | return ret; |
308 | } | 314 | } |
309 | 315 | ||
310 | static inline void out_le16(volatile unsigned short __iomem *addr, int val) | 316 | static inline void out_le16(volatile unsigned short __iomem *addr, int val) |
311 | { | 317 | { |
312 | __asm__ __volatile__("sthbrx %1,0,%2; sync" | 318 | __asm__ __volatile__("sync; sthbrx %1,0,%2" |
313 | : "=m" (*addr) : "r" (val), "r" (addr)); | 319 | : "=m" (*addr) : "r" (val), "r" (addr)); |
320 | get_paca()->io_sync = 1; | ||
314 | } | 321 | } |
315 | 322 | ||
316 | static inline void out_be16(volatile unsigned short __iomem *addr, int val) | 323 | static inline void out_be16(volatile unsigned short __iomem *addr, int val) |
317 | { | 324 | { |
318 | __asm__ __volatile__("sth%U0%X0 %1,%0; sync" | 325 | __asm__ __volatile__("sync; sth%U0%X0 %1,%0" |
319 | : "=m" (*addr) : "r" (val)); | 326 | : "=m" (*addr) : "r" (val)); |
327 | get_paca()->io_sync = 1; | ||
320 | } | 328 | } |
321 | 329 | ||
322 | static inline unsigned in_le32(const volatile unsigned __iomem *addr) | 330 | static inline unsigned in_le32(const volatile unsigned __iomem *addr) |
323 | { | 331 | { |
324 | unsigned ret; | 332 | unsigned ret; |
325 | 333 | ||
326 | __asm__ __volatile__("lwbrx %0,0,%1; twi 0,%0,0; isync" | 334 | __asm__ __volatile__("sync; lwbrx %0,0,%1; twi 0,%0,0; isync" |
327 | : "=r" (ret) : "r" (addr), "m" (*addr)); | 335 | : "=r" (ret) : "r" (addr), "m" (*addr)); |
328 | return ret; | 336 | return ret; |
329 | } | 337 | } |
@@ -332,21 +340,23 @@ static inline unsigned in_be32(const volatile unsigned __iomem *addr) | |||
332 | { | 340 | { |
333 | unsigned ret; | 341 | unsigned ret; |
334 | 342 | ||
335 | __asm__ __volatile__("lwz%U1%X1 %0,%1; twi 0,%0,0; isync" | 343 | __asm__ __volatile__("sync; lwz%U1%X1 %0,%1; twi 0,%0,0; isync" |
336 | : "=r" (ret) : "m" (*addr)); | 344 | : "=r" (ret) : "m" (*addr)); |
337 | return ret; | 345 | return ret; |
338 | } | 346 | } |
339 | 347 | ||
340 | static inline void out_le32(volatile unsigned __iomem *addr, int val) | 348 | static inline void out_le32(volatile unsigned __iomem *addr, int val) |
341 | { | 349 | { |
342 | __asm__ __volatile__("stwbrx %1,0,%2; sync" : "=m" (*addr) | 350 | __asm__ __volatile__("sync; stwbrx %1,0,%2" : "=m" (*addr) |
343 | : "r" (val), "r" (addr)); | 351 | : "r" (val), "r" (addr)); |
352 | get_paca()->io_sync = 1; | ||
344 | } | 353 | } |
345 | 354 | ||
346 | static inline void out_be32(volatile unsigned __iomem *addr, int val) | 355 | static inline void out_be32(volatile unsigned __iomem *addr, int val) |
347 | { | 356 | { |
348 | __asm__ __volatile__("stw%U0%X0 %1,%0; sync" | 357 | __asm__ __volatile__("sync; stw%U0%X0 %1,%0" |
349 | : "=m" (*addr) : "r" (val)); | 358 | : "=m" (*addr) : "r" (val)); |
359 | get_paca()->io_sync = 1; | ||
350 | } | 360 | } |
351 | 361 | ||
352 | static inline unsigned long in_le64(const volatile unsigned long __iomem *addr) | 362 | static inline unsigned long in_le64(const volatile unsigned long __iomem *addr) |
@@ -354,6 +364,7 @@ static inline unsigned long in_le64(const volatile unsigned long __iomem *addr) | |||
354 | unsigned long tmp, ret; | 364 | unsigned long tmp, ret; |
355 | 365 | ||
356 | __asm__ __volatile__( | 366 | __asm__ __volatile__( |
367 | "sync\n" | ||
357 | "ld %1,0(%2)\n" | 368 | "ld %1,0(%2)\n" |
358 | "twi 0,%1,0\n" | 369 | "twi 0,%1,0\n" |
359 | "isync\n" | 370 | "isync\n" |
@@ -372,7 +383,7 @@ static inline unsigned long in_be64(const volatile unsigned long __iomem *addr) | |||
372 | { | 383 | { |
373 | unsigned long ret; | 384 | unsigned long ret; |
374 | 385 | ||
375 | __asm__ __volatile__("ld%U1%X1 %0,%1; twi 0,%0,0; isync" | 386 | __asm__ __volatile__("sync; ld%U1%X1 %0,%1; twi 0,%0,0; isync" |
376 | : "=r" (ret) : "m" (*addr)); | 387 | : "=r" (ret) : "m" (*addr)); |
377 | return ret; | 388 | return ret; |
378 | } | 389 | } |
@@ -389,14 +400,16 @@ static inline void out_le64(volatile unsigned long __iomem *addr, unsigned long | |||
389 | "rldicl %1,%1,32,0\n" | 400 | "rldicl %1,%1,32,0\n" |
390 | "rlwimi %0,%1,8,8,31\n" | 401 | "rlwimi %0,%1,8,8,31\n" |
391 | "rlwimi %0,%1,24,16,23\n" | 402 | "rlwimi %0,%1,24,16,23\n" |
392 | "std %0,0(%3)\n" | 403 | "sync\n" |
393 | "sync" | 404 | "std %0,0(%3)" |
394 | : "=&r" (tmp) , "=&r" (val) : "1" (val) , "b" (addr) , "m" (*addr)); | 405 | : "=&r" (tmp) , "=&r" (val) : "1" (val) , "b" (addr) , "m" (*addr)); |
406 | get_paca()->io_sync = 1; | ||
395 | } | 407 | } |
396 | 408 | ||
397 | static inline void out_be64(volatile unsigned long __iomem *addr, unsigned long val) | 409 | static inline void out_be64(volatile unsigned long __iomem *addr, unsigned long val) |
398 | { | 410 | { |
399 | __asm__ __volatile__("std%U0%X0 %1,%0; sync" : "=m" (*addr) : "r" (val)); | 411 | __asm__ __volatile__("sync; std%U0%X0 %1,%0" : "=m" (*addr) : "r" (val)); |
412 | get_paca()->io_sync = 1; | ||
400 | } | 413 | } |
401 | 414 | ||
402 | #ifndef CONFIG_PPC_ISERIES | 415 | #ifndef CONFIG_PPC_ISERIES |
diff --git a/include/asm-powerpc/kdump.h b/include/asm-powerpc/kdump.h index dc1574c945f8..10e8eb1e6f4f 100644 --- a/include/asm-powerpc/kdump.h +++ b/include/asm-powerpc/kdump.h | |||
@@ -7,7 +7,7 @@ | |||
7 | /* How many bytes to reserve at zero for kdump. The reserve limit should | 7 | /* How many bytes to reserve at zero for kdump. The reserve limit should |
8 | * be greater or equal to the trampoline's end address. | 8 | * be greater or equal to the trampoline's end address. |
9 | * Reserve to the end of the FWNMI area, see head_64.S */ | 9 | * Reserve to the end of the FWNMI area, see head_64.S */ |
10 | #define KDUMP_RESERVE_LIMIT 0x8000 | 10 | #define KDUMP_RESERVE_LIMIT 0x10000 /* 64K */ |
11 | 11 | ||
12 | #ifdef CONFIG_CRASH_DUMP | 12 | #ifdef CONFIG_CRASH_DUMP |
13 | 13 | ||
diff --git a/include/asm-powerpc/paca.h b/include/asm-powerpc/paca.h index 2d4585f06209..3d5d590bc4b0 100644 --- a/include/asm-powerpc/paca.h +++ b/include/asm-powerpc/paca.h | |||
@@ -93,6 +93,7 @@ struct paca_struct { | |||
93 | u64 saved_r1; /* r1 save for RTAS calls */ | 93 | u64 saved_r1; /* r1 save for RTAS calls */ |
94 | u64 saved_msr; /* MSR saved here by enter_rtas */ | 94 | u64 saved_msr; /* MSR saved here by enter_rtas */ |
95 | u8 proc_enabled; /* irq soft-enable flag */ | 95 | u8 proc_enabled; /* irq soft-enable flag */ |
96 | u8 io_sync; /* writel() needs spin_unlock sync */ | ||
96 | 97 | ||
97 | /* Stuff for accurate time accounting */ | 98 | /* Stuff for accurate time accounting */ |
98 | u64 user_time; /* accumulated usermode TB ticks */ | 99 | u64 user_time; /* accumulated usermode TB ticks */ |
diff --git a/include/asm-powerpc/spinlock.h b/include/asm-powerpc/spinlock.h index 895cb6d3a42a..c31e4382a775 100644 --- a/include/asm-powerpc/spinlock.h +++ b/include/asm-powerpc/spinlock.h | |||
@@ -36,6 +36,19 @@ | |||
36 | #define LOCK_TOKEN 1 | 36 | #define LOCK_TOKEN 1 |
37 | #endif | 37 | #endif |
38 | 38 | ||
39 | #if defined(CONFIG_PPC64) && defined(CONFIG_SMP) | ||
40 | #define CLEAR_IO_SYNC (get_paca()->io_sync = 0) | ||
41 | #define SYNC_IO do { \ | ||
42 | if (unlikely(get_paca()->io_sync)) { \ | ||
43 | mb(); \ | ||
44 | get_paca()->io_sync = 0; \ | ||
45 | } \ | ||
46 | } while (0) | ||
47 | #else | ||
48 | #define CLEAR_IO_SYNC | ||
49 | #define SYNC_IO | ||
50 | #endif | ||
51 | |||
39 | /* | 52 | /* |
40 | * This returns the old value in the lock, so we succeeded | 53 | * This returns the old value in the lock, so we succeeded |
41 | * in getting the lock if the return value is 0. | 54 | * in getting the lock if the return value is 0. |
@@ -61,6 +74,7 @@ static __inline__ unsigned long __spin_trylock(raw_spinlock_t *lock) | |||
61 | 74 | ||
62 | static int __inline__ __raw_spin_trylock(raw_spinlock_t *lock) | 75 | static int __inline__ __raw_spin_trylock(raw_spinlock_t *lock) |
63 | { | 76 | { |
77 | CLEAR_IO_SYNC; | ||
64 | return __spin_trylock(lock) == 0; | 78 | return __spin_trylock(lock) == 0; |
65 | } | 79 | } |
66 | 80 | ||
@@ -91,6 +105,7 @@ extern void __rw_yield(raw_rwlock_t *lock); | |||
91 | 105 | ||
92 | static void __inline__ __raw_spin_lock(raw_spinlock_t *lock) | 106 | static void __inline__ __raw_spin_lock(raw_spinlock_t *lock) |
93 | { | 107 | { |
108 | CLEAR_IO_SYNC; | ||
94 | while (1) { | 109 | while (1) { |
95 | if (likely(__spin_trylock(lock) == 0)) | 110 | if (likely(__spin_trylock(lock) == 0)) |
96 | break; | 111 | break; |
@@ -107,6 +122,7 @@ static void __inline__ __raw_spin_lock_flags(raw_spinlock_t *lock, unsigned long | |||
107 | { | 122 | { |
108 | unsigned long flags_dis; | 123 | unsigned long flags_dis; |
109 | 124 | ||
125 | CLEAR_IO_SYNC; | ||
110 | while (1) { | 126 | while (1) { |
111 | if (likely(__spin_trylock(lock) == 0)) | 127 | if (likely(__spin_trylock(lock) == 0)) |
112 | break; | 128 | break; |
@@ -124,6 +140,7 @@ static void __inline__ __raw_spin_lock_flags(raw_spinlock_t *lock, unsigned long | |||
124 | 140 | ||
125 | static __inline__ void __raw_spin_unlock(raw_spinlock_t *lock) | 141 | static __inline__ void __raw_spin_unlock(raw_spinlock_t *lock) |
126 | { | 142 | { |
143 | SYNC_IO; | ||
127 | __asm__ __volatile__("# __raw_spin_unlock\n\t" | 144 | __asm__ __volatile__("# __raw_spin_unlock\n\t" |
128 | LWSYNC_ON_SMP: : :"memory"); | 145 | LWSYNC_ON_SMP: : :"memory"); |
129 | lock->slock = 0; | 146 | lock->slock = 0; |
diff --git a/include/asm-ppc/io.h b/include/asm-ppc/io.h index 89c6f1bc3aab..680555be22ec 100644 --- a/include/asm-ppc/io.h +++ b/include/asm-ppc/io.h | |||
@@ -63,7 +63,7 @@ extern inline int in_8(const volatile unsigned char __iomem *addr) | |||
63 | int ret; | 63 | int ret; |
64 | 64 | ||
65 | __asm__ __volatile__( | 65 | __asm__ __volatile__( |
66 | "lbz%U1%X1 %0,%1;\n" | 66 | "sync; lbz%U1%X1 %0,%1;\n" |
67 | "twi 0,%0,0;\n" | 67 | "twi 0,%0,0;\n" |
68 | "isync" : "=r" (ret) : "m" (*addr)); | 68 | "isync" : "=r" (ret) : "m" (*addr)); |
69 | return ret; | 69 | return ret; |
@@ -78,7 +78,7 @@ extern inline int in_le16(const volatile unsigned short __iomem *addr) | |||
78 | { | 78 | { |
79 | int ret; | 79 | int ret; |
80 | 80 | ||
81 | __asm__ __volatile__("lhbrx %0,0,%1;\n" | 81 | __asm__ __volatile__("sync; lhbrx %0,0,%1;\n" |
82 | "twi 0,%0,0;\n" | 82 | "twi 0,%0,0;\n" |
83 | "isync" : "=r" (ret) : | 83 | "isync" : "=r" (ret) : |
84 | "r" (addr), "m" (*addr)); | 84 | "r" (addr), "m" (*addr)); |
@@ -89,7 +89,7 @@ extern inline int in_be16(const volatile unsigned short __iomem *addr) | |||
89 | { | 89 | { |
90 | int ret; | 90 | int ret; |
91 | 91 | ||
92 | __asm__ __volatile__("lhz%U1%X1 %0,%1;\n" | 92 | __asm__ __volatile__("sync; lhz%U1%X1 %0,%1;\n" |
93 | "twi 0,%0,0;\n" | 93 | "twi 0,%0,0;\n" |
94 | "isync" : "=r" (ret) : "m" (*addr)); | 94 | "isync" : "=r" (ret) : "m" (*addr)); |
95 | return ret; | 95 | return ret; |
@@ -97,20 +97,20 @@ extern inline int in_be16(const volatile unsigned short __iomem *addr) | |||
97 | 97 | ||
98 | extern inline void out_le16(volatile unsigned short __iomem *addr, int val) | 98 | extern inline void out_le16(volatile unsigned short __iomem *addr, int val) |
99 | { | 99 | { |
100 | __asm__ __volatile__("sthbrx %1,0,%2; eieio" : "=m" (*addr) : | 100 | __asm__ __volatile__("sync; sthbrx %1,0,%2" : "=m" (*addr) : |
101 | "r" (val), "r" (addr)); | 101 | "r" (val), "r" (addr)); |
102 | } | 102 | } |
103 | 103 | ||
104 | extern inline void out_be16(volatile unsigned short __iomem *addr, int val) | 104 | extern inline void out_be16(volatile unsigned short __iomem *addr, int val) |
105 | { | 105 | { |
106 | __asm__ __volatile__("sth%U0%X0 %1,%0; eieio" : "=m" (*addr) : "r" (val)); | 106 | __asm__ __volatile__("sync; sth%U0%X0 %1,%0" : "=m" (*addr) : "r" (val)); |
107 | } | 107 | } |
108 | 108 | ||
109 | extern inline unsigned in_le32(const volatile unsigned __iomem *addr) | 109 | extern inline unsigned in_le32(const volatile unsigned __iomem *addr) |
110 | { | 110 | { |
111 | unsigned ret; | 111 | unsigned ret; |
112 | 112 | ||
113 | __asm__ __volatile__("lwbrx %0,0,%1;\n" | 113 | __asm__ __volatile__("sync; lwbrx %0,0,%1;\n" |
114 | "twi 0,%0,0;\n" | 114 | "twi 0,%0,0;\n" |
115 | "isync" : "=r" (ret) : | 115 | "isync" : "=r" (ret) : |
116 | "r" (addr), "m" (*addr)); | 116 | "r" (addr), "m" (*addr)); |
@@ -121,7 +121,7 @@ extern inline unsigned in_be32(const volatile unsigned __iomem *addr) | |||
121 | { | 121 | { |
122 | unsigned ret; | 122 | unsigned ret; |
123 | 123 | ||
124 | __asm__ __volatile__("lwz%U1%X1 %0,%1;\n" | 124 | __asm__ __volatile__("sync; lwz%U1%X1 %0,%1;\n" |
125 | "twi 0,%0,0;\n" | 125 | "twi 0,%0,0;\n" |
126 | "isync" : "=r" (ret) : "m" (*addr)); | 126 | "isync" : "=r" (ret) : "m" (*addr)); |
127 | return ret; | 127 | return ret; |
@@ -129,13 +129,13 @@ extern inline unsigned in_be32(const volatile unsigned __iomem *addr) | |||
129 | 129 | ||
130 | extern inline void out_le32(volatile unsigned __iomem *addr, int val) | 130 | extern inline void out_le32(volatile unsigned __iomem *addr, int val) |
131 | { | 131 | { |
132 | __asm__ __volatile__("stwbrx %1,0,%2; eieio" : "=m" (*addr) : | 132 | __asm__ __volatile__("sync; stwbrx %1,0,%2" : "=m" (*addr) : |
133 | "r" (val), "r" (addr)); | 133 | "r" (val), "r" (addr)); |
134 | } | 134 | } |
135 | 135 | ||
136 | extern inline void out_be32(volatile unsigned __iomem *addr, int val) | 136 | extern inline void out_be32(volatile unsigned __iomem *addr, int val) |
137 | { | 137 | { |
138 | __asm__ __volatile__("stw%U0%X0 %1,%0; eieio" : "=m" (*addr) : "r" (val)); | 138 | __asm__ __volatile__("sync; stw%U0%X0 %1,%0" : "=m" (*addr) : "r" (val)); |
139 | } | 139 | } |
140 | #if defined (CONFIG_8260_PCI9) | 140 | #if defined (CONFIG_8260_PCI9) |
141 | #define readb(addr) in_8((volatile u8 *)(addr)) | 141 | #define readb(addr) in_8((volatile u8 *)(addr)) |
@@ -259,6 +259,7 @@ extern __inline__ unsigned int name(unsigned int port) \ | |||
259 | { \ | 259 | { \ |
260 | unsigned int x; \ | 260 | unsigned int x; \ |
261 | __asm__ __volatile__( \ | 261 | __asm__ __volatile__( \ |
262 | "sync\n" \ | ||
262 | "0:" op " %0,0,%1\n" \ | 263 | "0:" op " %0,0,%1\n" \ |
263 | "1: twi 0,%0,0\n" \ | 264 | "1: twi 0,%0,0\n" \ |
264 | "2: isync\n" \ | 265 | "2: isync\n" \ |
@@ -284,6 +285,7 @@ extern __inline__ unsigned int name(unsigned int port) \ | |||
284 | extern __inline__ void name(unsigned int val, unsigned int port) \ | 285 | extern __inline__ void name(unsigned int val, unsigned int port) \ |
285 | { \ | 286 | { \ |
286 | __asm__ __volatile__( \ | 287 | __asm__ __volatile__( \ |
288 | "sync\n" \ | ||
287 | "0:" op " %0,0,%1\n" \ | 289 | "0:" op " %0,0,%1\n" \ |
288 | "1: sync\n" \ | 290 | "1: sync\n" \ |
289 | "2:\n" \ | 291 | "2:\n" \ |
diff --git a/include/asm-s390/debug.h b/include/asm-s390/debug.h index 7f1ef99fd1e1..c00dd2b3dc50 100644 --- a/include/asm-s390/debug.h +++ b/include/asm-s390/debug.h | |||
@@ -10,7 +10,6 @@ | |||
10 | #define DEBUG_H | 10 | #define DEBUG_H |
11 | 11 | ||
12 | #include <linux/fs.h> | 12 | #include <linux/fs.h> |
13 | #include <linux/string.h> | ||
14 | 13 | ||
15 | /* Note: | 14 | /* Note: |
16 | * struct __debug_entry must be defined outside of #ifdef __KERNEL__ | 15 | * struct __debug_entry must be defined outside of #ifdef __KERNEL__ |
@@ -35,6 +34,7 @@ struct __debug_entry{ | |||
35 | #define __DEBUG_FEATURE_VERSION 2 /* version of debug feature */ | 34 | #define __DEBUG_FEATURE_VERSION 2 /* version of debug feature */ |
36 | 35 | ||
37 | #ifdef __KERNEL__ | 36 | #ifdef __KERNEL__ |
37 | #include <linux/string.h> | ||
38 | #include <linux/spinlock.h> | 38 | #include <linux/spinlock.h> |
39 | #include <linux/kernel.h> | 39 | #include <linux/kernel.h> |
40 | #include <linux/time.h> | 40 | #include <linux/time.h> |
diff --git a/include/asm-s390/elf.h b/include/asm-s390/elf.h index 710646e64f7d..c0d629d61d3e 100644 --- a/include/asm-s390/elf.h +++ b/include/asm-s390/elf.h | |||
@@ -93,19 +93,6 @@ | |||
93 | #define R_390_NUM 61 | 93 | #define R_390_NUM 61 |
94 | 94 | ||
95 | /* | 95 | /* |
96 | * ELF register definitions.. | ||
97 | */ | ||
98 | |||
99 | #include <linux/sched.h> /* for task_struct */ | ||
100 | #include <asm/ptrace.h> | ||
101 | #include <asm/user.h> | ||
102 | #include <asm/system.h> /* for save_access_regs */ | ||
103 | |||
104 | |||
105 | typedef s390_fp_regs elf_fpregset_t; | ||
106 | typedef s390_regs elf_gregset_t; | ||
107 | |||
108 | /* | ||
109 | * These are used to set parameters in the core dumps. | 96 | * These are used to set parameters in the core dumps. |
110 | */ | 97 | */ |
111 | #ifndef __s390x__ | 98 | #ifndef __s390x__ |
@@ -117,6 +104,20 @@ typedef s390_regs elf_gregset_t; | |||
117 | #define ELF_ARCH EM_S390 | 104 | #define ELF_ARCH EM_S390 |
118 | 105 | ||
119 | /* | 106 | /* |
107 | * ELF register definitions.. | ||
108 | */ | ||
109 | |||
110 | #include <asm/ptrace.h> | ||
111 | #include <asm/user.h> | ||
112 | |||
113 | typedef s390_fp_regs elf_fpregset_t; | ||
114 | typedef s390_regs elf_gregset_t; | ||
115 | |||
116 | #ifdef __KERNEL__ | ||
117 | #include <linux/sched.h> /* for task_struct */ | ||
118 | #include <asm/system.h> /* for save_access_regs */ | ||
119 | |||
120 | /* | ||
120 | * This is used to ensure we don't load something for the wrong architecture. | 121 | * This is used to ensure we don't load something for the wrong architecture. |
121 | */ | 122 | */ |
122 | #define elf_check_arch(x) \ | 123 | #define elf_check_arch(x) \ |
@@ -198,7 +199,6 @@ static inline int dump_task_fpu(struct task_struct *tsk, elf_fpregset_t *fpregs) | |||
198 | 199 | ||
199 | #define ELF_PLATFORM (NULL) | 200 | #define ELF_PLATFORM (NULL) |
200 | 201 | ||
201 | #ifdef __KERNEL__ | ||
202 | #ifndef __s390x__ | 202 | #ifndef __s390x__ |
203 | #define SET_PERSONALITY(ex, ibcs2) set_personality((ibcs2)?PER_SVR4:PER_LINUX) | 203 | #define SET_PERSONALITY(ex, ibcs2) set_personality((ibcs2)?PER_SVR4:PER_LINUX) |
204 | #else /* __s390x__ */ | 204 | #else /* __s390x__ */ |
diff --git a/include/asm-x86_64/elf.h b/include/asm-x86_64/elf.h index b4f8f4a41a6e..a406fcb1e924 100644 --- a/include/asm-x86_64/elf.h +++ b/include/asm-x86_64/elf.h | |||
@@ -7,8 +7,6 @@ | |||
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/compat.h> | ||
12 | 10 | ||
13 | /* x86-64 relocation types */ | 11 | /* x86-64 relocation types */ |
14 | #define R_X86_64_NONE 0 /* No reloc */ | 12 | #define R_X86_64_NONE 0 /* No reloc */ |
@@ -39,18 +37,23 @@ typedef elf_greg_t elf_gregset_t[ELF_NGREG]; | |||
39 | typedef struct user_i387_struct elf_fpregset_t; | 37 | typedef struct user_i387_struct elf_fpregset_t; |
40 | 38 | ||
41 | /* | 39 | /* |
42 | * This is used to ensure we don't load something for the wrong architecture. | ||
43 | */ | ||
44 | #define elf_check_arch(x) \ | ||
45 | ((x)->e_machine == EM_X86_64) | ||
46 | |||
47 | /* | ||
48 | * These are used to set parameters in the core dumps. | 40 | * These are used to set parameters in the core dumps. |
49 | */ | 41 | */ |
50 | #define ELF_CLASS ELFCLASS64 | 42 | #define ELF_CLASS ELFCLASS64 |
51 | #define ELF_DATA ELFDATA2LSB | 43 | #define ELF_DATA ELFDATA2LSB |
52 | #define ELF_ARCH EM_X86_64 | 44 | #define ELF_ARCH EM_X86_64 |
53 | 45 | ||
46 | #ifdef __KERNEL__ | ||
47 | #include <asm/processor.h> | ||
48 | #include <asm/compat.h> | ||
49 | |||
50 | /* | ||
51 | * This is used to ensure we don't load something for the wrong architecture. | ||
52 | */ | ||
53 | #define elf_check_arch(x) \ | ||
54 | ((x)->e_machine == EM_X86_64) | ||
55 | |||
56 | |||
54 | /* SVR4/i386 ABI (pages 3-31, 3-32) says that when the program starts %edx | 57 | /* SVR4/i386 ABI (pages 3-31, 3-32) says that when the program starts %edx |
55 | contains a pointer to a function which might be registered using `atexit'. | 58 | contains a pointer to a function which might be registered using `atexit'. |
56 | This provides a mean for the dynamic linker to call DT_FINI functions for | 59 | This provides a mean for the dynamic linker to call DT_FINI functions for |
@@ -141,7 +144,6 @@ typedef struct user_i387_struct elf_fpregset_t; | |||
141 | /* I'm not sure if we can use '-' here */ | 144 | /* I'm not sure if we can use '-' here */ |
142 | #define ELF_PLATFORM ("x86_64") | 145 | #define ELF_PLATFORM ("x86_64") |
143 | 146 | ||
144 | #ifdef __KERNEL__ | ||
145 | extern void set_personality_64bit(void); | 147 | extern void set_personality_64bit(void); |
146 | #define SET_PERSONALITY(ex, ibcs2) set_personality_64bit() | 148 | #define SET_PERSONALITY(ex, ibcs2) set_personality_64bit() |
147 | /* | 149 | /* |
diff --git a/include/asm-x86_64/signal.h b/include/asm-x86_64/signal.h index cef7a7d51b7e..3ede2a61973a 100644 --- a/include/asm-x86_64/signal.h +++ b/include/asm-x86_64/signal.h | |||
@@ -3,13 +3,13 @@ | |||
3 | 3 | ||
4 | #ifndef __ASSEMBLY__ | 4 | #ifndef __ASSEMBLY__ |
5 | #include <linux/types.h> | 5 | #include <linux/types.h> |
6 | #include <linux/linkage.h> | ||
7 | #include <linux/time.h> | 6 | #include <linux/time.h> |
8 | 7 | ||
9 | /* Avoid too many header ordering problems. */ | 8 | /* Avoid too many header ordering problems. */ |
10 | struct siginfo; | 9 | struct siginfo; |
11 | 10 | ||
12 | #ifdef __KERNEL__ | 11 | #ifdef __KERNEL__ |
12 | #include <linux/linkage.h> | ||
13 | /* Most things should be clean enough to redefine this at will, if care | 13 | /* Most things should be clean enough to redefine this at will, if care |
14 | is taken to make libc match. */ | 14 | is taken to make libc match. */ |
15 | 15 | ||
diff --git a/include/asm-x86_64/unistd.h b/include/asm-x86_64/unistd.h index 2d89d309a2a8..80fd48e84bbb 100644 --- a/include/asm-x86_64/unistd.h +++ b/include/asm-x86_64/unistd.h | |||
@@ -620,6 +620,8 @@ __SYSCALL(__NR_vmsplice, sys_vmsplice) | |||
620 | #define __NR_move_pages 279 | 620 | #define __NR_move_pages 279 |
621 | __SYSCALL(__NR_move_pages, sys_move_pages) | 621 | __SYSCALL(__NR_move_pages, sys_move_pages) |
622 | 622 | ||
623 | #ifdef __KERNEL__ | ||
624 | |||
623 | #define __NR_syscall_max __NR_move_pages | 625 | #define __NR_syscall_max __NR_move_pages |
624 | 626 | ||
625 | #ifndef __NO_STUBS | 627 | #ifndef __NO_STUBS |
@@ -744,8 +746,6 @@ __syscall_return(type,__res); \ | |||
744 | 746 | ||
745 | #else /* __KERNEL_SYSCALLS__ */ | 747 | #else /* __KERNEL_SYSCALLS__ */ |
746 | 748 | ||
747 | #ifdef __KERNEL__ | ||
748 | |||
749 | #include <linux/syscalls.h> | 749 | #include <linux/syscalls.h> |
750 | #include <asm/ptrace.h> | 750 | #include <asm/ptrace.h> |
751 | 751 | ||
@@ -821,8 +821,6 @@ asmlinkage long sys_fork(struct pt_regs regs); | |||
821 | asmlinkage long sys_vfork(struct pt_regs regs); | 821 | asmlinkage long sys_vfork(struct pt_regs regs); |
822 | asmlinkage long sys_pipe(int *fildes); | 822 | asmlinkage long sys_pipe(int *fildes); |
823 | 823 | ||
824 | #endif /* __KERNEL_SYSCALLS__ */ | ||
825 | |||
826 | #ifndef __ASSEMBLY__ | 824 | #ifndef __ASSEMBLY__ |
827 | 825 | ||
828 | #include <linux/linkage.h> | 826 | #include <linux/linkage.h> |
@@ -838,9 +836,9 @@ asmlinkage long sys_rt_sigaction(int sig, | |||
838 | struct sigaction __user *oact, | 836 | struct sigaction __user *oact, |
839 | size_t sigsetsize); | 837 | size_t sigsetsize); |
840 | 838 | ||
841 | #endif | 839 | #endif /* __ASSEMBLY__ */ |
842 | 840 | ||
843 | #endif | 841 | #endif /* __KERNEL_SYSCALLS__ */ |
844 | 842 | ||
845 | /* | 843 | /* |
846 | * "Conditional" syscalls | 844 | * "Conditional" syscalls |
@@ -850,6 +848,8 @@ asmlinkage long sys_rt_sigaction(int sig, | |||
850 | */ | 848 | */ |
851 | #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") | 849 | #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") |
852 | 850 | ||
853 | #endif | 851 | #endif /* __NO_STUBS */ |
854 | 852 | ||
855 | #endif | 853 | #endif /* __KERNEL__ */ |
854 | |||
855 | #endif /* _ASM_X86_64_UNISTD_H_ */ | ||
diff --git a/include/asm-x86_64/vsyscall.h b/include/asm-x86_64/vsyscall.h index a85e16f56d73..146b24402a5f 100644 --- a/include/asm-x86_64/vsyscall.h +++ b/include/asm-x86_64/vsyscall.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _ASM_X86_64_VSYSCALL_H_ | 1 | #ifndef _ASM_X86_64_VSYSCALL_H_ |
2 | #define _ASM_X86_64_VSYSCALL_H_ | 2 | #define _ASM_X86_64_VSYSCALL_H_ |
3 | 3 | ||
4 | #include <linux/seqlock.h> | ||
5 | |||
6 | enum vsyscall_num { | 4 | enum vsyscall_num { |
7 | __NR_vgettimeofday, | 5 | __NR_vgettimeofday, |
8 | __NR_vtime, | 6 | __NR_vtime, |
@@ -14,6 +12,7 @@ enum vsyscall_num { | |||
14 | #define VSYSCALL_ADDR(vsyscall_nr) (VSYSCALL_START+VSYSCALL_SIZE*(vsyscall_nr)) | 12 | #define VSYSCALL_ADDR(vsyscall_nr) (VSYSCALL_START+VSYSCALL_SIZE*(vsyscall_nr)) |
15 | 13 | ||
16 | #ifdef __KERNEL__ | 14 | #ifdef __KERNEL__ |
15 | #include <linux/seqlock.h> | ||
17 | 16 | ||
18 | #define __section_vxtime __attribute__ ((unused, __section__ (".vxtime"), aligned(16))) | 17 | #define __section_vxtime __attribute__ ((unused, __section__ (".vxtime"), aligned(16))) |
19 | #define __section_wall_jiffies __attribute__ ((unused, __section__ (".wall_jiffies"), aligned(16))) | 18 | #define __section_wall_jiffies __attribute__ ((unused, __section__ (".wall_jiffies"), aligned(16))) |
diff --git a/include/linux/mtd/cfi.h b/include/linux/mtd/cfi.h index 09bfae6938b3..123948b14547 100644 --- a/include/linux/mtd/cfi.h +++ b/include/linux/mtd/cfi.h | |||
@@ -199,6 +199,18 @@ struct cfi_pri_amdstd { | |||
199 | uint8_t TopBottom; | 199 | uint8_t TopBottom; |
200 | } __attribute__((packed)); | 200 | } __attribute__((packed)); |
201 | 201 | ||
202 | /* Vendor-Specific PRI for Atmel chips (command set 0x0002) */ | ||
203 | |||
204 | struct cfi_pri_atmel { | ||
205 | uint8_t pri[3]; | ||
206 | uint8_t MajorVersion; | ||
207 | uint8_t MinorVersion; | ||
208 | uint8_t Features; | ||
209 | uint8_t BottomBoot; | ||
210 | uint8_t BurstMode; | ||
211 | uint8_t PageMode; | ||
212 | } __attribute__((packed)); | ||
213 | |||
202 | struct cfi_pri_query { | 214 | struct cfi_pri_query { |
203 | uint8_t NumFields; | 215 | uint8_t NumFields; |
204 | uint32_t ProtField[1]; /* Not host ordered */ | 216 | uint32_t ProtField[1]; /* Not host ordered */ |
@@ -464,6 +476,7 @@ struct cfi_fixup { | |||
464 | #define CFI_ID_ANY 0xffff | 476 | #define CFI_ID_ANY 0xffff |
465 | 477 | ||
466 | #define CFI_MFR_AMD 0x0001 | 478 | #define CFI_MFR_AMD 0x0001 |
479 | #define CFI_MFR_ATMEL 0x001F | ||
467 | #define CFI_MFR_ST 0x0020 /* STMicroelectronics */ | 480 | #define CFI_MFR_ST 0x0020 /* STMicroelectronics */ |
468 | 481 | ||
469 | void cfi_fixup(struct mtd_info *mtd, struct cfi_fixup* fixups); | 482 | void cfi_fixup(struct mtd_info *mtd, struct cfi_fixup* fixups); |
diff --git a/include/linux/netfilter/Kbuild b/include/linux/netfilter/Kbuild index d06311acd448..1d3a14e2da6e 100644 --- a/include/linux/netfilter/Kbuild +++ b/include/linux/netfilter/Kbuild | |||
@@ -5,7 +5,7 @@ header-y := nf_conntrack_sctp.h nf_conntrack_tuple_common.h \ | |||
5 | xt_helper.h xt_length.h xt_limit.h xt_mac.h xt_mark.h \ | 5 | xt_helper.h xt_length.h xt_limit.h xt_mac.h xt_mark.h \ |
6 | xt_MARK.h xt_multiport.h xt_NFQUEUE.h xt_pkttype.h \ | 6 | xt_MARK.h xt_multiport.h xt_NFQUEUE.h xt_pkttype.h \ |
7 | xt_policy.h xt_realm.h xt_sctp.h xt_state.h xt_string.h \ | 7 | xt_policy.h xt_realm.h xt_sctp.h xt_state.h xt_string.h \ |
8 | xt_tcpmss.h xt_tcpudp.h | 8 | xt_tcpmss.h xt_tcpudp.h xt_SECMARK.h xt_CONNSECMARK.h |
9 | 9 | ||
10 | unifdef-y := nf_conntrack_common.h nf_conntrack_ftp.h \ | 10 | unifdef-y := nf_conntrack_common.h nf_conntrack_ftp.h \ |
11 | nf_conntrack_tcp.h nfnetlink.h x_tables.h xt_physdev.h | 11 | nf_conntrack_tcp.h nfnetlink.h x_tables.h xt_physdev.h |
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 530b1e6173b1..6c2066caeaab 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
@@ -9,27 +9,6 @@ | |||
9 | #ifndef _LINUX_NFS_FS_H | 9 | #ifndef _LINUX_NFS_FS_H |
10 | #define _LINUX_NFS_FS_H | 10 | #define _LINUX_NFS_FS_H |
11 | 11 | ||
12 | #include <linux/in.h> | ||
13 | #include <linux/mm.h> | ||
14 | #include <linux/pagemap.h> | ||
15 | #include <linux/rwsem.h> | ||
16 | #include <linux/wait.h> | ||
17 | |||
18 | #include <linux/sunrpc/debug.h> | ||
19 | #include <linux/sunrpc/auth.h> | ||
20 | #include <linux/sunrpc/clnt.h> | ||
21 | |||
22 | #include <linux/nfs.h> | ||
23 | #include <linux/nfs2.h> | ||
24 | #include <linux/nfs3.h> | ||
25 | #include <linux/nfs4.h> | ||
26 | #include <linux/nfs_xdr.h> | ||
27 | |||
28 | #include <linux/nfs_fs_sb.h> | ||
29 | |||
30 | #include <linux/rwsem.h> | ||
31 | #include <linux/mempool.h> | ||
32 | |||
33 | /* | 12 | /* |
34 | * Enable debugging support for nfs client. | 13 | * Enable debugging support for nfs client. |
35 | * Requires RPC_DEBUG. | 14 | * Requires RPC_DEBUG. |
@@ -48,11 +27,6 @@ | |||
48 | #define NFS_SUPER_MAGIC 0x6969 | 27 | #define NFS_SUPER_MAGIC 0x6969 |
49 | 28 | ||
50 | /* | 29 | /* |
51 | * These are the default flags for swap requests | ||
52 | */ | ||
53 | #define NFS_RPC_SWAPFLAGS (RPC_TASK_SWAPPER|RPC_TASK_ROOTCREDS) | ||
54 | |||
55 | /* | ||
56 | * When flushing a cluster of dirty pages, there can be different | 30 | * When flushing a cluster of dirty pages, there can be different |
57 | * strategies: | 31 | * strategies: |
58 | */ | 32 | */ |
@@ -65,6 +39,32 @@ | |||
65 | 39 | ||
66 | #ifdef __KERNEL__ | 40 | #ifdef __KERNEL__ |
67 | 41 | ||
42 | #include <linux/in.h> | ||
43 | #include <linux/mm.h> | ||
44 | #include <linux/pagemap.h> | ||
45 | #include <linux/rwsem.h> | ||
46 | #include <linux/wait.h> | ||
47 | |||
48 | #include <linux/sunrpc/debug.h> | ||
49 | #include <linux/sunrpc/auth.h> | ||
50 | #include <linux/sunrpc/clnt.h> | ||
51 | |||
52 | #include <linux/nfs.h> | ||
53 | #include <linux/nfs2.h> | ||
54 | #include <linux/nfs3.h> | ||
55 | #include <linux/nfs4.h> | ||
56 | #include <linux/nfs_xdr.h> | ||
57 | |||
58 | #include <linux/nfs_fs_sb.h> | ||
59 | |||
60 | #include <linux/rwsem.h> | ||
61 | #include <linux/mempool.h> | ||
62 | |||
63 | /* | ||
64 | * These are the default flags for swap requests | ||
65 | */ | ||
66 | #define NFS_RPC_SWAPFLAGS (RPC_TASK_SWAPPER|RPC_TASK_ROOTCREDS) | ||
67 | |||
68 | /* | 68 | /* |
69 | * NFSv3/v4 Access mode cache entry | 69 | * NFSv3/v4 Access mode cache entry |
70 | */ | 70 | */ |
diff --git a/include/linux/timex.h b/include/linux/timex.h index 19bb6538b49e..d543d3871e38 100644 --- a/include/linux/timex.h +++ b/include/linux/timex.h | |||
@@ -57,7 +57,6 @@ | |||
57 | #include <linux/time.h> | 57 | #include <linux/time.h> |
58 | 58 | ||
59 | #include <asm/param.h> | 59 | #include <asm/param.h> |
60 | #include <asm/timex.h> | ||
61 | 60 | ||
62 | /* | 61 | /* |
63 | * SHIFT_KG and SHIFT_KF establish the damping of the PLL and are chosen | 62 | * SHIFT_KG and SHIFT_KF establish the damping of the PLL and are chosen |
@@ -191,6 +190,8 @@ struct timex { | |||
191 | #define TIME_BAD TIME_ERROR /* bw compat */ | 190 | #define TIME_BAD TIME_ERROR /* bw compat */ |
192 | 191 | ||
193 | #ifdef __KERNEL__ | 192 | #ifdef __KERNEL__ |
193 | #include <asm/timex.h> | ||
194 | |||
194 | /* | 195 | /* |
195 | * kernel variables | 196 | * kernel variables |
196 | * Note: maximum error = NTP synch distance = dispersion + delay / 2; | 197 | * Note: maximum error = NTP synch distance = dispersion + delay / 2; |