diff options
author | Jiri Kosina <jkosina@suse.cz> | 2012-04-08 15:48:52 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2012-04-08 15:48:52 -0400 |
commit | e75d660672ddd11704b7f0fdb8ff21968587b266 (patch) | |
tree | ccb9c107744c10b553c0373e450bee3971d16c00 /arch/alpha | |
parent | 61282f37927143e45b03153f3e7b48d6b702147a (diff) | |
parent | 0034102808e0dbbf3a2394b82b1bb40b5778de9e (diff) |
Merge branch 'master' into for-next
Merge with latest Linus' tree, as I have incoming patches
that fix code that is newer than current HEAD of for-next.
Conflicts:
drivers/net/ethernet/realtek/r8169.c
Diffstat (limited to 'arch/alpha')
80 files changed, 478 insertions, 690 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/dma-mapping.h b/arch/alpha/include/asm/dma-mapping.h index 4567aca6fdd6..dfa32f061320 100644 --- a/arch/alpha/include/asm/dma-mapping.h +++ b/arch/alpha/include/asm/dma-mapping.h | |||
@@ -12,16 +12,22 @@ static inline struct dma_map_ops *get_dma_ops(struct device *dev) | |||
12 | 12 | ||
13 | #include <asm-generic/dma-mapping-common.h> | 13 | #include <asm-generic/dma-mapping-common.h> |
14 | 14 | ||
15 | static inline void *dma_alloc_coherent(struct device *dev, size_t size, | 15 | #define dma_alloc_coherent(d,s,h,f) dma_alloc_attrs(d,s,h,f,NULL) |
16 | dma_addr_t *dma_handle, gfp_t gfp) | 16 | |
17 | static inline void *dma_alloc_attrs(struct device *dev, size_t size, | ||
18 | dma_addr_t *dma_handle, gfp_t gfp, | ||
19 | struct dma_attrs *attrs) | ||
17 | { | 20 | { |
18 | return get_dma_ops(dev)->alloc_coherent(dev, size, dma_handle, gfp); | 21 | return get_dma_ops(dev)->alloc(dev, size, dma_handle, gfp, attrs); |
19 | } | 22 | } |
20 | 23 | ||
21 | static inline void dma_free_coherent(struct device *dev, size_t size, | 24 | #define dma_free_coherent(d,s,c,h) dma_free_attrs(d,s,c,h,NULL) |
22 | void *vaddr, dma_addr_t dma_handle) | 25 | |
26 | static inline void dma_free_attrs(struct device *dev, size_t size, | ||
27 | void *vaddr, dma_addr_t dma_handle, | ||
28 | struct dma_attrs *attrs) | ||
23 | { | 29 | { |
24 | get_dma_ops(dev)->free_coherent(dev, size, vaddr, dma_handle); | 30 | get_dma_ops(dev)->free(dev, size, vaddr, dma_handle, attrs); |
25 | } | 31 | } |
26 | 32 | ||
27 | static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr) | 33 | static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr) |
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/futex.h b/arch/alpha/include/asm/futex.h index e8a761aee088..f939794363ac 100644 --- a/arch/alpha/include/asm/futex.h +++ b/arch/alpha/include/asm/futex.h | |||
@@ -108,7 +108,7 @@ futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr, | |||
108 | " lda $31,3b-2b(%0)\n" | 108 | " lda $31,3b-2b(%0)\n" |
109 | " .previous\n" | 109 | " .previous\n" |
110 | : "+r"(ret), "=&r"(prev), "=&r"(cmp) | 110 | : "+r"(ret), "=&r"(prev), "=&r"(cmp) |
111 | : "r"(uaddr), "r"((long)oldval), "r"(newval) | 111 | : "r"(uaddr), "r"((long)(int)oldval), "r"(newval) |
112 | : "memory"); | 112 | : "memory"); |
113 | 113 | ||
114 | *uval = prev; | 114 | *uval = prev; |
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 | */ | ||
8 | struct 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 | */ | ||
24 | struct 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 | |||
58 | struct 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/mman.h b/arch/alpha/include/asm/mman.h index 72db984f8781..cbeb3616a28e 100644 --- a/arch/alpha/include/asm/mman.h +++ b/arch/alpha/include/asm/mman.h | |||
@@ -56,6 +56,10 @@ | |||
56 | #define MADV_HUGEPAGE 14 /* Worth backing with hugepages */ | 56 | #define MADV_HUGEPAGE 14 /* Worth backing with hugepages */ |
57 | #define MADV_NOHUGEPAGE 15 /* Not worth backing with hugepages */ | 57 | #define MADV_NOHUGEPAGE 15 /* Not worth backing with hugepages */ |
58 | 58 | ||
59 | #define MADV_DONTDUMP 16 /* Explicity exclude from the core dump, | ||
60 | overrides the coredump filter bits */ | ||
61 | #define MADV_DODUMP 17 /* Clear the MADV_NODUMP flag */ | ||
62 | |||
59 | /* compatibility flags */ | 63 | /* compatibility flags */ |
60 | #define MAP_FILE 0 | 64 | #define MAP_FILE 0 |
61 | 65 | ||
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 | |||
54 | extern 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) \ | ||
64 | extern 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) \ | ||
76 | extern 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) \ | ||
87 | extern 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) \ | ||
99 | extern 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) \ | ||
112 | extern 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/pci.h b/arch/alpha/include/asm/pci.h index 28d0497fd3c7..d01afb78919c 100644 --- a/arch/alpha/include/asm/pci.h +++ b/arch/alpha/include/asm/pci.h | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <linux/dma-mapping.h> | 7 | #include <linux/dma-mapping.h> |
8 | #include <asm/scatterlist.h> | 8 | #include <asm/scatterlist.h> |
9 | #include <asm/machvec.h> | 9 | #include <asm/machvec.h> |
10 | #include <asm-generic/pci-bridge.h> | ||
10 | 11 | ||
11 | /* | 12 | /* |
12 | * The following structure is used to manage multiple PCI busses. | 13 | * The following structure is used to manage multiple PCI busses. |
@@ -99,12 +100,6 @@ static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel) | |||
99 | return channel ? 15 : 14; | 100 | return channel ? 15 : 14; |
100 | } | 101 | } |
101 | 102 | ||
102 | extern void pcibios_resource_to_bus(struct pci_dev *, struct pci_bus_region *, | ||
103 | struct resource *); | ||
104 | |||
105 | extern void pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res, | ||
106 | struct pci_bus_region *region); | ||
107 | |||
108 | #define pci_domain_nr(bus) ((struct pci_controller *)(bus)->sysdata)->index | 103 | #define pci_domain_nr(bus) ((struct pci_controller *)(bus)->sysdata)->index |
109 | 104 | ||
110 | static inline int pci_proc_domain(struct pci_bus *bus) | 105 | static inline int pci_proc_domain(struct pci_bus *bus) |
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 | ||
19 | struct mm_struct; | 20 | struct mm_struct; |
20 | struct vm_area_struct; | 21 | struct vm_area_struct; |
diff --git a/arch/alpha/include/asm/posix_types.h b/arch/alpha/include/asm/posix_types.h index db167413300b..24779fc95994 100644 --- a/arch/alpha/include/asm/posix_types.h +++ b/arch/alpha/include/asm/posix_types.h | |||
@@ -8,116 +8,13 @@ | |||
8 | */ | 8 | */ |
9 | 9 | ||
10 | typedef unsigned int __kernel_ino_t; | 10 | typedef unsigned int __kernel_ino_t; |
11 | typedef unsigned int __kernel_mode_t; | 11 | #define __kernel_ino_t __kernel_ino_t |
12 | typedef unsigned int __kernel_nlink_t; | ||
13 | typedef long __kernel_off_t; | ||
14 | typedef long long __kernel_loff_t; | ||
15 | typedef int __kernel_pid_t; | ||
16 | typedef int __kernel_ipc_pid_t; | ||
17 | typedef unsigned int __kernel_uid_t; | ||
18 | typedef unsigned int __kernel_gid_t; | ||
19 | typedef unsigned long __kernel_size_t; | ||
20 | typedef long __kernel_ssize_t; | ||
21 | typedef long __kernel_ptrdiff_t; | ||
22 | typedef long __kernel_time_t; | ||
23 | typedef long __kernel_suseconds_t; | ||
24 | typedef long __kernel_clock_t; | ||
25 | typedef int __kernel_daddr_t; | ||
26 | typedef char * __kernel_caddr_t; | ||
27 | typedef unsigned long __kernel_sigset_t; /* at least 32 bits */ | ||
28 | typedef unsigned short __kernel_uid16_t; | ||
29 | typedef unsigned short __kernel_gid16_t; | ||
30 | typedef int __kernel_clockid_t; | ||
31 | typedef int __kernel_timer_t; | ||
32 | |||
33 | typedef struct { | ||
34 | int val[2]; | ||
35 | } __kernel_fsid_t; | ||
36 | |||
37 | typedef __kernel_uid_t __kernel_old_uid_t; | ||
38 | typedef __kernel_gid_t __kernel_old_gid_t; | ||
39 | typedef __kernel_uid_t __kernel_uid32_t; | ||
40 | typedef __kernel_gid_t __kernel_gid32_t; | ||
41 | |||
42 | typedef unsigned int __kernel_old_dev_t; | ||
43 | |||
44 | #ifdef __KERNEL__ | ||
45 | |||
46 | #ifndef __GNUC__ | ||
47 | |||
48 | #define __FD_SET(d, set) ((set)->fds_bits[__FDELT(d)] |= __FDMASK(d)) | ||
49 | #define __FD_CLR(d, set) ((set)->fds_bits[__FDELT(d)] &= ~__FDMASK(d)) | ||
50 | #define __FD_ISSET(d, set) (((set)->fds_bits[__FDELT(d)] & __FDMASK(d)) != 0) | ||
51 | #define __FD_ZERO(set) \ | ||
52 | ((void) memset ((void *) (set), 0, sizeof (__kernel_fd_set))) | ||
53 | |||
54 | #else /* __GNUC__ */ | ||
55 | |||
56 | /* With GNU C, use inline functions instead so args are evaluated only once: */ | ||
57 | 12 | ||
58 | #undef __FD_SET | 13 | typedef unsigned int __kernel_nlink_t; |
59 | static __inline__ void __FD_SET(unsigned long fd, __kernel_fd_set *fdsetp) | 14 | #define __kernel_nlink_t __kernel_nlink_t |
60 | { | ||
61 | unsigned long _tmp = fd / __NFDBITS; | ||
62 | unsigned long _rem = fd % __NFDBITS; | ||
63 | fdsetp->fds_bits[_tmp] |= (1UL<<_rem); | ||
64 | } | ||
65 | |||
66 | #undef __FD_CLR | ||
67 | static __inline__ void __FD_CLR(unsigned long fd, __kernel_fd_set *fdsetp) | ||
68 | { | ||
69 | unsigned long _tmp = fd / __NFDBITS; | ||
70 | unsigned long _rem = fd % __NFDBITS; | ||
71 | fdsetp->fds_bits[_tmp] &= ~(1UL<<_rem); | ||
72 | } | ||
73 | |||
74 | #undef __FD_ISSET | ||
75 | static __inline__ int __FD_ISSET(unsigned long fd, const __kernel_fd_set *p) | ||
76 | { | ||
77 | unsigned long _tmp = fd / __NFDBITS; | ||
78 | unsigned long _rem = fd % __NFDBITS; | ||
79 | return (p->fds_bits[_tmp] & (1UL<<_rem)) != 0; | ||
80 | } | ||
81 | |||
82 | /* | ||
83 | * This will unroll the loop for the normal constant case (8 ints, | ||
84 | * for a 256-bit fd_set) | ||
85 | */ | ||
86 | #undef __FD_ZERO | ||
87 | static __inline__ void __FD_ZERO(__kernel_fd_set *p) | ||
88 | { | ||
89 | unsigned long *tmp = p->fds_bits; | ||
90 | int i; | ||
91 | |||
92 | if (__builtin_constant_p(__FDSET_LONGS)) { | ||
93 | switch (__FDSET_LONGS) { | ||
94 | case 16: | ||
95 | tmp[ 0] = 0; tmp[ 1] = 0; tmp[ 2] = 0; tmp[ 3] = 0; | ||
96 | tmp[ 4] = 0; tmp[ 5] = 0; tmp[ 6] = 0; tmp[ 7] = 0; | ||
97 | tmp[ 8] = 0; tmp[ 9] = 0; tmp[10] = 0; tmp[11] = 0; | ||
98 | tmp[12] = 0; tmp[13] = 0; tmp[14] = 0; tmp[15] = 0; | ||
99 | return; | ||
100 | |||
101 | case 8: | ||
102 | tmp[ 0] = 0; tmp[ 1] = 0; tmp[ 2] = 0; tmp[ 3] = 0; | ||
103 | tmp[ 4] = 0; tmp[ 5] = 0; tmp[ 6] = 0; tmp[ 7] = 0; | ||
104 | return; | ||
105 | |||
106 | case 4: | ||
107 | tmp[ 0] = 0; tmp[ 1] = 0; tmp[ 2] = 0; tmp[ 3] = 0; | ||
108 | return; | ||
109 | } | ||
110 | } | ||
111 | i = __FDSET_LONGS; | ||
112 | while (i) { | ||
113 | i--; | ||
114 | *tmp = 0; | ||
115 | tmp++; | ||
116 | } | ||
117 | } | ||
118 | 15 | ||
119 | #endif /* __GNUC__ */ | 16 | typedef unsigned long __kernel_sigset_t; /* at least 32 bits */ |
120 | 17 | ||
121 | #endif /* __KERNEL__ */ | 18 | #include <asm-generic/posix_types.h> |
122 | 19 | ||
123 | #endif /* _ALPHA_POSIX_TYPES_H */ | 20 | #endif /* _ALPHA_POSIX_TYPES_H */ |
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/socket.h b/arch/alpha/include/asm/socket.h index 082355f159e6..dcb221a4b5be 100644 --- a/arch/alpha/include/asm/socket.h +++ b/arch/alpha/include/asm/socket.h | |||
@@ -71,6 +71,10 @@ | |||
71 | 71 | ||
72 | #define SO_WIFI_STATUS 41 | 72 | #define SO_WIFI_STATUS 41 |
73 | #define SCM_WIFI_STATUS SO_WIFI_STATUS | 73 | #define SCM_WIFI_STATUS SO_WIFI_STATUS |
74 | #define SO_PEEK_OFF 42 | ||
75 | |||
76 | /* Instruct lower device to use last 4-bytes of skb data as FCS */ | ||
77 | #define SO_NOFCS 43 | ||
74 | 78 | ||
75 | /* O_NONBLOCK clashes with the bits used for socket types. Therefore we | 79 | /* O_NONBLOCK clashes with the bits used for socket types. Therefore we |
76 | * have to define SOCK_NONBLOCK to a different value here. | 80 | * have to define SOCK_NONBLOCK to a different value here. |
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 | |||
4 | enum 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 | |||
28 | enum 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 | |||
5 | struct task_struct; | ||
6 | extern 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 deleted file mode 100644 index 9f78e6934637..000000000000 --- a/arch/alpha/include/asm/system.h +++ /dev/null | |||
@@ -1,354 +0,0 @@ | |||
1 | #ifndef __ALPHA_SYSTEM_H | ||
2 | #define __ALPHA_SYSTEM_H | ||
3 | |||
4 | #include <asm/pal.h> | ||
5 | #include <asm/page.h> | ||
6 | #include <asm/barrier.h> | ||
7 | |||
8 | /* | ||
9 | * System defines.. Note that this is included both from .c and .S | ||
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 | */ | ||
57 | struct 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 | */ | ||
73 | struct 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 | |||
107 | struct 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 | |||
131 | extern 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 | |||
140 | struct task_struct; | ||
141 | extern 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 | |||
149 | enum 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 | |||
173 | enum 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) \ | ||
187 | extern 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) \ | ||
199 | extern 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) \ | ||
210 | extern 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) \ | ||
222 | extern 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) \ | ||
235 | extern 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/binfmt_loader.c b/arch/alpha/kernel/binfmt_loader.c index 3fcfad410130..d1f474d1d44d 100644 --- a/arch/alpha/kernel/binfmt_loader.c +++ b/arch/alpha/kernel/binfmt_loader.c | |||
@@ -46,6 +46,7 @@ static struct linux_binfmt loader_format = { | |||
46 | 46 | ||
47 | static int __init init_loader_binfmt(void) | 47 | static int __init init_loader_binfmt(void) |
48 | { | 48 | { |
49 | return insert_binfmt(&loader_format); | 49 | insert_binfmt(&loader_format); |
50 | return 0; | ||
50 | } | 51 | } |
51 | arch_initcall(init_loader_binfmt); | 52 | arch_initcall(init_loader_binfmt); |
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 | |||
10 | union el_timestamp; | 12 | union el_timestamp; |
11 | struct el_subpacket; | 13 | struct el_subpacket; |
12 | struct ev7_lf_subpackets; | 14 | struct 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 |
17 | swapper_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/pci-noop.c b/arch/alpha/kernel/pci-noop.c index 04eea4894ef3..df24b76f9246 100644 --- a/arch/alpha/kernel/pci-noop.c +++ b/arch/alpha/kernel/pci-noop.c | |||
@@ -108,7 +108,8 @@ sys_pciconfig_write(unsigned long bus, unsigned long dfn, | |||
108 | } | 108 | } |
109 | 109 | ||
110 | static void *alpha_noop_alloc_coherent(struct device *dev, size_t size, | 110 | static void *alpha_noop_alloc_coherent(struct device *dev, size_t size, |
111 | dma_addr_t *dma_handle, gfp_t gfp) | 111 | dma_addr_t *dma_handle, gfp_t gfp, |
112 | struct dma_attrs *attrs) | ||
112 | { | 113 | { |
113 | void *ret; | 114 | void *ret; |
114 | 115 | ||
@@ -123,7 +124,8 @@ static void *alpha_noop_alloc_coherent(struct device *dev, size_t size, | |||
123 | } | 124 | } |
124 | 125 | ||
125 | static void alpha_noop_free_coherent(struct device *dev, size_t size, | 126 | static void alpha_noop_free_coherent(struct device *dev, size_t size, |
126 | void *cpu_addr, dma_addr_t dma_addr) | 127 | void *cpu_addr, dma_addr_t dma_addr, |
128 | struct dma_attrs *attrs) | ||
127 | { | 129 | { |
128 | free_pages((unsigned long)cpu_addr, get_order(size)); | 130 | free_pages((unsigned long)cpu_addr, get_order(size)); |
129 | } | 131 | } |
@@ -174,8 +176,8 @@ static int alpha_noop_set_mask(struct device *dev, u64 mask) | |||
174 | } | 176 | } |
175 | 177 | ||
176 | struct dma_map_ops alpha_noop_ops = { | 178 | struct dma_map_ops alpha_noop_ops = { |
177 | .alloc_coherent = alpha_noop_alloc_coherent, | 179 | .alloc = alpha_noop_alloc_coherent, |
178 | .free_coherent = alpha_noop_free_coherent, | 180 | .free = alpha_noop_free_coherent, |
179 | .map_page = alpha_noop_map_page, | 181 | .map_page = alpha_noop_map_page, |
180 | .map_sg = alpha_noop_map_sg, | 182 | .map_sg = alpha_noop_map_sg, |
181 | .mapping_error = alpha_noop_mapping_error, | 183 | .mapping_error = alpha_noop_mapping_error, |
diff --git a/arch/alpha/kernel/pci.c b/arch/alpha/kernel/pci.c index 8c723c1b086a..1a629636cc16 100644 --- a/arch/alpha/kernel/pci.c +++ b/arch/alpha/kernel/pci.c | |||
@@ -43,12 +43,10 @@ const char *const pci_mem_names[] = { | |||
43 | 43 | ||
44 | const char pci_hae0_name[] = "HAE0"; | 44 | const char pci_hae0_name[] = "HAE0"; |
45 | 45 | ||
46 | /* Indicate whether we respect the PCI setup left by console. */ | ||
47 | /* | 46 | /* |
48 | * Make this long-lived so that we know when shutting down | 47 | * If PCI_PROBE_ONLY in pci_flags is set, we don't change any PCI resource |
49 | * whether we probed only or not. | 48 | * assignments. |
50 | */ | 49 | */ |
51 | int pci_probe_only; | ||
52 | 50 | ||
53 | /* | 51 | /* |
54 | * The PCI controller list. | 52 | * The PCI controller list. |
@@ -215,7 +213,7 @@ pdev_save_srm_config(struct pci_dev *dev) | |||
215 | struct pdev_srm_saved_conf *tmp; | 213 | struct pdev_srm_saved_conf *tmp; |
216 | static int printed = 0; | 214 | static int printed = 0; |
217 | 215 | ||
218 | if (!alpha_using_srm || pci_probe_only) | 216 | if (!alpha_using_srm || pci_has_flag(PCI_PROBE_ONLY)) |
219 | return; | 217 | return; |
220 | 218 | ||
221 | if (!printed) { | 219 | if (!printed) { |
@@ -242,7 +240,7 @@ pci_restore_srm_config(void) | |||
242 | struct pdev_srm_saved_conf *tmp; | 240 | struct pdev_srm_saved_conf *tmp; |
243 | 241 | ||
244 | /* No need to restore if probed only. */ | 242 | /* No need to restore if probed only. */ |
245 | if (pci_probe_only) | 243 | if (pci_has_flag(PCI_PROBE_ONLY)) |
246 | return; | 244 | return; |
247 | 245 | ||
248 | /* Restore SRM config. */ | 246 | /* Restore SRM config. */ |
@@ -253,46 +251,17 @@ pci_restore_srm_config(void) | |||
253 | #endif | 251 | #endif |
254 | 252 | ||
255 | void __devinit | 253 | void __devinit |
256 | pcibios_fixup_resource(struct resource *res, struct resource *root) | ||
257 | { | ||
258 | res->start += root->start; | ||
259 | res->end += root->start; | ||
260 | } | ||
261 | |||
262 | void __devinit | ||
263 | pcibios_fixup_device_resources(struct pci_dev *dev, struct pci_bus *bus) | ||
264 | { | ||
265 | /* Update device resources. */ | ||
266 | struct pci_controller *hose = (struct pci_controller *)bus->sysdata; | ||
267 | int i; | ||
268 | |||
269 | for (i = 0; i < PCI_NUM_RESOURCES; i++) { | ||
270 | if (!dev->resource[i].start) | ||
271 | continue; | ||
272 | if (dev->resource[i].flags & IORESOURCE_IO) | ||
273 | pcibios_fixup_resource(&dev->resource[i], | ||
274 | hose->io_space); | ||
275 | else if (dev->resource[i].flags & IORESOURCE_MEM) | ||
276 | pcibios_fixup_resource(&dev->resource[i], | ||
277 | hose->mem_space); | ||
278 | } | ||
279 | } | ||
280 | |||
281 | void __devinit | ||
282 | pcibios_fixup_bus(struct pci_bus *bus) | 254 | pcibios_fixup_bus(struct pci_bus *bus) |
283 | { | 255 | { |
284 | struct pci_dev *dev = bus->self; | 256 | struct pci_dev *dev = bus->self; |
285 | 257 | ||
286 | if (pci_probe_only && dev && | 258 | if (pci_has_flag(PCI_PROBE_ONLY) && dev && |
287 | (dev->class >> 8) == PCI_CLASS_BRIDGE_PCI) { | 259 | (dev->class >> 8) == PCI_CLASS_BRIDGE_PCI) { |
288 | pci_read_bridge_bases(bus); | 260 | pci_read_bridge_bases(bus); |
289 | pcibios_fixup_device_resources(dev, bus); | ||
290 | } | 261 | } |
291 | 262 | ||
292 | list_for_each_entry(dev, &bus->devices, bus_list) { | 263 | list_for_each_entry(dev, &bus->devices, bus_list) { |
293 | pdev_save_srm_config(dev); | 264 | pdev_save_srm_config(dev); |
294 | if ((dev->class >> 8) != PCI_CLASS_BRIDGE_PCI) | ||
295 | pcibios_fixup_device_resources(dev, bus); | ||
296 | } | 265 | } |
297 | } | 266 | } |
298 | 267 | ||
@@ -302,42 +271,6 @@ pcibios_update_irq(struct pci_dev *dev, int irq) | |||
302 | pci_write_config_byte(dev, PCI_INTERRUPT_LINE, irq); | 271 | pci_write_config_byte(dev, PCI_INTERRUPT_LINE, irq); |
303 | } | 272 | } |
304 | 273 | ||
305 | void | ||
306 | pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region, | ||
307 | struct resource *res) | ||
308 | { | ||
309 | struct pci_controller *hose = (struct pci_controller *)dev->sysdata; | ||
310 | unsigned long offset = 0; | ||
311 | |||
312 | if (res->flags & IORESOURCE_IO) | ||
313 | offset = hose->io_space->start; | ||
314 | else if (res->flags & IORESOURCE_MEM) | ||
315 | offset = hose->mem_space->start; | ||
316 | |||
317 | region->start = res->start - offset; | ||
318 | region->end = res->end - offset; | ||
319 | } | ||
320 | |||
321 | void pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res, | ||
322 | struct pci_bus_region *region) | ||
323 | { | ||
324 | struct pci_controller *hose = (struct pci_controller *)dev->sysdata; | ||
325 | unsigned long offset = 0; | ||
326 | |||
327 | if (res->flags & IORESOURCE_IO) | ||
328 | offset = hose->io_space->start; | ||
329 | else if (res->flags & IORESOURCE_MEM) | ||
330 | offset = hose->mem_space->start; | ||
331 | |||
332 | res->start = region->start + offset; | ||
333 | res->end = region->end + offset; | ||
334 | } | ||
335 | |||
336 | #ifdef CONFIG_HOTPLUG | ||
337 | EXPORT_SYMBOL(pcibios_resource_to_bus); | ||
338 | EXPORT_SYMBOL(pcibios_bus_to_resource); | ||
339 | #endif | ||
340 | |||
341 | int | 274 | int |
342 | pcibios_enable_device(struct pci_dev *dev, int mask) | 275 | pcibios_enable_device(struct pci_dev *dev, int mask) |
343 | { | 276 | { |
@@ -374,7 +307,8 @@ pcibios_claim_one_bus(struct pci_bus *b) | |||
374 | 307 | ||
375 | if (r->parent || !r->start || !r->flags) | 308 | if (r->parent || !r->start || !r->flags) |
376 | continue; | 309 | continue; |
377 | if (pci_probe_only || (r->flags & IORESOURCE_PCI_FIXED)) | 310 | if (pci_has_flag(PCI_PROBE_ONLY) || |
311 | (r->flags & IORESOURCE_PCI_FIXED)) | ||
378 | pci_claim_resource(dev, i); | 312 | pci_claim_resource(dev, i); |
379 | } | 313 | } |
380 | } | 314 | } |
@@ -416,8 +350,10 @@ common_init_pci(void) | |||
416 | hose->mem_space->end = end; | 350 | hose->mem_space->end = end; |
417 | 351 | ||
418 | INIT_LIST_HEAD(&resources); | 352 | INIT_LIST_HEAD(&resources); |
419 | pci_add_resource(&resources, hose->io_space); | 353 | pci_add_resource_offset(&resources, hose->io_space, |
420 | pci_add_resource(&resources, hose->mem_space); | 354 | hose->io_space->start); |
355 | pci_add_resource_offset(&resources, hose->mem_space, | ||
356 | hose->mem_space->start); | ||
421 | 357 | ||
422 | bus = pci_scan_root_bus(NULL, next_busno, alpha_mv.pci_ops, | 358 | bus = pci_scan_root_bus(NULL, next_busno, alpha_mv.pci_ops, |
423 | hose, &resources); | 359 | hose, &resources); |
diff --git a/arch/alpha/kernel/pci_impl.h b/arch/alpha/kernel/pci_impl.h index 85457b2d4516..2b0ac429f5eb 100644 --- a/arch/alpha/kernel/pci_impl.h +++ b/arch/alpha/kernel/pci_impl.h | |||
@@ -173,9 +173,6 @@ extern void pci_restore_srm_config(void); | |||
173 | extern struct pci_controller *hose_head, **hose_tail; | 173 | extern struct pci_controller *hose_head, **hose_tail; |
174 | extern struct pci_controller *pci_isa_hose; | 174 | extern struct pci_controller *pci_isa_hose; |
175 | 175 | ||
176 | /* Indicate that we trust the console to configure things properly. */ | ||
177 | extern int pci_probe_only; | ||
178 | |||
179 | extern unsigned long alpha_agpgart_size; | 176 | extern unsigned long alpha_agpgart_size; |
180 | 177 | ||
181 | extern void common_init_pci(void); | 178 | extern void common_init_pci(void); |
diff --git a/arch/alpha/kernel/pci_iommu.c b/arch/alpha/kernel/pci_iommu.c index 9460b90077ca..3f844d26d2c7 100644 --- a/arch/alpha/kernel/pci_iommu.c +++ b/arch/alpha/kernel/pci_iommu.c | |||
@@ -434,7 +434,8 @@ static void alpha_pci_unmap_page(struct device *dev, dma_addr_t dma_addr, | |||
434 | else DMA_ADDRP is undefined. */ | 434 | else DMA_ADDRP is undefined. */ |
435 | 435 | ||
436 | static void *alpha_pci_alloc_coherent(struct device *dev, size_t size, | 436 | static void *alpha_pci_alloc_coherent(struct device *dev, size_t size, |
437 | dma_addr_t *dma_addrp, gfp_t gfp) | 437 | dma_addr_t *dma_addrp, gfp_t gfp, |
438 | struct dma_attrs *attrs) | ||
438 | { | 439 | { |
439 | struct pci_dev *pdev = alpha_gendev_to_pci(dev); | 440 | struct pci_dev *pdev = alpha_gendev_to_pci(dev); |
440 | void *cpu_addr; | 441 | void *cpu_addr; |
@@ -478,7 +479,8 @@ try_again: | |||
478 | DMA_ADDR past this call are illegal. */ | 479 | DMA_ADDR past this call are illegal. */ |
479 | 480 | ||
480 | static void alpha_pci_free_coherent(struct device *dev, size_t size, | 481 | static void alpha_pci_free_coherent(struct device *dev, size_t size, |
481 | void *cpu_addr, dma_addr_t dma_addr) | 482 | void *cpu_addr, dma_addr_t dma_addr, |
483 | struct dma_attrs *attrs) | ||
482 | { | 484 | { |
483 | struct pci_dev *pdev = alpha_gendev_to_pci(dev); | 485 | struct pci_dev *pdev = alpha_gendev_to_pci(dev); |
484 | pci_unmap_single(pdev, dma_addr, size, PCI_DMA_BIDIRECTIONAL); | 486 | pci_unmap_single(pdev, dma_addr, size, PCI_DMA_BIDIRECTIONAL); |
@@ -952,8 +954,8 @@ static int alpha_pci_set_mask(struct device *dev, u64 mask) | |||
952 | } | 954 | } |
953 | 955 | ||
954 | struct dma_map_ops alpha_pci_ops = { | 956 | struct dma_map_ops alpha_pci_ops = { |
955 | .alloc_coherent = alpha_pci_alloc_coherent, | 957 | .alloc = alpha_pci_alloc_coherent, |
956 | .free_coherent = alpha_pci_free_coherent, | 958 | .free = alpha_pci_free_coherent, |
957 | .map_page = alpha_pci_map_page, | 959 | .map_page = alpha_pci_map_page, |
958 | .unmap_page = alpha_pci_unmap_page, | 960 | .unmap_page = alpha_pci_unmap_page, |
959 | .map_sg = alpha_pci_map_sg, | 961 | .map_sg = alpha_pci_map_sg, |
diff --git a/arch/alpha/kernel/perf_event.c b/arch/alpha/kernel/perf_event.c index 8143cd7cdbfb..0dae252f7a33 100644 --- a/arch/alpha/kernel/perf_event.c +++ b/arch/alpha/kernel/perf_event.c | |||
@@ -685,6 +685,10 @@ static int alpha_pmu_event_init(struct perf_event *event) | |||
685 | { | 685 | { |
686 | int err; | 686 | int err; |
687 | 687 | ||
688 | /* does not support taken branch sampling */ | ||
689 | if (has_branch_stack(event)) | ||
690 | return -EOPNOTSUPP; | ||
691 | |||
688 | switch (event->attr.type) { | 692 | switch (event->attr.type) { |
689 | case PERF_TYPE_RAW: | 693 | case PERF_TYPE_RAW: |
690 | case PERF_TYPE_HARDWARE: | 694 | case PERF_TYPE_HARDWARE: |
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/signal.c b/arch/alpha/kernel/signal.c index 6f7feb5db271..35f2ef44de12 100644 --- a/arch/alpha/kernel/signal.c +++ b/arch/alpha/kernel/signal.c | |||
@@ -120,12 +120,13 @@ SYSCALL_DEFINE5(rt_sigaction, int, sig, const struct sigaction __user *, act, | |||
120 | */ | 120 | */ |
121 | SYSCALL_DEFINE1(sigsuspend, old_sigset_t, mask) | 121 | SYSCALL_DEFINE1(sigsuspend, old_sigset_t, mask) |
122 | { | 122 | { |
123 | mask &= _BLOCKABLE; | 123 | sigset_t blocked; |
124 | spin_lock_irq(¤t->sighand->siglock); | 124 | |
125 | current->saved_sigmask = current->blocked; | 125 | current->saved_sigmask = current->blocked; |
126 | siginitset(¤t->blocked, mask); | 126 | |
127 | recalc_sigpending(); | 127 | mask &= _BLOCKABLE; |
128 | spin_unlock_irq(¤t->sighand->siglock); | 128 | siginitset(&blocked, mask); |
129 | set_current_blocked(&blocked); | ||
129 | 130 | ||
130 | current->state = TASK_INTERRUPTIBLE; | 131 | current->state = TASK_INTERRUPTIBLE; |
131 | schedule(); | 132 | schedule(); |
@@ -238,10 +239,7 @@ do_sigreturn(struct sigcontext __user *sc, struct pt_regs *regs, | |||
238 | goto give_sigsegv; | 239 | goto give_sigsegv; |
239 | 240 | ||
240 | sigdelsetmask(&set, ~_BLOCKABLE); | 241 | sigdelsetmask(&set, ~_BLOCKABLE); |
241 | spin_lock_irq(¤t->sighand->siglock); | 242 | set_current_blocked(&set); |
242 | current->blocked = set; | ||
243 | recalc_sigpending(); | ||
244 | spin_unlock_irq(¤t->sighand->siglock); | ||
245 | 243 | ||
246 | if (restore_sigcontext(sc, regs, sw)) | 244 | if (restore_sigcontext(sc, regs, sw)) |
247 | goto give_sigsegv; | 245 | goto give_sigsegv; |
@@ -276,10 +274,7 @@ do_rt_sigreturn(struct rt_sigframe __user *frame, struct pt_regs *regs, | |||
276 | goto give_sigsegv; | 274 | goto give_sigsegv; |
277 | 275 | ||
278 | sigdelsetmask(&set, ~_BLOCKABLE); | 276 | sigdelsetmask(&set, ~_BLOCKABLE); |
279 | spin_lock_irq(¤t->sighand->siglock); | 277 | set_current_blocked(&set); |
280 | current->blocked = set; | ||
281 | recalc_sigpending(); | ||
282 | spin_unlock_irq(¤t->sighand->siglock); | ||
283 | 278 | ||
284 | if (restore_sigcontext(&frame->uc.uc_mcontext, regs, sw)) | 279 | if (restore_sigcontext(&frame->uc.uc_mcontext, regs, sw)) |
285 | goto give_sigsegv; | 280 | goto give_sigsegv; |
@@ -501,14 +496,8 @@ handle_signal(int sig, struct k_sigaction *ka, siginfo_t *info, | |||
501 | else | 496 | else |
502 | ret = setup_frame(sig, ka, oldset, regs, sw); | 497 | ret = setup_frame(sig, ka, oldset, regs, sw); |
503 | 498 | ||
504 | if (ret == 0) { | 499 | if (ret == 0) |
505 | spin_lock_irq(¤t->sighand->siglock); | 500 | block_sigmask(ka, sig); |
506 | sigorsets(¤t->blocked,¤t->blocked,&ka->sa.sa_mask); | ||
507 | if (!(ka->sa.sa_flags & SA_NODEFER)) | ||
508 | sigaddset(¤t->blocked,sig); | ||
509 | recalc_sigpending(); | ||
510 | spin_unlock_irq(¤t->sighand->siglock); | ||
511 | } | ||
512 | 501 | ||
513 | return ret; | 502 | return ret; |
514 | } | 503 | } |
diff --git a/arch/alpha/kernel/smp.c b/arch/alpha/kernel/smp.c index 4087a569b43b..50d438db1f6b 100644 --- a/arch/alpha/kernel/smp.c +++ b/arch/alpha/kernel/smp.c | |||
@@ -450,7 +450,7 @@ setup_smp(void) | |||
450 | smp_num_probed = 1; | 450 | smp_num_probed = 1; |
451 | } | 451 | } |
452 | 452 | ||
453 | printk(KERN_INFO "SMP: %d CPUs probed -- cpu_present_map = %lx\n", | 453 | printk(KERN_INFO "SMP: %d CPUs probed -- cpu_present_mask = %lx\n", |
454 | smp_num_probed, cpumask_bits(cpu_present_mask)[0]); | 454 | smp_num_probed, cpumask_bits(cpu_present_mask)[0]); |
455 | } | 455 | } |
456 | 456 | ||
diff --git a/arch/alpha/kernel/srmcons.c b/arch/alpha/kernel/srmcons.c index 783f4e50c111..3ea809430eda 100644 --- a/arch/alpha/kernel/srmcons.c +++ b/arch/alpha/kernel/srmcons.c | |||
@@ -30,10 +30,9 @@ static int srm_is_registered_console = 0; | |||
30 | #define MAX_SRM_CONSOLE_DEVICES 1 /* only support 1 console device */ | 30 | #define MAX_SRM_CONSOLE_DEVICES 1 /* only support 1 console device */ |
31 | 31 | ||
32 | struct srmcons_private { | 32 | struct srmcons_private { |
33 | struct tty_struct *tty; | 33 | struct tty_port port; |
34 | struct timer_list timer; | 34 | struct timer_list timer; |
35 | spinlock_t lock; | 35 | } srmcons_singleton; |
36 | }; | ||
37 | 36 | ||
38 | typedef union _srmcons_result { | 37 | typedef union _srmcons_result { |
39 | struct { | 38 | struct { |
@@ -68,22 +67,21 @@ static void | |||
68 | srmcons_receive_chars(unsigned long data) | 67 | srmcons_receive_chars(unsigned long data) |
69 | { | 68 | { |
70 | struct srmcons_private *srmconsp = (struct srmcons_private *)data; | 69 | struct srmcons_private *srmconsp = (struct srmcons_private *)data; |
70 | struct tty_port *port = &srmconsp->port; | ||
71 | unsigned long flags; | 71 | unsigned long flags; |
72 | int incr = 10; | 72 | int incr = 10; |
73 | 73 | ||
74 | local_irq_save(flags); | 74 | local_irq_save(flags); |
75 | if (spin_trylock(&srmcons_callback_lock)) { | 75 | if (spin_trylock(&srmcons_callback_lock)) { |
76 | if (!srmcons_do_receive_chars(srmconsp->tty)) | 76 | if (!srmcons_do_receive_chars(port->tty)) |
77 | incr = 100; | 77 | incr = 100; |
78 | spin_unlock(&srmcons_callback_lock); | 78 | spin_unlock(&srmcons_callback_lock); |
79 | } | 79 | } |
80 | 80 | ||
81 | spin_lock(&srmconsp->lock); | 81 | spin_lock(&port->lock); |
82 | if (srmconsp->tty) { | 82 | if (port->tty) |
83 | srmconsp->timer.expires = jiffies + incr; | 83 | mod_timer(&srmconsp->timer, jiffies + incr); |
84 | add_timer(&srmconsp->timer); | 84 | spin_unlock(&port->lock); |
85 | } | ||
86 | spin_unlock(&srmconsp->lock); | ||
87 | 85 | ||
88 | local_irq_restore(flags); | 86 | local_irq_restore(flags); |
89 | } | 87 | } |
@@ -156,56 +154,22 @@ srmcons_chars_in_buffer(struct tty_struct *tty) | |||
156 | } | 154 | } |
157 | 155 | ||
158 | static int | 156 | static int |
159 | srmcons_get_private_struct(struct srmcons_private **ps) | ||
160 | { | ||
161 | static struct srmcons_private *srmconsp = NULL; | ||
162 | static DEFINE_SPINLOCK(srmconsp_lock); | ||
163 | unsigned long flags; | ||
164 | int retval = 0; | ||
165 | |||
166 | if (srmconsp == NULL) { | ||
167 | srmconsp = kmalloc(sizeof(*srmconsp), GFP_KERNEL); | ||
168 | spin_lock_irqsave(&srmconsp_lock, flags); | ||
169 | |||
170 | if (srmconsp == NULL) | ||
171 | retval = -ENOMEM; | ||
172 | else { | ||
173 | srmconsp->tty = NULL; | ||
174 | spin_lock_init(&srmconsp->lock); | ||
175 | init_timer(&srmconsp->timer); | ||
176 | } | ||
177 | |||
178 | spin_unlock_irqrestore(&srmconsp_lock, flags); | ||
179 | } | ||
180 | |||
181 | *ps = srmconsp; | ||
182 | return retval; | ||
183 | } | ||
184 | |||
185 | static int | ||
186 | srmcons_open(struct tty_struct *tty, struct file *filp) | 157 | srmcons_open(struct tty_struct *tty, struct file *filp) |
187 | { | 158 | { |
188 | struct srmcons_private *srmconsp; | 159 | struct srmcons_private *srmconsp = &srmcons_singleton; |
160 | struct tty_port *port = &srmconsp->port; | ||
189 | unsigned long flags; | 161 | unsigned long flags; |
190 | int retval; | ||
191 | |||
192 | retval = srmcons_get_private_struct(&srmconsp); | ||
193 | if (retval) | ||
194 | return retval; | ||
195 | 162 | ||
196 | spin_lock_irqsave(&srmconsp->lock, flags); | 163 | spin_lock_irqsave(&port->lock, flags); |
197 | 164 | ||
198 | if (!srmconsp->tty) { | 165 | if (!port->tty) { |
199 | tty->driver_data = srmconsp; | 166 | tty->driver_data = srmconsp; |
200 | 167 | tty->port = port; | |
201 | srmconsp->tty = tty; | 168 | port->tty = tty; /* XXX proper refcounting */ |
202 | srmconsp->timer.function = srmcons_receive_chars; | 169 | mod_timer(&srmconsp->timer, jiffies + 10); |
203 | srmconsp->timer.data = (unsigned long)srmconsp; | ||
204 | srmconsp->timer.expires = jiffies + 10; | ||
205 | add_timer(&srmconsp->timer); | ||
206 | } | 170 | } |
207 | 171 | ||
208 | spin_unlock_irqrestore(&srmconsp->lock, flags); | 172 | spin_unlock_irqrestore(&port->lock, flags); |
209 | 173 | ||
210 | return 0; | 174 | return 0; |
211 | } | 175 | } |
@@ -214,16 +178,17 @@ static void | |||
214 | srmcons_close(struct tty_struct *tty, struct file *filp) | 178 | srmcons_close(struct tty_struct *tty, struct file *filp) |
215 | { | 179 | { |
216 | struct srmcons_private *srmconsp = tty->driver_data; | 180 | struct srmcons_private *srmconsp = tty->driver_data; |
181 | struct tty_port *port = &srmconsp->port; | ||
217 | unsigned long flags; | 182 | unsigned long flags; |
218 | 183 | ||
219 | spin_lock_irqsave(&srmconsp->lock, flags); | 184 | spin_lock_irqsave(&port->lock, flags); |
220 | 185 | ||
221 | if (tty->count == 1) { | 186 | if (tty->count == 1) { |
222 | srmconsp->tty = NULL; | 187 | port->tty = NULL; |
223 | del_timer(&srmconsp->timer); | 188 | del_timer(&srmconsp->timer); |
224 | } | 189 | } |
225 | 190 | ||
226 | spin_unlock_irqrestore(&srmconsp->lock, flags); | 191 | spin_unlock_irqrestore(&port->lock, flags); |
227 | } | 192 | } |
228 | 193 | ||
229 | 194 | ||
@@ -240,6 +205,9 @@ static const struct tty_operations srmcons_ops = { | |||
240 | static int __init | 205 | static int __init |
241 | srmcons_init(void) | 206 | srmcons_init(void) |
242 | { | 207 | { |
208 | tty_port_init(&srmcons_singleton.port); | ||
209 | setup_timer(&srmcons_singleton.timer, srmcons_receive_chars, | ||
210 | (unsigned long)&srmcons_singleton); | ||
243 | if (srm_is_registered_console) { | 211 | if (srm_is_registered_console) { |
244 | struct tty_driver *driver; | 212 | struct tty_driver *driver; |
245 | int err; | 213 | int err; |
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..14a4b6a7cf59 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> |
@@ -384,7 +383,8 @@ marvel_init_pci(void) | |||
384 | 383 | ||
385 | marvel_register_error_handlers(); | 384 | marvel_register_error_handlers(); |
386 | 385 | ||
387 | pci_probe_only = 1; | 386 | /* Indicate that we trust the console to configure things properly */ |
387 | pci_set_flags(PCI_PROBE_ONLY); | ||
388 | common_init_pci(); | 388 | common_init_pci(); |
389 | locate_and_init_vga(NULL); | 389 | locate_and_init_vga(NULL); |
390 | 390 | ||
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..2533db280d9b 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> |
@@ -331,7 +330,8 @@ titan_init_pci(void) | |||
331 | */ | 330 | */ |
332 | titan_late_init(); | 331 | titan_late_init(); |
333 | 332 | ||
334 | pci_probe_only = 1; | 333 | /* Indicate that we trust the console to configure things properly */ |
334 | pci_set_flags(PCI_PROBE_ONLY); | ||
335 | common_init_pci(); | 335 | common_init_pci(); |
336 | SMC669_Init(0); | 336 | SMC669_Init(0); |
337 | locate_and_init_vga(NULL); | 337 | locate_and_init_vga(NULL); |
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 | ||
6 | OUTPUT_FORMAT("elf64-alpha") | 7 | OUTPUT_FORMAT("elf64-alpha") |
7 | OUTPUT_ARCH(alpha) | 8 | OUTPUT_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 | ||
4 | typedef unsigned int instr; | 3 | typedef 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 | ||
30 | extern void die_if_kernel(char *,struct pt_regs *,long, unsigned long *); | 29 | extern 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 | ||
35 | extern void die_if_kernel(char *,struct pt_regs *,long); | 35 | extern 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 | ||