diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-12-19 17:29:23 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-12-19 17:29:23 -0500 |
commit | 4486c5f510463673d2ea57b46137086f5b21ef36 (patch) | |
tree | d0ce078604b5eb148754f4d02029c862cdc6c35f /include/asm-ia64 | |
parent | f941b168a4d7281bf49e166f2febc49470c0149f (diff) | |
parent | ed5d4026ae6f51bec25e03a891a7d59c492577ab (diff) |
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
[IA64] Adjust CMCI mask on CPU hotplug
[IA64] make flush_tlb_kernel_range() an inline function
[IA64] Guard elfcorehdr_addr with #if CONFIG_PROC_FS
[IA64] Fix Altix BTE error return status
[IA64] Remove assembler warnings on head.S
[IA64] Remove compiler warinings about uninitialized variable in irq_ia64.c
[IA64] set_thread_area fails in IA32 chroot
[IA64] print kernel release in OOPS to make kerneloops.org happy
[IA64] Two trivial spelling fixes
[IA64] Avoid unnecessary TLB flushes when allocating memory
[IA64] ia32 nopage
[IA64] signal: remove redundant code in setup_sigcontext()
IA64: Slim down __clear_bit_unlock
Diffstat (limited to 'include/asm-ia64')
-rw-r--r-- | include/asm-ia64/bitops.h | 17 | ||||
-rw-r--r-- | include/asm-ia64/gcc_intrin.h | 5 | ||||
-rw-r--r-- | include/asm-ia64/hw_irq.h | 2 | ||||
-rw-r--r-- | include/asm-ia64/intel_intrin.h | 3 | ||||
-rw-r--r-- | include/asm-ia64/sn/bte.h | 31 | ||||
-rw-r--r-- | include/asm-ia64/sn/xp.h | 27 | ||||
-rw-r--r-- | include/asm-ia64/sn/xpc.h | 8 | ||||
-rw-r--r-- | include/asm-ia64/tlbflush.h | 6 |
8 files changed, 90 insertions, 9 deletions
diff --git a/include/asm-ia64/bitops.h b/include/asm-ia64/bitops.h index a977affaebec..a1b9719f5fbb 100644 --- a/include/asm-ia64/bitops.h +++ b/include/asm-ia64/bitops.h | |||
@@ -124,10 +124,21 @@ clear_bit_unlock (int nr, volatile void *addr) | |||
124 | /** | 124 | /** |
125 | * __clear_bit_unlock - Non-atomically clear a bit with release | 125 | * __clear_bit_unlock - Non-atomically clear a bit with release |
126 | * | 126 | * |
127 | * This is like clear_bit_unlock, but the implementation may use a non-atomic | 127 | * This is like clear_bit_unlock, but the implementation uses a store |
128 | * store (this one uses an atomic, however). | 128 | * with release semantics. See also __raw_spin_unlock(). |
129 | */ | 129 | */ |
130 | #define __clear_bit_unlock clear_bit_unlock | 130 | static __inline__ void |
131 | __clear_bit_unlock(int nr, volatile void *addr) | ||
132 | { | ||
133 | __u32 mask, new; | ||
134 | volatile __u32 *m; | ||
135 | |||
136 | m = (volatile __u32 *)addr + (nr >> 5); | ||
137 | mask = ~(1 << (nr & 31)); | ||
138 | new = *m & mask; | ||
139 | barrier(); | ||
140 | ia64_st4_rel_nta(m, new); | ||
141 | } | ||
131 | 142 | ||
132 | /** | 143 | /** |
133 | * __clear_bit - Clears a bit in memory (non-atomic version) | 144 | * __clear_bit - Clears a bit in memory (non-atomic version) |
diff --git a/include/asm-ia64/gcc_intrin.h b/include/asm-ia64/gcc_intrin.h index 4fb4e439b05c..e58d3298fa10 100644 --- a/include/asm-ia64/gcc_intrin.h +++ b/include/asm-ia64/gcc_intrin.h | |||
@@ -191,6 +191,11 @@ register unsigned long ia64_r13 asm ("r13") __attribute_used__; | |||
191 | asm volatile ("ldf.fill %0=[%1]" :"=f"(__f__): "r"(x)); \ | 191 | asm volatile ("ldf.fill %0=[%1]" :"=f"(__f__): "r"(x)); \ |
192 | }) | 192 | }) |
193 | 193 | ||
194 | #define ia64_st4_rel_nta(m, val) \ | ||
195 | ({ \ | ||
196 | asm volatile ("st4.rel.nta [%0] = %1\n\t" :: "r"(m), "r"(val)); \ | ||
197 | }) | ||
198 | |||
194 | #define ia64_stfs(x, regnum) \ | 199 | #define ia64_stfs(x, regnum) \ |
195 | ({ \ | 200 | ({ \ |
196 | register double __f__ asm ("f"#regnum); \ | 201 | register double __f__ asm ("f"#regnum); \ |
diff --git a/include/asm-ia64/hw_irq.h b/include/asm-ia64/hw_irq.h index bba5baa3c7fc..7e6e3779670a 100644 --- a/include/asm-ia64/hw_irq.h +++ b/include/asm-ia64/hw_irq.h | |||
@@ -63,7 +63,7 @@ extern int ia64_last_device_vector; | |||
63 | #define IA64_NUM_DEVICE_VECTORS (IA64_LAST_DEVICE_VECTOR - IA64_FIRST_DEVICE_VECTOR + 1) | 63 | #define IA64_NUM_DEVICE_VECTORS (IA64_LAST_DEVICE_VECTOR - IA64_FIRST_DEVICE_VECTOR + 1) |
64 | 64 | ||
65 | #define IA64_MCA_RENDEZ_VECTOR 0xe8 /* MCA rendez interrupt */ | 65 | #define IA64_MCA_RENDEZ_VECTOR 0xe8 /* MCA rendez interrupt */ |
66 | #define IA64_PERFMON_VECTOR 0xee /* performanc monitor interrupt vector */ | 66 | #define IA64_PERFMON_VECTOR 0xee /* performance monitor interrupt vector */ |
67 | #define IA64_TIMER_VECTOR 0xef /* use highest-prio group 15 interrupt for timer */ | 67 | #define IA64_TIMER_VECTOR 0xef /* use highest-prio group 15 interrupt for timer */ |
68 | #define IA64_MCA_WAKEUP_VECTOR 0xf0 /* MCA wakeup (must be >MCA_RENDEZ_VECTOR) */ | 68 | #define IA64_MCA_WAKEUP_VECTOR 0xf0 /* MCA wakeup (must be >MCA_RENDEZ_VECTOR) */ |
69 | #define IA64_IPI_LOCAL_TLB_FLUSH 0xfc /* SMP flush local TLB */ | 69 | #define IA64_IPI_LOCAL_TLB_FLUSH 0xfc /* SMP flush local TLB */ |
diff --git a/include/asm-ia64/intel_intrin.h b/include/asm-ia64/intel_intrin.h index d069b6acddce..a520d103d808 100644 --- a/include/asm-ia64/intel_intrin.h +++ b/include/asm-ia64/intel_intrin.h | |||
@@ -110,6 +110,9 @@ | |||
110 | #define ia64_st4_rel __st4_rel | 110 | #define ia64_st4_rel __st4_rel |
111 | #define ia64_st8_rel __st8_rel | 111 | #define ia64_st8_rel __st8_rel |
112 | 112 | ||
113 | /* FIXME: need st4.rel.nta intrinsic */ | ||
114 | #define ia64_st4_rel_nta __st4_rel | ||
115 | |||
113 | #define ia64_ld1_acq __ld1_acq | 116 | #define ia64_ld1_acq __ld1_acq |
114 | #define ia64_ld2_acq __ld2_acq | 117 | #define ia64_ld2_acq __ld2_acq |
115 | #define ia64_ld4_acq __ld4_acq | 118 | #define ia64_ld4_acq __ld4_acq |
diff --git a/include/asm-ia64/sn/bte.h b/include/asm-ia64/sn/bte.h index 5335d87ca5f8..a0d214f43115 100644 --- a/include/asm-ia64/sn/bte.h +++ b/include/asm-ia64/sn/bte.h | |||
@@ -3,7 +3,7 @@ | |||
3 | * License. See the file "COPYING" in the main directory of this archive | 3 | * License. See the file "COPYING" in the main directory of this archive |
4 | * for more details. | 4 | * for more details. |
5 | * | 5 | * |
6 | * Copyright (c) 2000-2006 Silicon Graphics, Inc. All Rights Reserved. | 6 | * Copyright (c) 2000-2007 Silicon Graphics, Inc. All Rights Reserved. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | 9 | ||
@@ -150,6 +150,35 @@ typedef enum { | |||
150 | BTEFAIL_NOTAVAIL, /* BTE not available */ | 150 | BTEFAIL_NOTAVAIL, /* BTE not available */ |
151 | } bte_result_t; | 151 | } bte_result_t; |
152 | 152 | ||
153 | #define BTEFAIL_SH2_RESP_SHORT 0x1 /* bit 000001 */ | ||
154 | #define BTEFAIL_SH2_RESP_LONG 0x2 /* bit 000010 */ | ||
155 | #define BTEFAIL_SH2_RESP_DSP 0x4 /* bit 000100 */ | ||
156 | #define BTEFAIL_SH2_RESP_ACCESS 0x8 /* bit 001000 */ | ||
157 | #define BTEFAIL_SH2_CRB_TO 0x10 /* bit 010000 */ | ||
158 | #define BTEFAIL_SH2_NACK_LIMIT 0x20 /* bit 100000 */ | ||
159 | #define BTEFAIL_SH2_ALL 0x3F /* bit 111111 */ | ||
160 | |||
161 | #define BTE_ERR_BITS 0x3FUL | ||
162 | #define BTE_ERR_SHIFT 36 | ||
163 | #define BTE_ERR_MASK (BTE_ERR_BITS << BTE_ERR_SHIFT) | ||
164 | |||
165 | #define BTE_ERROR_RETRY(value) \ | ||
166 | (is_shub2() ? (value != BTEFAIL_SH2_CRB_TO) \ | ||
167 | : (value != BTEFAIL_TOUT)) | ||
168 | |||
169 | /* | ||
170 | * On shub1 BTE_ERR_MASK will always be false, so no need for is_shub2() | ||
171 | */ | ||
172 | #define BTE_SHUB2_ERROR(_status) \ | ||
173 | ((_status & BTE_ERR_MASK) \ | ||
174 | ? (((_status >> BTE_ERR_SHIFT) & BTE_ERR_BITS) | IBLS_ERROR) \ | ||
175 | : _status) | ||
176 | |||
177 | #define BTE_GET_ERROR_STATUS(_status) \ | ||
178 | (BTE_SHUB2_ERROR(_status) & ~IBLS_ERROR) | ||
179 | |||
180 | #define BTE_VALID_SH2_ERROR(value) \ | ||
181 | ((value >= BTEFAIL_SH2_RESP_SHORT) && (value <= BTEFAIL_SH2_ALL)) | ||
153 | 182 | ||
154 | /* | 183 | /* |
155 | * Structure defining a bte. An instance of this | 184 | * Structure defining a bte. An instance of this |
diff --git a/include/asm-ia64/sn/xp.h b/include/asm-ia64/sn/xp.h index 6f807e0193b7..f7711b308e48 100644 --- a/include/asm-ia64/sn/xp.h +++ b/include/asm-ia64/sn/xp.h | |||
@@ -86,7 +86,7 @@ xp_bte_copy(u64 src, u64 vdst, u64 len, u64 mode, void *notification) | |||
86 | BUG_ON(REGION_NUMBER(vdst) != RGN_KERNEL); | 86 | BUG_ON(REGION_NUMBER(vdst) != RGN_KERNEL); |
87 | 87 | ||
88 | ret = bte_copy(src, pdst, len, mode, notification); | 88 | ret = bte_copy(src, pdst, len, mode, notification); |
89 | if (ret != BTE_SUCCESS) { | 89 | if ((ret != BTE_SUCCESS) && BTE_ERROR_RETRY(ret)) { |
90 | if (!in_interrupt()) { | 90 | if (!in_interrupt()) { |
91 | cond_resched(); | 91 | cond_resched(); |
92 | } | 92 | } |
@@ -244,7 +244,30 @@ enum xpc_retval { | |||
244 | 244 | ||
245 | xpcDisconnected, /* 51: channel disconnected (closed) */ | 245 | xpcDisconnected, /* 51: channel disconnected (closed) */ |
246 | 246 | ||
247 | xpcUnknownReason /* 52: unknown reason -- must be last in list */ | 247 | xpcBteSh2Start, /* 52: BTE CRB timeout */ |
248 | |||
249 | /* 53: 0x1 BTE Error Response Short */ | ||
250 | xpcBteSh2RspShort = xpcBteSh2Start + BTEFAIL_SH2_RESP_SHORT, | ||
251 | |||
252 | /* 54: 0x2 BTE Error Response Long */ | ||
253 | xpcBteSh2RspLong = xpcBteSh2Start + BTEFAIL_SH2_RESP_LONG, | ||
254 | |||
255 | /* 56: 0x4 BTE Error Response DSB */ | ||
256 | xpcBteSh2RspDSB = xpcBteSh2Start + BTEFAIL_SH2_RESP_DSP, | ||
257 | |||
258 | /* 60: 0x8 BTE Error Response Access */ | ||
259 | xpcBteSh2RspAccess = xpcBteSh2Start + BTEFAIL_SH2_RESP_ACCESS, | ||
260 | |||
261 | /* 68: 0x10 BTE Error CRB timeout */ | ||
262 | xpcBteSh2CRBTO = xpcBteSh2Start + BTEFAIL_SH2_CRB_TO, | ||
263 | |||
264 | /* 84: 0x20 BTE Error NACK limit */ | ||
265 | xpcBteSh2NACKLimit = xpcBteSh2Start + BTEFAIL_SH2_NACK_LIMIT, | ||
266 | |||
267 | /* 115: BTE end */ | ||
268 | xpcBteSh2End = xpcBteSh2Start + BTEFAIL_SH2_ALL, | ||
269 | |||
270 | xpcUnknownReason /* 116: unknown reason -- must be last in list */ | ||
248 | }; | 271 | }; |
249 | 272 | ||
250 | 273 | ||
diff --git a/include/asm-ia64/sn/xpc.h b/include/asm-ia64/sn/xpc.h index e52b8508083b..8e5d7de9c632 100644 --- a/include/asm-ia64/sn/xpc.h +++ b/include/asm-ia64/sn/xpc.h | |||
@@ -3,7 +3,7 @@ | |||
3 | * License. See the file "COPYING" in the main directory of this archive | 3 | * License. See the file "COPYING" in the main directory of this archive |
4 | * for more details. | 4 | * for more details. |
5 | * | 5 | * |
6 | * Copyright (c) 2004-2006 Silicon Graphics, Inc. All Rights Reserved. | 6 | * Copyright (c) 2004-2007 Silicon Graphics, Inc. All Rights Reserved. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | 9 | ||
@@ -1211,6 +1211,12 @@ xpc_IPI_init(int index) | |||
1211 | static inline enum xpc_retval | 1211 | static inline enum xpc_retval |
1212 | xpc_map_bte_errors(bte_result_t error) | 1212 | xpc_map_bte_errors(bte_result_t error) |
1213 | { | 1213 | { |
1214 | if (is_shub2()) { | ||
1215 | if (BTE_VALID_SH2_ERROR(error)) | ||
1216 | return xpcBteSh2Start + error; | ||
1217 | else | ||
1218 | return xpcBteUnmappedError; | ||
1219 | } | ||
1214 | switch (error) { | 1220 | switch (error) { |
1215 | case BTE_SUCCESS: return xpcSuccess; | 1221 | case BTE_SUCCESS: return xpcSuccess; |
1216 | case BTEFAIL_DIR: return xpcBteDirectoryError; | 1222 | case BTEFAIL_DIR: return xpcBteDirectoryError; |
diff --git a/include/asm-ia64/tlbflush.h b/include/asm-ia64/tlbflush.h index 80bcb0a38e8a..7774a1cac0cc 100644 --- a/include/asm-ia64/tlbflush.h +++ b/include/asm-ia64/tlbflush.h | |||
@@ -92,6 +92,10 @@ void smp_local_flush_tlb(void); | |||
92 | #define smp_local_flush_tlb() | 92 | #define smp_local_flush_tlb() |
93 | #endif | 93 | #endif |
94 | 94 | ||
95 | #define flush_tlb_kernel_range(start, end) flush_tlb_all() /* XXX fix me */ | 95 | static inline void flush_tlb_kernel_range(unsigned long start, |
96 | unsigned long end) | ||
97 | { | ||
98 | flush_tlb_all(); /* XXX fix me */ | ||
99 | } | ||
96 | 100 | ||
97 | #endif /* _ASM_IA64_TLBFLUSH_H */ | 101 | #endif /* _ASM_IA64_TLBFLUSH_H */ |