aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2012-03-28 13:11:12 -0400
committerDavid Howells <dhowells@redhat.com>2012-03-28 13:11:12 -0400
commitec2212088c42ff7d1362629ec26dda4f3e8bdad3 (patch)
tree0e99963f6818ef9c07fe8f2fb1f9851ef9641313
parentf05e798ad4c09255f590f5b2c00a7ca6c172f983 (diff)
Disintegrate asm/system.h for Alpha
Disintegrate asm/system.h for Alpha. Signed-off-by: David Howells <dhowells@redhat.com> cc: linux-alpha@vger.kernel.org
-rw-r--r--arch/alpha/boot/bootp.c1
-rw-r--r--arch/alpha/boot/bootpz.c1
-rw-r--r--arch/alpha/boot/head.S1
-rw-r--r--arch/alpha/boot/main.c1
-rw-r--r--arch/alpha/include/asm/atomic.h68
-rw-r--r--arch/alpha/include/asm/auxvec.h2
-rw-r--r--arch/alpha/include/asm/core_lca.h2
-rw-r--r--arch/alpha/include/asm/core_mcpcia.h1
-rw-r--r--arch/alpha/include/asm/core_t2.h1
-rw-r--r--arch/alpha/include/asm/elf.h1
-rw-r--r--arch/alpha/include/asm/exec.h6
-rw-r--r--arch/alpha/include/asm/fpu.h2
-rw-r--r--arch/alpha/include/asm/io.h1
-rw-r--r--arch/alpha/include/asm/irqflags.h2
-rw-r--r--arch/alpha/include/asm/mce.h83
-rw-r--r--arch/alpha/include/asm/mmu_context.h1
-rw-r--r--arch/alpha/include/asm/pal.h112
-rw-r--r--arch/alpha/include/asm/pgtable.h1
-rw-r--r--arch/alpha/include/asm/setup.h36
-rw-r--r--arch/alpha/include/asm/special_insns.h41
-rw-r--r--arch/alpha/include/asm/spinlock.h1
-rw-r--r--arch/alpha/include/asm/switch_to.h14
-rw-r--r--arch/alpha/include/asm/system.h357
-rw-r--r--arch/alpha/include/asm/xchg.h2
-rw-r--r--arch/alpha/kernel/core_apecs.c1
-rw-r--r--arch/alpha/kernel/core_cia.c1
-rw-r--r--arch/alpha/kernel/core_t2.c1
-rw-r--r--arch/alpha/kernel/err_impl.h2
-rw-r--r--arch/alpha/kernel/head.S6
-rw-r--r--arch/alpha/kernel/irq.c1
-rw-r--r--arch/alpha/kernel/irq_alpha.c1
-rw-r--r--arch/alpha/kernel/osf_sys.c1
-rw-r--r--arch/alpha/kernel/process.c1
-rw-r--r--arch/alpha/kernel/ptrace.c1
-rw-r--r--arch/alpha/kernel/setup.c1
-rw-r--r--arch/alpha/kernel/sys_alcor.c1
-rw-r--r--arch/alpha/kernel/sys_cabriolet.c1
-rw-r--r--arch/alpha/kernel/sys_dp264.c1
-rw-r--r--arch/alpha/kernel/sys_eb64p.c1
-rw-r--r--arch/alpha/kernel/sys_eiger.c1
-rw-r--r--arch/alpha/kernel/sys_jensen.c1
-rw-r--r--arch/alpha/kernel/sys_marvel.c1
-rw-r--r--arch/alpha/kernel/sys_miata.c1
-rw-r--r--arch/alpha/kernel/sys_mikasa.c2
-rw-r--r--arch/alpha/kernel/sys_nautilus.c1
-rw-r--r--arch/alpha/kernel/sys_noritake.c2
-rw-r--r--arch/alpha/kernel/sys_rawhide.c1
-rw-r--r--arch/alpha/kernel/sys_ruffian.c1
-rw-r--r--arch/alpha/kernel/sys_rx164.c1
-rw-r--r--arch/alpha/kernel/sys_sable.c1
-rw-r--r--arch/alpha/kernel/sys_sio.c1
-rw-r--r--arch/alpha/kernel/sys_sx164.c2
-rw-r--r--arch/alpha/kernel/sys_takara.c1
-rw-r--r--arch/alpha/kernel/sys_titan.c1
-rw-r--r--arch/alpha/kernel/sys_wildfire.c1
-rw-r--r--arch/alpha/kernel/traps.c1
-rw-r--r--arch/alpha/kernel/vmlinux.lds.S2
-rw-r--r--arch/alpha/lib/stacktrace.c1
-rw-r--r--arch/alpha/mm/fault.c1
-rw-r--r--arch/alpha/mm/init.c2
-rw-r--r--arch/alpha/oprofile/common.c1
-rw-r--r--arch/alpha/oprofile/op_model_ev4.c1
-rw-r--r--arch/alpha/oprofile/op_model_ev5.c1
-rw-r--r--arch/alpha/oprofile/op_model_ev6.c1
-rw-r--r--arch/alpha/oprofile/op_model_ev67.c1
65 files changed, 388 insertions, 402 deletions
diff --git a/arch/alpha/boot/bootp.c b/arch/alpha/boot/bootp.c
index be61670d4096..2a542a506557 100644
--- a/arch/alpha/boot/bootp.c
+++ b/arch/alpha/boot/bootp.c
@@ -13,7 +13,6 @@
13#include <generated/utsrelease.h> 13#include <generated/utsrelease.h>
14#include <linux/mm.h> 14#include <linux/mm.h>
15 15
16#include <asm/system.h>
17#include <asm/console.h> 16#include <asm/console.h>
18#include <asm/hwrpb.h> 17#include <asm/hwrpb.h>
19#include <asm/pgtable.h> 18#include <asm/pgtable.h>
diff --git a/arch/alpha/boot/bootpz.c b/arch/alpha/boot/bootpz.c
index c98865f21423..d6ad191698da 100644
--- a/arch/alpha/boot/bootpz.c
+++ b/arch/alpha/boot/bootpz.c
@@ -15,7 +15,6 @@
15#include <generated/utsrelease.h> 15#include <generated/utsrelease.h>
16#include <linux/mm.h> 16#include <linux/mm.h>
17 17
18#include <asm/system.h>
19#include <asm/console.h> 18#include <asm/console.h>
20#include <asm/hwrpb.h> 19#include <asm/hwrpb.h>
21#include <asm/pgtable.h> 20#include <asm/pgtable.h>
diff --git a/arch/alpha/boot/head.S b/arch/alpha/boot/head.S
index f3d98089b3dc..b06812bcac83 100644
--- a/arch/alpha/boot/head.S
+++ b/arch/alpha/boot/head.S
@@ -4,7 +4,6 @@
4 * initial bootloader stuff.. 4 * initial bootloader stuff..
5 */ 5 */
6 6
7#include <asm/system.h>
8 7
9 .set noreorder 8 .set noreorder
10 .globl __start 9 .globl __start
diff --git a/arch/alpha/boot/main.c b/arch/alpha/boot/main.c
index ded57d9a80e1..3baf2d1e908d 100644
--- a/arch/alpha/boot/main.c
+++ b/arch/alpha/boot/main.c
@@ -11,7 +11,6 @@
11#include <generated/utsrelease.h> 11#include <generated/utsrelease.h>
12#include <linux/mm.h> 12#include <linux/mm.h>
13 13
14#include <asm/system.h>
15#include <asm/console.h> 14#include <asm/console.h>
16#include <asm/hwrpb.h> 15#include <asm/hwrpb.h>
17#include <asm/pgtable.h> 16#include <asm/pgtable.h>
diff --git a/arch/alpha/include/asm/atomic.h b/arch/alpha/include/asm/atomic.h
index 640f909ddd41..f62251e82ffa 100644
--- a/arch/alpha/include/asm/atomic.h
+++ b/arch/alpha/include/asm/atomic.h
@@ -3,7 +3,6 @@
3 3
4#include <linux/types.h> 4#include <linux/types.h>
5#include <asm/barrier.h> 5#include <asm/barrier.h>
6#include <asm/system.h>
7 6
8/* 7/*
9 * Atomic operations that C can't guarantee us. Useful for 8 * Atomic operations that C can't guarantee us. Useful for
@@ -169,6 +168,73 @@ static __inline__ long atomic64_sub_return(long i, atomic64_t * v)
169 return result; 168 return result;
170} 169}
171 170
171/*
172 * Atomic exchange routines.
173 */
174
175#define __ASM__MB
176#define ____xchg(type, args...) __xchg ## type ## _local(args)
177#define ____cmpxchg(type, args...) __cmpxchg ## type ## _local(args)
178#include <asm/xchg.h>
179
180#define xchg_local(ptr,x) \
181 ({ \
182 __typeof__(*(ptr)) _x_ = (x); \
183 (__typeof__(*(ptr))) __xchg_local((ptr), (unsigned long)_x_, \
184 sizeof(*(ptr))); \
185 })
186
187#define cmpxchg_local(ptr, o, n) \
188 ({ \
189 __typeof__(*(ptr)) _o_ = (o); \
190 __typeof__(*(ptr)) _n_ = (n); \
191 (__typeof__(*(ptr))) __cmpxchg_local((ptr), (unsigned long)_o_, \
192 (unsigned long)_n_, \
193 sizeof(*(ptr))); \
194 })
195
196#define cmpxchg64_local(ptr, o, n) \
197 ({ \
198 BUILD_BUG_ON(sizeof(*(ptr)) != 8); \
199 cmpxchg_local((ptr), (o), (n)); \
200 })
201
202#ifdef CONFIG_SMP
203#undef __ASM__MB
204#define __ASM__MB "\tmb\n"
205#endif
206#undef ____xchg
207#undef ____cmpxchg
208#define ____xchg(type, args...) __xchg ##type(args)
209#define ____cmpxchg(type, args...) __cmpxchg ##type(args)
210#include <asm/xchg.h>
211
212#define xchg(ptr,x) \
213 ({ \
214 __typeof__(*(ptr)) _x_ = (x); \
215 (__typeof__(*(ptr))) __xchg((ptr), (unsigned long)_x_, \
216 sizeof(*(ptr))); \
217 })
218
219#define cmpxchg(ptr, o, n) \
220 ({ \
221 __typeof__(*(ptr)) _o_ = (o); \
222 __typeof__(*(ptr)) _n_ = (n); \
223 (__typeof__(*(ptr))) __cmpxchg((ptr), (unsigned long)_o_, \
224 (unsigned long)_n_, sizeof(*(ptr)));\
225 })
226
227#define cmpxchg64(ptr, o, n) \
228 ({ \
229 BUILD_BUG_ON(sizeof(*(ptr)) != 8); \
230 cmpxchg((ptr), (o), (n)); \
231 })
232
233#undef __ASM__MB
234#undef ____cmpxchg
235
236#define __HAVE_ARCH_CMPXCHG 1
237
172#define atomic64_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), old, new)) 238#define atomic64_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), old, new))
173#define atomic64_xchg(v, new) (xchg(&((v)->counter), new)) 239#define atomic64_xchg(v, new) (xchg(&((v)->counter), new))
174 240
diff --git a/arch/alpha/include/asm/auxvec.h b/arch/alpha/include/asm/auxvec.h
index e96fe880e310..a3a579dfdb4d 100644
--- a/arch/alpha/include/asm/auxvec.h
+++ b/arch/alpha/include/asm/auxvec.h
@@ -21,4 +21,6 @@
21#define AT_L2_CACHESHAPE 36 21#define AT_L2_CACHESHAPE 36
22#define AT_L3_CACHESHAPE 37 22#define AT_L3_CACHESHAPE 37
23 23
24#define AT_VECTOR_SIZE_ARCH 4 /* entries in ARCH_DLINFO */
25
24#endif /* __ASM_ALPHA_AUXVEC_H */ 26#endif /* __ASM_ALPHA_AUXVEC_H */
diff --git a/arch/alpha/include/asm/core_lca.h b/arch/alpha/include/asm/core_lca.h
index f7cb4b460954..8ee6c516279c 100644
--- a/arch/alpha/include/asm/core_lca.h
+++ b/arch/alpha/include/asm/core_lca.h
@@ -1,8 +1,8 @@
1#ifndef __ALPHA_LCA__H__ 1#ifndef __ALPHA_LCA__H__
2#define __ALPHA_LCA__H__ 2#define __ALPHA_LCA__H__
3 3
4#include <asm/system.h>
5#include <asm/compiler.h> 4#include <asm/compiler.h>
5#include <asm/mce.h>
6 6
7/* 7/*
8 * Low Cost Alpha (LCA) definitions (these apply to 21066 and 21068, 8 * Low Cost Alpha (LCA) definitions (these apply to 21066 and 21068,
diff --git a/arch/alpha/include/asm/core_mcpcia.h b/arch/alpha/include/asm/core_mcpcia.h
index 9f67a056b461..ad44bef29fba 100644
--- a/arch/alpha/include/asm/core_mcpcia.h
+++ b/arch/alpha/include/asm/core_mcpcia.h
@@ -7,6 +7,7 @@
7 7
8#include <linux/types.h> 8#include <linux/types.h>
9#include <asm/compiler.h> 9#include <asm/compiler.h>
10#include <asm/mce.h>
10 11
11/* 12/*
12 * MCPCIA is the internal name for a core logic chipset which provides 13 * MCPCIA is the internal name for a core logic chipset which provides
diff --git a/arch/alpha/include/asm/core_t2.h b/arch/alpha/include/asm/core_t2.h
index 91b46801b290..ade9d92e68b4 100644
--- a/arch/alpha/include/asm/core_t2.h
+++ b/arch/alpha/include/asm/core_t2.h
@@ -7,7 +7,6 @@
7#include <linux/types.h> 7#include <linux/types.h>
8#include <linux/spinlock.h> 8#include <linux/spinlock.h>
9#include <asm/compiler.h> 9#include <asm/compiler.h>
10#include <asm/system.h>
11 10
12/* 11/*
13 * T2 is the internal name for the core logic chipset which provides 12 * T2 is the internal name for the core logic chipset which provides
diff --git a/arch/alpha/include/asm/elf.h b/arch/alpha/include/asm/elf.h
index da5449e22175..968d9991f5ee 100644
--- a/arch/alpha/include/asm/elf.h
+++ b/arch/alpha/include/asm/elf.h
@@ -2,6 +2,7 @@
2#define __ASM_ALPHA_ELF_H 2#define __ASM_ALPHA_ELF_H
3 3
4#include <asm/auxvec.h> 4#include <asm/auxvec.h>
5#include <asm/special_insns.h>
5 6
6/* Special values for the st_other field in the symbol table. */ 7/* Special values for the st_other field in the symbol table. */
7 8
diff --git a/arch/alpha/include/asm/exec.h b/arch/alpha/include/asm/exec.h
new file mode 100644
index 000000000000..4a5a41f30779
--- /dev/null
+++ b/arch/alpha/include/asm/exec.h
@@ -0,0 +1,6 @@
1#ifndef __ALPHA_EXEC_H
2#define __ALPHA_EXEC_H
3
4#define arch_align_stack(x) (x)
5
6#endif /* __ALPHA_EXEC_H */
diff --git a/arch/alpha/include/asm/fpu.h b/arch/alpha/include/asm/fpu.h
index ecb17a72acc3..db00f7885faa 100644
--- a/arch/alpha/include/asm/fpu.h
+++ b/arch/alpha/include/asm/fpu.h
@@ -1,6 +1,8 @@
1#ifndef __ASM_ALPHA_FPU_H 1#ifndef __ASM_ALPHA_FPU_H
2#define __ASM_ALPHA_FPU_H 2#define __ASM_ALPHA_FPU_H
3 3
4#include <asm/special_insns.h>
5
4/* 6/*
5 * Alpha floating-point control register defines: 7 * Alpha floating-point control register defines:
6 */ 8 */
diff --git a/arch/alpha/include/asm/io.h b/arch/alpha/include/asm/io.h
index 56ff96501350..7a3d38d5ed6b 100644
--- a/arch/alpha/include/asm/io.h
+++ b/arch/alpha/include/asm/io.h
@@ -6,7 +6,6 @@
6#include <linux/kernel.h> 6#include <linux/kernel.h>
7#include <linux/mm.h> 7#include <linux/mm.h>
8#include <asm/compiler.h> 8#include <asm/compiler.h>
9#include <asm/system.h>
10#include <asm/pgtable.h> 9#include <asm/pgtable.h>
11#include <asm/machvec.h> 10#include <asm/machvec.h>
12#include <asm/hwrpb.h> 11#include <asm/hwrpb.h>
diff --git a/arch/alpha/include/asm/irqflags.h b/arch/alpha/include/asm/irqflags.h
index 299bbc7e9d71..ffb1726484af 100644
--- a/arch/alpha/include/asm/irqflags.h
+++ b/arch/alpha/include/asm/irqflags.h
@@ -1,7 +1,7 @@
1#ifndef __ALPHA_IRQFLAGS_H 1#ifndef __ALPHA_IRQFLAGS_H
2#define __ALPHA_IRQFLAGS_H 2#define __ALPHA_IRQFLAGS_H
3 3
4#include <asm/system.h> 4#include <asm/pal.h>
5 5
6#define IPL_MIN 0 6#define IPL_MIN 0
7#define IPL_SW0 1 7#define IPL_SW0 1
diff --git a/arch/alpha/include/asm/mce.h b/arch/alpha/include/asm/mce.h
new file mode 100644
index 000000000000..660285b9aca8
--- /dev/null
+++ b/arch/alpha/include/asm/mce.h
@@ -0,0 +1,83 @@
1#ifndef __ALPHA_MCE_H
2#define __ALPHA_MCE_H
3
4/*
5 * This is the logout header that should be common to all platforms
6 * (assuming they are running OSF/1 PALcode, I guess).
7 */
8struct el_common {
9 unsigned int size; /* size in bytes of logout area */
10 unsigned int sbz1 : 30; /* should be zero */
11 unsigned int err2 : 1; /* second error */
12 unsigned int retry : 1; /* retry flag */
13 unsigned int proc_offset; /* processor-specific offset */
14 unsigned int sys_offset; /* system-specific offset */
15 unsigned int code; /* machine check code */
16 unsigned int frame_rev; /* frame revision */
17};
18
19/* Machine Check Frame for uncorrectable errors (Large format)
20 * --- This is used to log uncorrectable errors such as
21 * double bit ECC errors.
22 * --- These errors are detected by both processor and systems.
23 */
24struct el_common_EV5_uncorrectable_mcheck {
25 unsigned long shadow[8]; /* Shadow reg. 8-14, 25 */
26 unsigned long paltemp[24]; /* PAL TEMP REGS. */
27 unsigned long exc_addr; /* Address of excepting instruction*/
28 unsigned long exc_sum; /* Summary of arithmetic traps. */
29 unsigned long exc_mask; /* Exception mask (from exc_sum). */
30 unsigned long pal_base; /* Base address for PALcode. */
31 unsigned long isr; /* Interrupt Status Reg. */
32 unsigned long icsr; /* CURRENT SETUP OF EV5 IBOX */
33 unsigned long ic_perr_stat; /* I-CACHE Reg. <11> set Data parity
34 <12> set TAG parity*/
35 unsigned long dc_perr_stat; /* D-CACHE error Reg. Bits set to 1:
36 <2> Data error in bank 0
37 <3> Data error in bank 1
38 <4> Tag error in bank 0
39 <5> Tag error in bank 1 */
40 unsigned long va; /* Effective VA of fault or miss. */
41 unsigned long mm_stat; /* Holds the reason for D-stream
42 fault or D-cache parity errors */
43 unsigned long sc_addr; /* Address that was being accessed
44 when EV5 detected Secondary cache
45 failure. */
46 unsigned long sc_stat; /* Helps determine if the error was
47 TAG/Data parity(Secondary Cache)*/
48 unsigned long bc_tag_addr; /* Contents of EV5 BC_TAG_ADDR */
49 unsigned long ei_addr; /* Physical address of any transfer
50 that is logged in EV5 EI_STAT */
51 unsigned long fill_syndrome; /* For correcting ECC errors. */
52 unsigned long ei_stat; /* Helps identify reason of any
53 processor uncorrectable error
54 at its external interface. */
55 unsigned long ld_lock; /* Contents of EV5 LD_LOCK register*/
56};
57
58struct el_common_EV6_mcheck {
59 unsigned int FrameSize; /* Bytes, including this field */
60 unsigned int FrameFlags; /* <31> = Retry, <30> = Second Error */
61 unsigned int CpuOffset; /* Offset to CPU-specific info */
62 unsigned int SystemOffset; /* Offset to system-specific info */
63 unsigned int MCHK_Code;
64 unsigned int MCHK_Frame_Rev;
65 unsigned long I_STAT; /* EV6 Internal Processor Registers */
66 unsigned long DC_STAT; /* (See the 21264 Spec) */
67 unsigned long C_ADDR;
68 unsigned long DC1_SYNDROME;
69 unsigned long DC0_SYNDROME;
70 unsigned long C_STAT;
71 unsigned long C_STS;
72 unsigned long MM_STAT;
73 unsigned long EXC_ADDR;
74 unsigned long IER_CM;
75 unsigned long ISUM;
76 unsigned long RESERVED0;
77 unsigned long PAL_BASE;
78 unsigned long I_CTL;
79 unsigned long PCTX;
80};
81
82
83#endif /* __ALPHA_MCE_H */
diff --git a/arch/alpha/include/asm/mmu_context.h b/arch/alpha/include/asm/mmu_context.h
index 86c08a02d239..4c51c05333c6 100644
--- a/arch/alpha/include/asm/mmu_context.h
+++ b/arch/alpha/include/asm/mmu_context.h
@@ -7,7 +7,6 @@
7 * Copyright (C) 1996, Linus Torvalds 7 * Copyright (C) 1996, Linus Torvalds
8 */ 8 */
9 9
10#include <asm/system.h>
11#include <asm/machvec.h> 10#include <asm/machvec.h>
12#include <asm/compiler.h> 11#include <asm/compiler.h>
13#include <asm-generic/mm_hooks.h> 12#include <asm-generic/mm_hooks.h>
diff --git a/arch/alpha/include/asm/pal.h b/arch/alpha/include/asm/pal.h
index 9b4ba0d6f00b..6699ee583429 100644
--- a/arch/alpha/include/asm/pal.h
+++ b/arch/alpha/include/asm/pal.h
@@ -48,4 +48,116 @@
48#define PAL_retsys 61 48#define PAL_retsys 61
49#define PAL_rti 63 49#define PAL_rti 63
50 50
51#ifdef __KERNEL__
52#ifndef __ASSEMBLY__
53
54extern void halt(void) __attribute__((noreturn));
55#define __halt() __asm__ __volatile__ ("call_pal %0 #halt" : : "i" (PAL_halt))
56
57#define imb() \
58__asm__ __volatile__ ("call_pal %0 #imb" : : "i" (PAL_imb) : "memory")
59
60#define draina() \
61__asm__ __volatile__ ("call_pal %0 #draina" : : "i" (PAL_draina) : "memory")
62
63#define __CALL_PAL_R0(NAME, TYPE) \
64extern inline TYPE NAME(void) \
65{ \
66 register TYPE __r0 __asm__("$0"); \
67 __asm__ __volatile__( \
68 "call_pal %1 # " #NAME \
69 :"=r" (__r0) \
70 :"i" (PAL_ ## NAME) \
71 :"$1", "$16", "$22", "$23", "$24", "$25"); \
72 return __r0; \
73}
74
75#define __CALL_PAL_W1(NAME, TYPE0) \
76extern inline void NAME(TYPE0 arg0) \
77{ \
78 register TYPE0 __r16 __asm__("$16") = arg0; \
79 __asm__ __volatile__( \
80 "call_pal %1 # "#NAME \
81 : "=r"(__r16) \
82 : "i"(PAL_ ## NAME), "0"(__r16) \
83 : "$1", "$22", "$23", "$24", "$25"); \
84}
85
86#define __CALL_PAL_W2(NAME, TYPE0, TYPE1) \
87extern inline void NAME(TYPE0 arg0, TYPE1 arg1) \
88{ \
89 register TYPE0 __r16 __asm__("$16") = arg0; \
90 register TYPE1 __r17 __asm__("$17") = arg1; \
91 __asm__ __volatile__( \
92 "call_pal %2 # "#NAME \
93 : "=r"(__r16), "=r"(__r17) \
94 : "i"(PAL_ ## NAME), "0"(__r16), "1"(__r17) \
95 : "$1", "$22", "$23", "$24", "$25"); \
96}
97
98#define __CALL_PAL_RW1(NAME, RTYPE, TYPE0) \
99extern inline RTYPE NAME(TYPE0 arg0) \
100{ \
101 register RTYPE __r0 __asm__("$0"); \
102 register TYPE0 __r16 __asm__("$16") = arg0; \
103 __asm__ __volatile__( \
104 "call_pal %2 # "#NAME \
105 : "=r"(__r16), "=r"(__r0) \
106 : "i"(PAL_ ## NAME), "0"(__r16) \
107 : "$1", "$22", "$23", "$24", "$25"); \
108 return __r0; \
109}
110
111#define __CALL_PAL_RW2(NAME, RTYPE, TYPE0, TYPE1) \
112extern inline RTYPE NAME(TYPE0 arg0, TYPE1 arg1) \
113{ \
114 register RTYPE __r0 __asm__("$0"); \
115 register TYPE0 __r16 __asm__("$16") = arg0; \
116 register TYPE1 __r17 __asm__("$17") = arg1; \
117 __asm__ __volatile__( \
118 "call_pal %3 # "#NAME \
119 : "=r"(__r16), "=r"(__r17), "=r"(__r0) \
120 : "i"(PAL_ ## NAME), "0"(__r16), "1"(__r17) \
121 : "$1", "$22", "$23", "$24", "$25"); \
122 return __r0; \
123}
124
125__CALL_PAL_W1(cflush, unsigned long);
126__CALL_PAL_R0(rdmces, unsigned long);
127__CALL_PAL_R0(rdps, unsigned long);
128__CALL_PAL_R0(rdusp, unsigned long);
129__CALL_PAL_RW1(swpipl, unsigned long, unsigned long);
130__CALL_PAL_R0(whami, unsigned long);
131__CALL_PAL_W2(wrent, void*, unsigned long);
132__CALL_PAL_W1(wripir, unsigned long);
133__CALL_PAL_W1(wrkgp, unsigned long);
134__CALL_PAL_W1(wrmces, unsigned long);
135__CALL_PAL_RW2(wrperfmon, unsigned long, unsigned long, unsigned long);
136__CALL_PAL_W1(wrusp, unsigned long);
137__CALL_PAL_W1(wrvptptr, unsigned long);
138
139/*
140 * TB routines..
141 */
142#define __tbi(nr,arg,arg1...) \
143({ \
144 register unsigned long __r16 __asm__("$16") = (nr); \
145 register unsigned long __r17 __asm__("$17"); arg; \
146 __asm__ __volatile__( \
147 "call_pal %3 #__tbi" \
148 :"=r" (__r16),"=r" (__r17) \
149 :"0" (__r16),"i" (PAL_tbi) ,##arg1 \
150 :"$0", "$1", "$22", "$23", "$24", "$25"); \
151})
152
153#define tbi(x,y) __tbi(x,__r17=(y),"1" (__r17))
154#define tbisi(x) __tbi(1,__r17=(x),"1" (__r17))
155#define tbisd(x) __tbi(2,__r17=(x),"1" (__r17))
156#define tbis(x) __tbi(3,__r17=(x),"1" (__r17))
157#define tbiap() __tbi(-1, /* no second argument */)
158#define tbia() __tbi(-2, /* no second argument */)
159
160#endif /* !__ASSEMBLY__ */
161#endif /* __KERNEL__ */
162
51#endif /* __ALPHA_PAL_H */ 163#endif /* __ALPHA_PAL_H */
diff --git a/arch/alpha/include/asm/pgtable.h b/arch/alpha/include/asm/pgtable.h
index de98a732683d..81a4342d5a3f 100644
--- a/arch/alpha/include/asm/pgtable.h
+++ b/arch/alpha/include/asm/pgtable.h
@@ -15,6 +15,7 @@
15#include <asm/page.h> 15#include <asm/page.h>
16#include <asm/processor.h> /* For TASK_SIZE */ 16#include <asm/processor.h> /* For TASK_SIZE */
17#include <asm/machvec.h> 17#include <asm/machvec.h>
18#include <asm/setup.h>
18 19
19struct mm_struct; 20struct mm_struct;
20struct vm_area_struct; 21struct vm_area_struct;
diff --git a/arch/alpha/include/asm/setup.h b/arch/alpha/include/asm/setup.h
index 2e023a4aa317..b50014b30909 100644
--- a/arch/alpha/include/asm/setup.h
+++ b/arch/alpha/include/asm/setup.h
@@ -3,4 +3,40 @@
3 3
4#define COMMAND_LINE_SIZE 256 4#define COMMAND_LINE_SIZE 256
5 5
6/*
7 * We leave one page for the initial stack page, and one page for
8 * the initial process structure. Also, the console eats 3 MB for
9 * the initial bootloader (one of which we can reclaim later).
10 */
11#define BOOT_PCB 0x20000000
12#define BOOT_ADDR 0x20000000
13/* Remove when official MILO sources have ELF support: */
14#define BOOT_SIZE (16*1024)
15
16#ifdef CONFIG_ALPHA_LEGACY_START_ADDRESS
17#define KERNEL_START_PHYS 0x300000 /* Old bootloaders hardcoded this. */
18#else
19#define KERNEL_START_PHYS 0x1000000 /* required: Wildfire/Titan/Marvel */
20#endif
21
22#define KERNEL_START (PAGE_OFFSET+KERNEL_START_PHYS)
23#define SWAPPER_PGD KERNEL_START
24#define INIT_STACK (PAGE_OFFSET+KERNEL_START_PHYS+0x02000)
25#define EMPTY_PGT (PAGE_OFFSET+KERNEL_START_PHYS+0x04000)
26#define EMPTY_PGE (PAGE_OFFSET+KERNEL_START_PHYS+0x08000)
27#define ZERO_PGE (PAGE_OFFSET+KERNEL_START_PHYS+0x0A000)
28
29#define START_ADDR (PAGE_OFFSET+KERNEL_START_PHYS+0x10000)
30
31/*
32 * This is setup by the secondary bootstrap loader. Because
33 * the zero page is zeroed out as soon as the vm system is
34 * initialized, we need to copy things out into a more permanent
35 * place.
36 */
37#define PARAM ZERO_PGE
38#define COMMAND_LINE ((char*)(PARAM + 0x0000))
39#define INITRD_START (*(unsigned long *) (PARAM+0x100))
40#define INITRD_SIZE (*(unsigned long *) (PARAM+0x108))
41
6#endif 42#endif
diff --git a/arch/alpha/include/asm/special_insns.h b/arch/alpha/include/asm/special_insns.h
new file mode 100644
index 000000000000..88d3452b21f0
--- /dev/null
+++ b/arch/alpha/include/asm/special_insns.h
@@ -0,0 +1,41 @@
1#ifndef __ALPHA_SPECIAL_INSNS_H
2#define __ALPHA_SPECIAL_INSNS_H
3
4enum implver_enum {
5 IMPLVER_EV4,
6 IMPLVER_EV5,
7 IMPLVER_EV6
8};
9
10#ifdef CONFIG_ALPHA_GENERIC
11#define implver() \
12({ unsigned long __implver; \
13 __asm__ ("implver %0" : "=r"(__implver)); \
14 (enum implver_enum) __implver; })
15#else
16/* Try to eliminate some dead code. */
17#ifdef CONFIG_ALPHA_EV4
18#define implver() IMPLVER_EV4
19#endif
20#ifdef CONFIG_ALPHA_EV5
21#define implver() IMPLVER_EV5
22#endif
23#if defined(CONFIG_ALPHA_EV6)
24#define implver() IMPLVER_EV6
25#endif
26#endif
27
28enum amask_enum {
29 AMASK_BWX = (1UL << 0),
30 AMASK_FIX = (1UL << 1),
31 AMASK_CIX = (1UL << 2),
32 AMASK_MAX = (1UL << 8),
33 AMASK_PRECISE_TRAP = (1UL << 9),
34};
35
36#define amask(mask) \
37({ unsigned long __amask, __input = (mask); \
38 __asm__ ("amask %1,%0" : "=r"(__amask) : "rI"(__input)); \
39 __amask; })
40
41#endif /* __ALPHA_SPECIAL_INSNS_H */
diff --git a/arch/alpha/include/asm/spinlock.h b/arch/alpha/include/asm/spinlock.h
index d0faca1e992d..3bba21e41b81 100644
--- a/arch/alpha/include/asm/spinlock.h
+++ b/arch/alpha/include/asm/spinlock.h
@@ -1,7 +1,6 @@
1#ifndef _ALPHA_SPINLOCK_H 1#ifndef _ALPHA_SPINLOCK_H
2#define _ALPHA_SPINLOCK_H 2#define _ALPHA_SPINLOCK_H
3 3
4#include <asm/system.h>
5#include <linux/kernel.h> 4#include <linux/kernel.h>
6#include <asm/current.h> 5#include <asm/current.h>
7 6
diff --git a/arch/alpha/include/asm/switch_to.h b/arch/alpha/include/asm/switch_to.h
new file mode 100644
index 000000000000..44c0d4f2c0b2
--- /dev/null
+++ b/arch/alpha/include/asm/switch_to.h
@@ -0,0 +1,14 @@
1#ifndef __ALPHA_SWITCH_TO_H
2#define __ALPHA_SWITCH_TO_H
3
4
5struct task_struct;
6extern struct task_struct *alpha_switch_to(unsigned long, struct task_struct *);
7
8#define switch_to(P,N,L) \
9 do { \
10 (L) = alpha_switch_to(virt_to_phys(&task_thread_info(N)->pcb), (P)); \
11 check_mmu_context(); \
12 } while (0)
13
14#endif /* __ALPHA_SWITCH_TO_H */
diff --git a/arch/alpha/include/asm/system.h b/arch/alpha/include/asm/system.h
index 9f78e6934637..c7270dcff321 100644
--- a/arch/alpha/include/asm/system.h
+++ b/arch/alpha/include/asm/system.h
@@ -1,354 +1,5 @@
1#ifndef __ALPHA_SYSTEM_H 1/* FILE TO BE DELETED. DO NOT ADD STUFF HERE! */
2#define __ALPHA_SYSTEM_H
3
4#include <asm/pal.h>
5#include <asm/page.h>
6#include <asm/barrier.h> 2#include <asm/barrier.h>
7 3#include <asm/exec.h>
8/* 4#include <asm/special_insns.h>
9 * System defines.. Note that this is included both from .c and .S 5#include <asm/switch_to.h>
10 * files, so it does only defines, not any C code.
11 */
12
13/*
14 * We leave one page for the initial stack page, and one page for
15 * the initial process structure. Also, the console eats 3 MB for
16 * the initial bootloader (one of which we can reclaim later).
17 */
18#define BOOT_PCB 0x20000000
19#define BOOT_ADDR 0x20000000
20/* Remove when official MILO sources have ELF support: */
21#define BOOT_SIZE (16*1024)
22
23#ifdef CONFIG_ALPHA_LEGACY_START_ADDRESS
24#define KERNEL_START_PHYS 0x300000 /* Old bootloaders hardcoded this. */
25#else
26#define KERNEL_START_PHYS 0x1000000 /* required: Wildfire/Titan/Marvel */
27#endif
28
29#define KERNEL_START (PAGE_OFFSET+KERNEL_START_PHYS)
30#define SWAPPER_PGD KERNEL_START
31#define INIT_STACK (PAGE_OFFSET+KERNEL_START_PHYS+0x02000)
32#define EMPTY_PGT (PAGE_OFFSET+KERNEL_START_PHYS+0x04000)
33#define EMPTY_PGE (PAGE_OFFSET+KERNEL_START_PHYS+0x08000)
34#define ZERO_PGE (PAGE_OFFSET+KERNEL_START_PHYS+0x0A000)
35
36#define START_ADDR (PAGE_OFFSET+KERNEL_START_PHYS+0x10000)
37
38/*
39 * This is setup by the secondary bootstrap loader. Because
40 * the zero page is zeroed out as soon as the vm system is
41 * initialized, we need to copy things out into a more permanent
42 * place.
43 */
44#define PARAM ZERO_PGE
45#define COMMAND_LINE ((char*)(PARAM + 0x0000))
46#define INITRD_START (*(unsigned long *) (PARAM+0x100))
47#define INITRD_SIZE (*(unsigned long *) (PARAM+0x108))
48
49#ifndef __ASSEMBLY__
50#include <linux/kernel.h>
51#define AT_VECTOR_SIZE_ARCH 4 /* entries in ARCH_DLINFO */
52
53/*
54 * This is the logout header that should be common to all platforms
55 * (assuming they are running OSF/1 PALcode, I guess).
56 */
57struct el_common {
58 unsigned int size; /* size in bytes of logout area */
59 unsigned int sbz1 : 30; /* should be zero */
60 unsigned int err2 : 1; /* second error */
61 unsigned int retry : 1; /* retry flag */
62 unsigned int proc_offset; /* processor-specific offset */
63 unsigned int sys_offset; /* system-specific offset */
64 unsigned int code; /* machine check code */
65 unsigned int frame_rev; /* frame revision */
66};
67
68/* Machine Check Frame for uncorrectable errors (Large format)
69 * --- This is used to log uncorrectable errors such as
70 * double bit ECC errors.
71 * --- These errors are detected by both processor and systems.
72 */
73struct el_common_EV5_uncorrectable_mcheck {
74 unsigned long shadow[8]; /* Shadow reg. 8-14, 25 */
75 unsigned long paltemp[24]; /* PAL TEMP REGS. */
76 unsigned long exc_addr; /* Address of excepting instruction*/
77 unsigned long exc_sum; /* Summary of arithmetic traps. */
78 unsigned long exc_mask; /* Exception mask (from exc_sum). */
79 unsigned long pal_base; /* Base address for PALcode. */
80 unsigned long isr; /* Interrupt Status Reg. */
81 unsigned long icsr; /* CURRENT SETUP OF EV5 IBOX */
82 unsigned long ic_perr_stat; /* I-CACHE Reg. <11> set Data parity
83 <12> set TAG parity*/
84 unsigned long dc_perr_stat; /* D-CACHE error Reg. Bits set to 1:
85 <2> Data error in bank 0
86 <3> Data error in bank 1
87 <4> Tag error in bank 0
88 <5> Tag error in bank 1 */
89 unsigned long va; /* Effective VA of fault or miss. */
90 unsigned long mm_stat; /* Holds the reason for D-stream
91 fault or D-cache parity errors */
92 unsigned long sc_addr; /* Address that was being accessed
93 when EV5 detected Secondary cache
94 failure. */
95 unsigned long sc_stat; /* Helps determine if the error was
96 TAG/Data parity(Secondary Cache)*/
97 unsigned long bc_tag_addr; /* Contents of EV5 BC_TAG_ADDR */
98 unsigned long ei_addr; /* Physical address of any transfer
99 that is logged in EV5 EI_STAT */
100 unsigned long fill_syndrome; /* For correcting ECC errors. */
101 unsigned long ei_stat; /* Helps identify reason of any
102 processor uncorrectable error
103 at its external interface. */
104 unsigned long ld_lock; /* Contents of EV5 LD_LOCK register*/
105};
106
107struct el_common_EV6_mcheck {
108 unsigned int FrameSize; /* Bytes, including this field */
109 unsigned int FrameFlags; /* <31> = Retry, <30> = Second Error */
110 unsigned int CpuOffset; /* Offset to CPU-specific info */
111 unsigned int SystemOffset; /* Offset to system-specific info */
112 unsigned int MCHK_Code;
113 unsigned int MCHK_Frame_Rev;
114 unsigned long I_STAT; /* EV6 Internal Processor Registers */
115 unsigned long DC_STAT; /* (See the 21264 Spec) */
116 unsigned long C_ADDR;
117 unsigned long DC1_SYNDROME;
118 unsigned long DC0_SYNDROME;
119 unsigned long C_STAT;
120 unsigned long C_STS;
121 unsigned long MM_STAT;
122 unsigned long EXC_ADDR;
123 unsigned long IER_CM;
124 unsigned long ISUM;
125 unsigned long RESERVED0;
126 unsigned long PAL_BASE;
127 unsigned long I_CTL;
128 unsigned long PCTX;
129};
130
131extern void halt(void) __attribute__((noreturn));
132#define __halt() __asm__ __volatile__ ("call_pal %0 #halt" : : "i" (PAL_halt))
133
134#define switch_to(P,N,L) \
135 do { \
136 (L) = alpha_switch_to(virt_to_phys(&task_thread_info(N)->pcb), (P)); \
137 check_mmu_context(); \
138 } while (0)
139
140struct task_struct;
141extern struct task_struct *alpha_switch_to(unsigned long, struct task_struct*);
142
143#define imb() \
144__asm__ __volatile__ ("call_pal %0 #imb" : : "i" (PAL_imb) : "memory")
145
146#define draina() \
147__asm__ __volatile__ ("call_pal %0 #draina" : : "i" (PAL_draina) : "memory")
148
149enum implver_enum {
150 IMPLVER_EV4,
151 IMPLVER_EV5,
152 IMPLVER_EV6
153};
154
155#ifdef CONFIG_ALPHA_GENERIC
156#define implver() \
157({ unsigned long __implver; \
158 __asm__ ("implver %0" : "=r"(__implver)); \
159 (enum implver_enum) __implver; })
160#else
161/* Try to eliminate some dead code. */
162#ifdef CONFIG_ALPHA_EV4
163#define implver() IMPLVER_EV4
164#endif
165#ifdef CONFIG_ALPHA_EV5
166#define implver() IMPLVER_EV5
167#endif
168#if defined(CONFIG_ALPHA_EV6)
169#define implver() IMPLVER_EV6
170#endif
171#endif
172
173enum amask_enum {
174 AMASK_BWX = (1UL << 0),
175 AMASK_FIX = (1UL << 1),
176 AMASK_CIX = (1UL << 2),
177 AMASK_MAX = (1UL << 8),
178 AMASK_PRECISE_TRAP = (1UL << 9),
179};
180
181#define amask(mask) \
182({ unsigned long __amask, __input = (mask); \
183 __asm__ ("amask %1,%0" : "=r"(__amask) : "rI"(__input)); \
184 __amask; })
185
186#define __CALL_PAL_R0(NAME, TYPE) \
187extern inline TYPE NAME(void) \
188{ \
189 register TYPE __r0 __asm__("$0"); \
190 __asm__ __volatile__( \
191 "call_pal %1 # " #NAME \
192 :"=r" (__r0) \
193 :"i" (PAL_ ## NAME) \
194 :"$1", "$16", "$22", "$23", "$24", "$25"); \
195 return __r0; \
196}
197
198#define __CALL_PAL_W1(NAME, TYPE0) \
199extern inline void NAME(TYPE0 arg0) \
200{ \
201 register TYPE0 __r16 __asm__("$16") = arg0; \
202 __asm__ __volatile__( \
203 "call_pal %1 # "#NAME \
204 : "=r"(__r16) \
205 : "i"(PAL_ ## NAME), "0"(__r16) \
206 : "$1", "$22", "$23", "$24", "$25"); \
207}
208
209#define __CALL_PAL_W2(NAME, TYPE0, TYPE1) \
210extern inline void NAME(TYPE0 arg0, TYPE1 arg1) \
211{ \
212 register TYPE0 __r16 __asm__("$16") = arg0; \
213 register TYPE1 __r17 __asm__("$17") = arg1; \
214 __asm__ __volatile__( \
215 "call_pal %2 # "#NAME \
216 : "=r"(__r16), "=r"(__r17) \
217 : "i"(PAL_ ## NAME), "0"(__r16), "1"(__r17) \
218 : "$1", "$22", "$23", "$24", "$25"); \
219}
220
221#define __CALL_PAL_RW1(NAME, RTYPE, TYPE0) \
222extern inline RTYPE NAME(TYPE0 arg0) \
223{ \
224 register RTYPE __r0 __asm__("$0"); \
225 register TYPE0 __r16 __asm__("$16") = arg0; \
226 __asm__ __volatile__( \
227 "call_pal %2 # "#NAME \
228 : "=r"(__r16), "=r"(__r0) \
229 : "i"(PAL_ ## NAME), "0"(__r16) \
230 : "$1", "$22", "$23", "$24", "$25"); \
231 return __r0; \
232}
233
234#define __CALL_PAL_RW2(NAME, RTYPE, TYPE0, TYPE1) \
235extern inline RTYPE NAME(TYPE0 arg0, TYPE1 arg1) \
236{ \
237 register RTYPE __r0 __asm__("$0"); \
238 register TYPE0 __r16 __asm__("$16") = arg0; \
239 register TYPE1 __r17 __asm__("$17") = arg1; \
240 __asm__ __volatile__( \
241 "call_pal %3 # "#NAME \
242 : "=r"(__r16), "=r"(__r17), "=r"(__r0) \
243 : "i"(PAL_ ## NAME), "0"(__r16), "1"(__r17) \
244 : "$1", "$22", "$23", "$24", "$25"); \
245 return __r0; \
246}
247
248__CALL_PAL_W1(cflush, unsigned long);
249__CALL_PAL_R0(rdmces, unsigned long);
250__CALL_PAL_R0(rdps, unsigned long);
251__CALL_PAL_R0(rdusp, unsigned long);
252__CALL_PAL_RW1(swpipl, unsigned long, unsigned long);
253__CALL_PAL_R0(whami, unsigned long);
254__CALL_PAL_W2(wrent, void*, unsigned long);
255__CALL_PAL_W1(wripir, unsigned long);
256__CALL_PAL_W1(wrkgp, unsigned long);
257__CALL_PAL_W1(wrmces, unsigned long);
258__CALL_PAL_RW2(wrperfmon, unsigned long, unsigned long, unsigned long);
259__CALL_PAL_W1(wrusp, unsigned long);
260__CALL_PAL_W1(wrvptptr, unsigned long);
261
262/*
263 * TB routines..
264 */
265#define __tbi(nr,arg,arg1...) \
266({ \
267 register unsigned long __r16 __asm__("$16") = (nr); \
268 register unsigned long __r17 __asm__("$17"); arg; \
269 __asm__ __volatile__( \
270 "call_pal %3 #__tbi" \
271 :"=r" (__r16),"=r" (__r17) \
272 :"0" (__r16),"i" (PAL_tbi) ,##arg1 \
273 :"$0", "$1", "$22", "$23", "$24", "$25"); \
274})
275
276#define tbi(x,y) __tbi(x,__r17=(y),"1" (__r17))
277#define tbisi(x) __tbi(1,__r17=(x),"1" (__r17))
278#define tbisd(x) __tbi(2,__r17=(x),"1" (__r17))
279#define tbis(x) __tbi(3,__r17=(x),"1" (__r17))
280#define tbiap() __tbi(-1, /* no second argument */)
281#define tbia() __tbi(-2, /* no second argument */)
282
283/*
284 * Atomic exchange routines.
285 */
286
287#define __ASM__MB
288#define ____xchg(type, args...) __xchg ## type ## _local(args)
289#define ____cmpxchg(type, args...) __cmpxchg ## type ## _local(args)
290#include <asm/xchg.h>
291
292#define xchg_local(ptr,x) \
293 ({ \
294 __typeof__(*(ptr)) _x_ = (x); \
295 (__typeof__(*(ptr))) __xchg_local((ptr), (unsigned long)_x_, \
296 sizeof(*(ptr))); \
297 })
298
299#define cmpxchg_local(ptr, o, n) \
300 ({ \
301 __typeof__(*(ptr)) _o_ = (o); \
302 __typeof__(*(ptr)) _n_ = (n); \
303 (__typeof__(*(ptr))) __cmpxchg_local((ptr), (unsigned long)_o_, \
304 (unsigned long)_n_, \
305 sizeof(*(ptr))); \
306 })
307
308#define cmpxchg64_local(ptr, o, n) \
309 ({ \
310 BUILD_BUG_ON(sizeof(*(ptr)) != 8); \
311 cmpxchg_local((ptr), (o), (n)); \
312 })
313
314#ifdef CONFIG_SMP
315#undef __ASM__MB
316#define __ASM__MB "\tmb\n"
317#endif
318#undef ____xchg
319#undef ____cmpxchg
320#define ____xchg(type, args...) __xchg ##type(args)
321#define ____cmpxchg(type, args...) __cmpxchg ##type(args)
322#include <asm/xchg.h>
323
324#define xchg(ptr,x) \
325 ({ \
326 __typeof__(*(ptr)) _x_ = (x); \
327 (__typeof__(*(ptr))) __xchg((ptr), (unsigned long)_x_, \
328 sizeof(*(ptr))); \
329 })
330
331#define cmpxchg(ptr, o, n) \
332 ({ \
333 __typeof__(*(ptr)) _o_ = (o); \
334 __typeof__(*(ptr)) _n_ = (n); \
335 (__typeof__(*(ptr))) __cmpxchg((ptr), (unsigned long)_o_, \
336 (unsigned long)_n_, sizeof(*(ptr)));\
337 })
338
339#define cmpxchg64(ptr, o, n) \
340 ({ \
341 BUILD_BUG_ON(sizeof(*(ptr)) != 8); \
342 cmpxchg((ptr), (o), (n)); \
343 })
344
345#undef __ASM__MB
346#undef ____cmpxchg
347
348#define __HAVE_ARCH_CMPXCHG 1
349
350#endif /* __ASSEMBLY__ */
351
352#define arch_align_stack(x) (x)
353
354#endif
diff --git a/arch/alpha/include/asm/xchg.h b/arch/alpha/include/asm/xchg.h
index beba1b803e0d..1d1b436fbff2 100644
--- a/arch/alpha/include/asm/xchg.h
+++ b/arch/alpha/include/asm/xchg.h
@@ -1,4 +1,4 @@
1#ifndef __ALPHA_SYSTEM_H 1#ifndef _ALPHA_ATOMIC_H
2#error Do not include xchg.h directly! 2#error Do not include xchg.h directly!
3#else 3#else
4/* 4/*
diff --git a/arch/alpha/kernel/core_apecs.c b/arch/alpha/kernel/core_apecs.c
index ca46b2c24457..708c831efa76 100644
--- a/arch/alpha/kernel/core_apecs.c
+++ b/arch/alpha/kernel/core_apecs.c
@@ -21,6 +21,7 @@
21 21
22#include <asm/ptrace.h> 22#include <asm/ptrace.h>
23#include <asm/smp.h> 23#include <asm/smp.h>
24#include <asm/mce.h>
24 25
25#include "proto.h" 26#include "proto.h"
26#include "pci_impl.h" 27#include "pci_impl.h"
diff --git a/arch/alpha/kernel/core_cia.c b/arch/alpha/kernel/core_cia.c
index 1d6ee6c985f9..c44339e176c1 100644
--- a/arch/alpha/kernel/core_cia.c
+++ b/arch/alpha/kernel/core_cia.c
@@ -23,6 +23,7 @@
23#include <linux/bootmem.h> 23#include <linux/bootmem.h>
24 24
25#include <asm/ptrace.h> 25#include <asm/ptrace.h>
26#include <asm/mce.h>
26 27
27#include "proto.h" 28#include "proto.h"
28#include "pci_impl.h" 29#include "pci_impl.h"
diff --git a/arch/alpha/kernel/core_t2.c b/arch/alpha/kernel/core_t2.c
index 2f770e994289..3ada4f7b085d 100644
--- a/arch/alpha/kernel/core_t2.c
+++ b/arch/alpha/kernel/core_t2.c
@@ -21,6 +21,7 @@
21 21
22#include <asm/ptrace.h> 22#include <asm/ptrace.h>
23#include <asm/delay.h> 23#include <asm/delay.h>
24#include <asm/mce.h>
24 25
25#include "proto.h" 26#include "proto.h"
26#include "pci_impl.h" 27#include "pci_impl.h"
diff --git a/arch/alpha/kernel/err_impl.h b/arch/alpha/kernel/err_impl.h
index 0c010ca4611e..ae529c416037 100644
--- a/arch/alpha/kernel/err_impl.h
+++ b/arch/alpha/kernel/err_impl.h
@@ -7,6 +7,8 @@
7 * implementations. 7 * implementations.
8 */ 8 */
9 9
10#include <asm/mce.h>
11
10union el_timestamp; 12union el_timestamp;
11struct el_subpacket; 13struct el_subpacket;
12struct ev7_lf_subpackets; 14struct ev7_lf_subpackets;
diff --git a/arch/alpha/kernel/head.S b/arch/alpha/kernel/head.S
index 4bdd1d2ff353..c352499ab9f8 100644
--- a/arch/alpha/kernel/head.S
+++ b/arch/alpha/kernel/head.S
@@ -8,14 +8,12 @@
8 */ 8 */
9 9
10#include <linux/init.h> 10#include <linux/init.h>
11#include <asm/system.h>
12#include <asm/asm-offsets.h> 11#include <asm/asm-offsets.h>
12#include <asm/pal.h>
13#include <asm/setup.h>
13 14
14__HEAD 15__HEAD
15.globl swapper_pg_dir
16.globl _stext 16.globl _stext
17swapper_pg_dir=SWAPPER_PGD
18
19 .set noreorder 17 .set noreorder
20 .globl __start 18 .globl __start
21 .ent __start 19 .ent __start
diff --git a/arch/alpha/kernel/irq.c b/arch/alpha/kernel/irq.c
index 381431a2d6d9..2872accd2215 100644
--- a/arch/alpha/kernel/irq.c
+++ b/arch/alpha/kernel/irq.c
@@ -26,7 +26,6 @@
26#include <linux/profile.h> 26#include <linux/profile.h>
27#include <linux/bitops.h> 27#include <linux/bitops.h>
28 28
29#include <asm/system.h>
30#include <asm/io.h> 29#include <asm/io.h>
31#include <asm/uaccess.h> 30#include <asm/uaccess.h>
32 31
diff --git a/arch/alpha/kernel/irq_alpha.c b/arch/alpha/kernel/irq_alpha.c
index 51b7fbd9e4c1..772ddfdb71a8 100644
--- a/arch/alpha/kernel/irq_alpha.c
+++ b/arch/alpha/kernel/irq_alpha.c
@@ -11,6 +11,7 @@
11#include <asm/machvec.h> 11#include <asm/machvec.h>
12#include <asm/dma.h> 12#include <asm/dma.h>
13#include <asm/perf_event.h> 13#include <asm/perf_event.h>
14#include <asm/mce.h>
14 15
15#include "proto.h" 16#include "proto.h"
16#include "irq_impl.h" 17#include "irq_impl.h"
diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c
index 01e8715e26d9..49ee3193477a 100644
--- a/arch/alpha/kernel/osf_sys.c
+++ b/arch/alpha/kernel/osf_sys.c
@@ -40,7 +40,6 @@
40#include <asm/fpu.h> 40#include <asm/fpu.h>
41#include <asm/io.h> 41#include <asm/io.h>
42#include <asm/uaccess.h> 42#include <asm/uaccess.h>
43#include <asm/system.h>
44#include <asm/sysinfo.h> 43#include <asm/sysinfo.h>
45#include <asm/thread_info.h> 44#include <asm/thread_info.h>
46#include <asm/hwrpb.h> 45#include <asm/hwrpb.h>
diff --git a/arch/alpha/kernel/process.c b/arch/alpha/kernel/process.c
index 89bbe5b41145..153d3fce3e8e 100644
--- a/arch/alpha/kernel/process.c
+++ b/arch/alpha/kernel/process.c
@@ -31,7 +31,6 @@
31 31
32#include <asm/reg.h> 32#include <asm/reg.h>
33#include <asm/uaccess.h> 33#include <asm/uaccess.h>
34#include <asm/system.h>
35#include <asm/io.h> 34#include <asm/io.h>
36#include <asm/pgtable.h> 35#include <asm/pgtable.h>
37#include <asm/hwrpb.h> 36#include <asm/hwrpb.h>
diff --git a/arch/alpha/kernel/ptrace.c b/arch/alpha/kernel/ptrace.c
index e2af5eb59bb4..54616f496aed 100644
--- a/arch/alpha/kernel/ptrace.c
+++ b/arch/alpha/kernel/ptrace.c
@@ -16,7 +16,6 @@
16 16
17#include <asm/uaccess.h> 17#include <asm/uaccess.h>
18#include <asm/pgtable.h> 18#include <asm/pgtable.h>
19#include <asm/system.h>
20#include <asm/fpu.h> 19#include <asm/fpu.h>
21 20
22#include "proto.h" 21#include "proto.h"
diff --git a/arch/alpha/kernel/setup.c b/arch/alpha/kernel/setup.c
index 32de56067e63..9e3107cc5ebb 100644
--- a/arch/alpha/kernel/setup.c
+++ b/arch/alpha/kernel/setup.c
@@ -55,7 +55,6 @@ static struct notifier_block alpha_panic_block = {
55 55
56#include <asm/uaccess.h> 56#include <asm/uaccess.h>
57#include <asm/pgtable.h> 57#include <asm/pgtable.h>
58#include <asm/system.h>
59#include <asm/hwrpb.h> 58#include <asm/hwrpb.h>
60#include <asm/dma.h> 59#include <asm/dma.h>
61#include <asm/mmu_context.h> 60#include <asm/mmu_context.h>
diff --git a/arch/alpha/kernel/sys_alcor.c b/arch/alpha/kernel/sys_alcor.c
index 8606d77e5163..118dc6af1805 100644
--- a/arch/alpha/kernel/sys_alcor.c
+++ b/arch/alpha/kernel/sys_alcor.c
@@ -18,7 +18,6 @@
18#include <linux/bitops.h> 18#include <linux/bitops.h>
19 19
20#include <asm/ptrace.h> 20#include <asm/ptrace.h>
21#include <asm/system.h>
22#include <asm/io.h> 21#include <asm/io.h>
23#include <asm/dma.h> 22#include <asm/dma.h>
24#include <asm/mmu_context.h> 23#include <asm/mmu_context.h>
diff --git a/arch/alpha/kernel/sys_cabriolet.c b/arch/alpha/kernel/sys_cabriolet.c
index 1029619fb6c0..4c50f8f40cbb 100644
--- a/arch/alpha/kernel/sys_cabriolet.c
+++ b/arch/alpha/kernel/sys_cabriolet.c
@@ -18,7 +18,6 @@
18#include <linux/bitops.h> 18#include <linux/bitops.h>
19 19
20#include <asm/ptrace.h> 20#include <asm/ptrace.h>
21#include <asm/system.h>
22#include <asm/dma.h> 21#include <asm/dma.h>
23#include <asm/irq.h> 22#include <asm/irq.h>
24#include <asm/mmu_context.h> 23#include <asm/mmu_context.h>
diff --git a/arch/alpha/kernel/sys_dp264.c b/arch/alpha/kernel/sys_dp264.c
index 13f0717fc7fe..5bf401f7ea97 100644
--- a/arch/alpha/kernel/sys_dp264.c
+++ b/arch/alpha/kernel/sys_dp264.c
@@ -21,7 +21,6 @@
21#include <linux/bitops.h> 21#include <linux/bitops.h>
22 22
23#include <asm/ptrace.h> 23#include <asm/ptrace.h>
24#include <asm/system.h>
25#include <asm/dma.h> 24#include <asm/dma.h>
26#include <asm/irq.h> 25#include <asm/irq.h>
27#include <asm/mmu_context.h> 26#include <asm/mmu_context.h>
diff --git a/arch/alpha/kernel/sys_eb64p.c b/arch/alpha/kernel/sys_eb64p.c
index 3c6c13cd8b19..ad40a425e841 100644
--- a/arch/alpha/kernel/sys_eb64p.c
+++ b/arch/alpha/kernel/sys_eb64p.c
@@ -17,7 +17,6 @@
17#include <linux/bitops.h> 17#include <linux/bitops.h>
18 18
19#include <asm/ptrace.h> 19#include <asm/ptrace.h>
20#include <asm/system.h>
21#include <asm/dma.h> 20#include <asm/dma.h>
22#include <asm/irq.h> 21#include <asm/irq.h>
23#include <asm/mmu_context.h> 22#include <asm/mmu_context.h>
diff --git a/arch/alpha/kernel/sys_eiger.c b/arch/alpha/kernel/sys_eiger.c
index 35f480db7719..79d69d7f63f8 100644
--- a/arch/alpha/kernel/sys_eiger.c
+++ b/arch/alpha/kernel/sys_eiger.c
@@ -18,7 +18,6 @@
18#include <linux/bitops.h> 18#include <linux/bitops.h>
19 19
20#include <asm/ptrace.h> 20#include <asm/ptrace.h>
21#include <asm/system.h>
22#include <asm/dma.h> 21#include <asm/dma.h>
23#include <asm/irq.h> 22#include <asm/irq.h>
24#include <asm/mmu_context.h> 23#include <asm/mmu_context.h>
diff --git a/arch/alpha/kernel/sys_jensen.c b/arch/alpha/kernel/sys_jensen.c
index 7f1a87f176e2..5a0af11b3a61 100644
--- a/arch/alpha/kernel/sys_jensen.c
+++ b/arch/alpha/kernel/sys_jensen.c
@@ -15,7 +15,6 @@
15#include <linux/init.h> 15#include <linux/init.h>
16 16
17#include <asm/ptrace.h> 17#include <asm/ptrace.h>
18#include <asm/system.h>
19 18
20#define __EXTERN_INLINE inline 19#define __EXTERN_INLINE inline
21#include <asm/io.h> 20#include <asm/io.h>
diff --git a/arch/alpha/kernel/sys_marvel.c b/arch/alpha/kernel/sys_marvel.c
index 95cfc83ece8f..e8b4f6f8cbb6 100644
--- a/arch/alpha/kernel/sys_marvel.c
+++ b/arch/alpha/kernel/sys_marvel.c
@@ -13,7 +13,6 @@
13#include <linux/bitops.h> 13#include <linux/bitops.h>
14 14
15#include <asm/ptrace.h> 15#include <asm/ptrace.h>
16#include <asm/system.h>
17#include <asm/dma.h> 16#include <asm/dma.h>
18#include <asm/irq.h> 17#include <asm/irq.h>
19#include <asm/mmu_context.h> 18#include <asm/mmu_context.h>
diff --git a/arch/alpha/kernel/sys_miata.c b/arch/alpha/kernel/sys_miata.c
index 258da684670b..d5b9776a608d 100644
--- a/arch/alpha/kernel/sys_miata.c
+++ b/arch/alpha/kernel/sys_miata.c
@@ -17,7 +17,6 @@
17#include <linux/reboot.h> 17#include <linux/reboot.h>
18 18
19#include <asm/ptrace.h> 19#include <asm/ptrace.h>
20#include <asm/system.h>
21#include <asm/dma.h> 20#include <asm/dma.h>
22#include <asm/irq.h> 21#include <asm/irq.h>
23#include <asm/mmu_context.h> 22#include <asm/mmu_context.h>
diff --git a/arch/alpha/kernel/sys_mikasa.c b/arch/alpha/kernel/sys_mikasa.c
index c0fd7284dec3..5e82dc1ad6f2 100644
--- a/arch/alpha/kernel/sys_mikasa.c
+++ b/arch/alpha/kernel/sys_mikasa.c
@@ -17,7 +17,7 @@
17#include <linux/bitops.h> 17#include <linux/bitops.h>
18 18
19#include <asm/ptrace.h> 19#include <asm/ptrace.h>
20#include <asm/system.h> 20#include <asm/mce.h>
21#include <asm/dma.h> 21#include <asm/dma.h>
22#include <asm/irq.h> 22#include <asm/irq.h>
23#include <asm/mmu_context.h> 23#include <asm/mmu_context.h>
diff --git a/arch/alpha/kernel/sys_nautilus.c b/arch/alpha/kernel/sys_nautilus.c
index 4112200307c7..4d4c046f708d 100644
--- a/arch/alpha/kernel/sys_nautilus.c
+++ b/arch/alpha/kernel/sys_nautilus.c
@@ -35,7 +35,6 @@
35#include <linux/bitops.h> 35#include <linux/bitops.h>
36 36
37#include <asm/ptrace.h> 37#include <asm/ptrace.h>
38#include <asm/system.h>
39#include <asm/dma.h> 38#include <asm/dma.h>
40#include <asm/irq.h> 39#include <asm/irq.h>
41#include <asm/mmu_context.h> 40#include <asm/mmu_context.h>
diff --git a/arch/alpha/kernel/sys_noritake.c b/arch/alpha/kernel/sys_noritake.c
index 21725283cdd7..063e594fd969 100644
--- a/arch/alpha/kernel/sys_noritake.c
+++ b/arch/alpha/kernel/sys_noritake.c
@@ -18,7 +18,7 @@
18#include <linux/bitops.h> 18#include <linux/bitops.h>
19 19
20#include <asm/ptrace.h> 20#include <asm/ptrace.h>
21#include <asm/system.h> 21#include <asm/mce.h>
22#include <asm/dma.h> 22#include <asm/dma.h>
23#include <asm/irq.h> 23#include <asm/irq.h>
24#include <asm/mmu_context.h> 24#include <asm/mmu_context.h>
diff --git a/arch/alpha/kernel/sys_rawhide.c b/arch/alpha/kernel/sys_rawhide.c
index a125d6bea7e1..dfd510ae5d8c 100644
--- a/arch/alpha/kernel/sys_rawhide.c
+++ b/arch/alpha/kernel/sys_rawhide.c
@@ -16,7 +16,6 @@
16#include <linux/init.h> 16#include <linux/init.h>
17 17
18#include <asm/ptrace.h> 18#include <asm/ptrace.h>
19#include <asm/system.h>
20#include <asm/dma.h> 19#include <asm/dma.h>
21#include <asm/irq.h> 20#include <asm/irq.h>
22#include <asm/mmu_context.h> 21#include <asm/mmu_context.h>
diff --git a/arch/alpha/kernel/sys_ruffian.c b/arch/alpha/kernel/sys_ruffian.c
index 2581cbec6fc2..a3f485257170 100644
--- a/arch/alpha/kernel/sys_ruffian.c
+++ b/arch/alpha/kernel/sys_ruffian.c
@@ -18,7 +18,6 @@
18#include <linux/init.h> 18#include <linux/init.h>
19 19
20#include <asm/ptrace.h> 20#include <asm/ptrace.h>
21#include <asm/system.h>
22#include <asm/dma.h> 21#include <asm/dma.h>
23#include <asm/irq.h> 22#include <asm/irq.h>
24#include <asm/mmu_context.h> 23#include <asm/mmu_context.h>
diff --git a/arch/alpha/kernel/sys_rx164.c b/arch/alpha/kernel/sys_rx164.c
index b172b27555a7..08ee737d4fba 100644
--- a/arch/alpha/kernel/sys_rx164.c
+++ b/arch/alpha/kernel/sys_rx164.c
@@ -17,7 +17,6 @@
17#include <linux/bitops.h> 17#include <linux/bitops.h>
18 18
19#include <asm/ptrace.h> 19#include <asm/ptrace.h>
20#include <asm/system.h>
21#include <asm/dma.h> 20#include <asm/dma.h>
22#include <asm/irq.h> 21#include <asm/irq.h>
23#include <asm/mmu_context.h> 22#include <asm/mmu_context.h>
diff --git a/arch/alpha/kernel/sys_sable.c b/arch/alpha/kernel/sys_sable.c
index 98d1dbffe98f..8a0aa6d67b53 100644
--- a/arch/alpha/kernel/sys_sable.c
+++ b/arch/alpha/kernel/sys_sable.c
@@ -16,7 +16,6 @@
16#include <linux/init.h> 16#include <linux/init.h>
17 17
18#include <asm/ptrace.h> 18#include <asm/ptrace.h>
19#include <asm/system.h>
20#include <asm/dma.h> 19#include <asm/dma.h>
21#include <asm/irq.h> 20#include <asm/irq.h>
22#include <asm/mmu_context.h> 21#include <asm/mmu_context.h>
diff --git a/arch/alpha/kernel/sys_sio.c b/arch/alpha/kernel/sys_sio.c
index 47bec1e97d1c..febd24eba7a6 100644
--- a/arch/alpha/kernel/sys_sio.c
+++ b/arch/alpha/kernel/sys_sio.c
@@ -20,7 +20,6 @@
20 20
21#include <asm/compiler.h> 21#include <asm/compiler.h>
22#include <asm/ptrace.h> 22#include <asm/ptrace.h>
23#include <asm/system.h>
24#include <asm/dma.h> 23#include <asm/dma.h>
25#include <asm/irq.h> 24#include <asm/irq.h>
26#include <asm/mmu_context.h> 25#include <asm/mmu_context.h>
diff --git a/arch/alpha/kernel/sys_sx164.c b/arch/alpha/kernel/sys_sx164.c
index 73e1c317afcb..d063b360efed 100644
--- a/arch/alpha/kernel/sys_sx164.c
+++ b/arch/alpha/kernel/sys_sx164.c
@@ -17,7 +17,6 @@
17#include <linux/bitops.h> 17#include <linux/bitops.h>
18 18
19#include <asm/ptrace.h> 19#include <asm/ptrace.h>
20#include <asm/system.h>
21#include <asm/dma.h> 20#include <asm/dma.h>
22#include <asm/irq.h> 21#include <asm/irq.h>
23#include <asm/mmu_context.h> 22#include <asm/mmu_context.h>
@@ -26,6 +25,7 @@
26#include <asm/core_cia.h> 25#include <asm/core_cia.h>
27#include <asm/hwrpb.h> 26#include <asm/hwrpb.h>
28#include <asm/tlbflush.h> 27#include <asm/tlbflush.h>
28#include <asm/special_insns.h>
29 29
30#include "proto.h" 30#include "proto.h"
31#include "irq_impl.h" 31#include "irq_impl.h"
diff --git a/arch/alpha/kernel/sys_takara.c b/arch/alpha/kernel/sys_takara.c
index 2ae99ad6975e..dd0f1eae3c68 100644
--- a/arch/alpha/kernel/sys_takara.c
+++ b/arch/alpha/kernel/sys_takara.c
@@ -16,7 +16,6 @@
16#include <linux/init.h> 16#include <linux/init.h>
17 17
18#include <asm/ptrace.h> 18#include <asm/ptrace.h>
19#include <asm/system.h>
20#include <asm/dma.h> 19#include <asm/dma.h>
21#include <asm/irq.h> 20#include <asm/irq.h>
22#include <asm/mmu_context.h> 21#include <asm/mmu_context.h>
diff --git a/arch/alpha/kernel/sys_titan.c b/arch/alpha/kernel/sys_titan.c
index f47b30a2a117..9de928c6ef97 100644
--- a/arch/alpha/kernel/sys_titan.c
+++ b/arch/alpha/kernel/sys_titan.c
@@ -21,7 +21,6 @@
21#include <linux/bitops.h> 21#include <linux/bitops.h>
22 22
23#include <asm/ptrace.h> 23#include <asm/ptrace.h>
24#include <asm/system.h>
25#include <asm/dma.h> 24#include <asm/dma.h>
26#include <asm/irq.h> 25#include <asm/irq.h>
27#include <asm/mmu_context.h> 26#include <asm/mmu_context.h>
diff --git a/arch/alpha/kernel/sys_wildfire.c b/arch/alpha/kernel/sys_wildfire.c
index 17c85a65e7b0..ee1874887776 100644
--- a/arch/alpha/kernel/sys_wildfire.c
+++ b/arch/alpha/kernel/sys_wildfire.c
@@ -15,7 +15,6 @@
15#include <linux/bitops.h> 15#include <linux/bitops.h>
16 16
17#include <asm/ptrace.h> 17#include <asm/ptrace.h>
18#include <asm/system.h>
19#include <asm/dma.h> 18#include <asm/dma.h>
20#include <asm/irq.h> 19#include <asm/irq.h>
21#include <asm/mmu_context.h> 20#include <asm/mmu_context.h>
diff --git a/arch/alpha/kernel/traps.c b/arch/alpha/kernel/traps.c
index 0414e021a91c..80d987c0e9aa 100644
--- a/arch/alpha/kernel/traps.c
+++ b/arch/alpha/kernel/traps.c
@@ -24,6 +24,7 @@
24#include <asm/sysinfo.h> 24#include <asm/sysinfo.h>
25#include <asm/hwrpb.h> 25#include <asm/hwrpb.h>
26#include <asm/mmu_context.h> 26#include <asm/mmu_context.h>
27#include <asm/special_insns.h>
27 28
28#include "proto.h" 29#include "proto.h"
29 30
diff --git a/arch/alpha/kernel/vmlinux.lds.S b/arch/alpha/kernel/vmlinux.lds.S
index f937ad123852..647b84c15382 100644
--- a/arch/alpha/kernel/vmlinux.lds.S
+++ b/arch/alpha/kernel/vmlinux.lds.S
@@ -2,6 +2,7 @@
2#include <asm/thread_info.h> 2#include <asm/thread_info.h>
3#include <asm/cache.h> 3#include <asm/cache.h>
4#include <asm/page.h> 4#include <asm/page.h>
5#include <asm/setup.h>
5 6
6OUTPUT_FORMAT("elf64-alpha") 7OUTPUT_FORMAT("elf64-alpha")
7OUTPUT_ARCH(alpha) 8OUTPUT_ARCH(alpha)
@@ -25,6 +26,7 @@ SECTIONS
25 *(.fixup) 26 *(.fixup)
26 *(.gnu.warning) 27 *(.gnu.warning)
27 } :kernel 28 } :kernel
29 swapper_pg_dir = SWAPPER_PGD;
28 _etext = .; /* End of text section */ 30 _etext = .; /* End of text section */
29 31
30 NOTES :kernel :note 32 NOTES :kernel :note
diff --git a/arch/alpha/lib/stacktrace.c b/arch/alpha/lib/stacktrace.c
index 6d432e42aedc..5e832161e6d2 100644
--- a/arch/alpha/lib/stacktrace.c
+++ b/arch/alpha/lib/stacktrace.c
@@ -1,5 +1,4 @@
1#include <linux/kernel.h> 1#include <linux/kernel.h>
2#include <asm/system.h>
3 2
4typedef unsigned int instr; 3typedef unsigned int instr;
5 4
diff --git a/arch/alpha/mm/fault.c b/arch/alpha/mm/fault.c
index fadd5f882ff9..5eecab1a84ef 100644
--- a/arch/alpha/mm/fault.c
+++ b/arch/alpha/mm/fault.c
@@ -24,7 +24,6 @@
24#include <linux/interrupt.h> 24#include <linux/interrupt.h>
25#include <linux/module.h> 25#include <linux/module.h>
26 26
27#include <asm/system.h>
28#include <asm/uaccess.h> 27#include <asm/uaccess.h>
29 28
30extern void die_if_kernel(char *,struct pt_regs *,long, unsigned long *); 29extern void die_if_kernel(char *,struct pt_regs *,long, unsigned long *);
diff --git a/arch/alpha/mm/init.c b/arch/alpha/mm/init.c
index 69d0c5761e2f..1ad6ca74bed2 100644
--- a/arch/alpha/mm/init.c
+++ b/arch/alpha/mm/init.c
@@ -22,7 +22,6 @@
22#include <linux/vmalloc.h> 22#include <linux/vmalloc.h>
23#include <linux/gfp.h> 23#include <linux/gfp.h>
24 24
25#include <asm/system.h>
26#include <asm/uaccess.h> 25#include <asm/uaccess.h>
27#include <asm/pgtable.h> 26#include <asm/pgtable.h>
28#include <asm/pgalloc.h> 27#include <asm/pgalloc.h>
@@ -31,6 +30,7 @@
31#include <asm/mmu_context.h> 30#include <asm/mmu_context.h>
32#include <asm/console.h> 31#include <asm/console.h>
33#include <asm/tlb.h> 32#include <asm/tlb.h>
33#include <asm/setup.h>
34 34
35extern void die_if_kernel(char *,struct pt_regs *,long); 35extern void die_if_kernel(char *,struct pt_regs *,long);
36 36
diff --git a/arch/alpha/oprofile/common.c b/arch/alpha/oprofile/common.c
index bd8ac533a504..a0a5d27aa215 100644
--- a/arch/alpha/oprofile/common.c
+++ b/arch/alpha/oprofile/common.c
@@ -12,7 +12,6 @@
12#include <linux/smp.h> 12#include <linux/smp.h>
13#include <linux/errno.h> 13#include <linux/errno.h>
14#include <asm/ptrace.h> 14#include <asm/ptrace.h>
15#include <asm/system.h>
16 15
17#include "op_impl.h" 16#include "op_impl.h"
18 17
diff --git a/arch/alpha/oprofile/op_model_ev4.c b/arch/alpha/oprofile/op_model_ev4.c
index 80d764dbf22f..18aa9b4f94f1 100644
--- a/arch/alpha/oprofile/op_model_ev4.c
+++ b/arch/alpha/oprofile/op_model_ev4.c
@@ -11,7 +11,6 @@
11#include <linux/init.h> 11#include <linux/init.h>
12#include <linux/smp.h> 12#include <linux/smp.h>
13#include <asm/ptrace.h> 13#include <asm/ptrace.h>
14#include <asm/system.h>
15 14
16#include "op_impl.h" 15#include "op_impl.h"
17 16
diff --git a/arch/alpha/oprofile/op_model_ev5.c b/arch/alpha/oprofile/op_model_ev5.c
index ceea6e1ad79a..c32f8a0ad925 100644
--- a/arch/alpha/oprofile/op_model_ev5.c
+++ b/arch/alpha/oprofile/op_model_ev5.c
@@ -11,7 +11,6 @@
11#include <linux/init.h> 11#include <linux/init.h>
12#include <linux/smp.h> 12#include <linux/smp.h>
13#include <asm/ptrace.h> 13#include <asm/ptrace.h>
14#include <asm/system.h>
15 14
16#include "op_impl.h" 15#include "op_impl.h"
17 16
diff --git a/arch/alpha/oprofile/op_model_ev6.c b/arch/alpha/oprofile/op_model_ev6.c
index 0869f85f5748..1c84cc257fc7 100644
--- a/arch/alpha/oprofile/op_model_ev6.c
+++ b/arch/alpha/oprofile/op_model_ev6.c
@@ -11,7 +11,6 @@
11#include <linux/init.h> 11#include <linux/init.h>
12#include <linux/smp.h> 12#include <linux/smp.h>
13#include <asm/ptrace.h> 13#include <asm/ptrace.h>
14#include <asm/system.h>
15 14
16#include "op_impl.h" 15#include "op_impl.h"
17 16
diff --git a/arch/alpha/oprofile/op_model_ev67.c b/arch/alpha/oprofile/op_model_ev67.c
index 5b9d178e0228..34a57a126553 100644
--- a/arch/alpha/oprofile/op_model_ev67.c
+++ b/arch/alpha/oprofile/op_model_ev67.c
@@ -12,7 +12,6 @@
12#include <linux/init.h> 12#include <linux/init.h>
13#include <linux/smp.h> 13#include <linux/smp.h>
14#include <asm/ptrace.h> 14#include <asm/ptrace.h>
15#include <asm/system.h>
16 15
17#include "op_impl.h" 16#include "op_impl.h"
18 17