diff options
Diffstat (limited to 'arch/ia64')
-rw-r--r-- | arch/ia64/configs/generic_defconfig | 3 | ||||
-rw-r--r-- | arch/ia64/include/asm/spinlock.h | 77 | ||||
-rw-r--r-- | arch/ia64/include/asm/uv/uv_hub.h | 6 | ||||
-rw-r--r-- | arch/ia64/include/asm/uv/uv_mmrs.h | 158 | ||||
-rw-r--r-- | arch/ia64/kernel/process.c | 2 |
5 files changed, 225 insertions, 21 deletions
diff --git a/arch/ia64/configs/generic_defconfig b/arch/ia64/configs/generic_defconfig index a109db30ce55..75645495c2dd 100644 --- a/arch/ia64/configs/generic_defconfig +++ b/arch/ia64/configs/generic_defconfig | |||
@@ -193,7 +193,6 @@ CONFIG_BOUNCE=y | |||
193 | CONFIG_NR_QUICK=1 | 193 | CONFIG_NR_QUICK=1 |
194 | CONFIG_VIRT_TO_BUS=y | 194 | CONFIG_VIRT_TO_BUS=y |
195 | CONFIG_UNEVICTABLE_LRU=y | 195 | CONFIG_UNEVICTABLE_LRU=y |
196 | CONFIG_MMU_NOTIFIER=y | ||
197 | CONFIG_ARCH_SELECT_MEMORY_MODEL=y | 196 | CONFIG_ARCH_SELECT_MEMORY_MODEL=y |
198 | CONFIG_ARCH_DISCONTIGMEM_ENABLE=y | 197 | CONFIG_ARCH_DISCONTIGMEM_ENABLE=y |
199 | CONFIG_ARCH_FLATMEM_ENABLE=y | 198 | CONFIG_ARCH_FLATMEM_ENABLE=y |
@@ -416,8 +415,6 @@ CONFIG_SGI_IOC4=y | |||
416 | # CONFIG_ENCLOSURE_SERVICES is not set | 415 | # CONFIG_ENCLOSURE_SERVICES is not set |
417 | CONFIG_SGI_XP=m | 416 | CONFIG_SGI_XP=m |
418 | # CONFIG_HP_ILO is not set | 417 | # CONFIG_HP_ILO is not set |
419 | CONFIG_SGI_GRU=m | ||
420 | # CONFIG_SGI_GRU_DEBUG is not set | ||
421 | # CONFIG_C2PORT is not set | 418 | # CONFIG_C2PORT is not set |
422 | CONFIG_HAVE_IDE=y | 419 | CONFIG_HAVE_IDE=y |
423 | CONFIG_IDE=y | 420 | CONFIG_IDE=y |
diff --git a/arch/ia64/include/asm/spinlock.h b/arch/ia64/include/asm/spinlock.h index 0229fb95fb38..13ab71576bc7 100644 --- a/arch/ia64/include/asm/spinlock.h +++ b/arch/ia64/include/asm/spinlock.h | |||
@@ -120,6 +120,38 @@ do { \ | |||
120 | #define __raw_read_can_lock(rw) (*(volatile int *)(rw) >= 0) | 120 | #define __raw_read_can_lock(rw) (*(volatile int *)(rw) >= 0) |
121 | #define __raw_write_can_lock(rw) (*(volatile int *)(rw) == 0) | 121 | #define __raw_write_can_lock(rw) (*(volatile int *)(rw) == 0) |
122 | 122 | ||
123 | #ifdef ASM_SUPPORTED | ||
124 | |||
125 | static __always_inline void | ||
126 | __raw_read_lock_flags(raw_rwlock_t *lock, unsigned long flags) | ||
127 | { | ||
128 | __asm__ __volatile__ ( | ||
129 | "tbit.nz p6, p0 = %1,%2\n" | ||
130 | "br.few 3f\n" | ||
131 | "1:\n" | ||
132 | "fetchadd4.rel r2 = [%0], -1;;\n" | ||
133 | "(p6) ssm psr.i\n" | ||
134 | "2:\n" | ||
135 | "hint @pause\n" | ||
136 | "ld4 r2 = [%0];;\n" | ||
137 | "cmp4.lt p7,p0 = r2, r0\n" | ||
138 | "(p7) br.cond.spnt.few 2b\n" | ||
139 | "(p6) rsm psr.i\n" | ||
140 | ";;\n" | ||
141 | "3:\n" | ||
142 | "fetchadd4.acq r2 = [%0], 1;;\n" | ||
143 | "cmp4.lt p7,p0 = r2, r0\n" | ||
144 | "(p7) br.cond.spnt.few 1b\n" | ||
145 | : : "r"(lock), "r"(flags), "i"(IA64_PSR_I_BIT) | ||
146 | : "p6", "p7", "r2", "memory"); | ||
147 | } | ||
148 | |||
149 | #define __raw_read_lock(lock) __raw_read_lock_flags(lock, 0) | ||
150 | |||
151 | #else /* !ASM_SUPPORTED */ | ||
152 | |||
153 | #define __raw_read_lock_flags(rw, flags) __raw_read_lock(rw) | ||
154 | |||
123 | #define __raw_read_lock(rw) \ | 155 | #define __raw_read_lock(rw) \ |
124 | do { \ | 156 | do { \ |
125 | raw_rwlock_t *__read_lock_ptr = (rw); \ | 157 | raw_rwlock_t *__read_lock_ptr = (rw); \ |
@@ -131,6 +163,8 @@ do { \ | |||
131 | } \ | 163 | } \ |
132 | } while (0) | 164 | } while (0) |
133 | 165 | ||
166 | #endif /* !ASM_SUPPORTED */ | ||
167 | |||
134 | #define __raw_read_unlock(rw) \ | 168 | #define __raw_read_unlock(rw) \ |
135 | do { \ | 169 | do { \ |
136 | raw_rwlock_t *__read_lock_ptr = (rw); \ | 170 | raw_rwlock_t *__read_lock_ptr = (rw); \ |
@@ -138,20 +172,33 @@ do { \ | |||
138 | } while (0) | 172 | } while (0) |
139 | 173 | ||
140 | #ifdef ASM_SUPPORTED | 174 | #ifdef ASM_SUPPORTED |
141 | #define __raw_write_lock(rw) \ | 175 | |
142 | do { \ | 176 | static __always_inline void |
143 | __asm__ __volatile__ ( \ | 177 | __raw_write_lock_flags(raw_rwlock_t *lock, unsigned long flags) |
144 | "mov ar.ccv = r0\n" \ | 178 | { |
145 | "dep r29 = -1, r0, 31, 1;;\n" \ | 179 | __asm__ __volatile__ ( |
146 | "1:\n" \ | 180 | "tbit.nz p6, p0 = %1, %2\n" |
147 | "ld4 r2 = [%0];;\n" \ | 181 | "mov ar.ccv = r0\n" |
148 | "cmp4.eq p0,p7 = r0,r2\n" \ | 182 | "dep r29 = -1, r0, 31, 1\n" |
149 | "(p7) br.cond.spnt.few 1b \n" \ | 183 | "br.few 3f;;\n" |
150 | "cmpxchg4.acq r2 = [%0], r29, ar.ccv;;\n" \ | 184 | "1:\n" |
151 | "cmp4.eq p0,p7 = r0, r2\n" \ | 185 | "(p6) ssm psr.i\n" |
152 | "(p7) br.cond.spnt.few 1b;;\n" \ | 186 | "2:\n" |
153 | :: "r"(rw) : "ar.ccv", "p7", "r2", "r29", "memory"); \ | 187 | "hint @pause\n" |
154 | } while(0) | 188 | "ld4 r2 = [%0];;\n" |
189 | "cmp4.eq p0,p7 = r0, r2\n" | ||
190 | "(p7) br.cond.spnt.few 2b\n" | ||
191 | "(p6) rsm psr.i\n" | ||
192 | ";;\n" | ||
193 | "3:\n" | ||
194 | "cmpxchg4.acq r2 = [%0], r29, ar.ccv;;\n" | ||
195 | "cmp4.eq p0,p7 = r0, r2\n" | ||
196 | "(p7) br.cond.spnt.few 1b;;\n" | ||
197 | : : "r"(lock), "r"(flags), "i"(IA64_PSR_I_BIT) | ||
198 | : "ar.ccv", "p6", "p7", "r2", "r29", "memory"); | ||
199 | } | ||
200 | |||
201 | #define __raw_write_lock(rw) __raw_write_lock_flags(rw, 0) | ||
155 | 202 | ||
156 | #define __raw_write_trylock(rw) \ | 203 | #define __raw_write_trylock(rw) \ |
157 | ({ \ | 204 | ({ \ |
@@ -174,6 +221,8 @@ static inline void __raw_write_unlock(raw_rwlock_t *x) | |||
174 | 221 | ||
175 | #else /* !ASM_SUPPORTED */ | 222 | #else /* !ASM_SUPPORTED */ |
176 | 223 | ||
224 | #define __raw_write_lock_flags(l, flags) __raw_write_lock(l) | ||
225 | |||
177 | #define __raw_write_lock(l) \ | 226 | #define __raw_write_lock(l) \ |
178 | ({ \ | 227 | ({ \ |
179 | __u64 ia64_val, ia64_set_val = ia64_dep_mi(-1, 0, 31, 1); \ | 228 | __u64 ia64_val, ia64_set_val = ia64_dep_mi(-1, 0, 31, 1); \ |
diff --git a/arch/ia64/include/asm/uv/uv_hub.h b/arch/ia64/include/asm/uv/uv_hub.h index f607018af4a1..53e9dfacd073 100644 --- a/arch/ia64/include/asm/uv/uv_hub.h +++ b/arch/ia64/include/asm/uv/uv_hub.h | |||
@@ -305,5 +305,11 @@ static inline int uv_num_possible_blades(void) | |||
305 | return 1; | 305 | return 1; |
306 | } | 306 | } |
307 | 307 | ||
308 | static inline void uv_hub_send_ipi(int pnode, int apicid, int vector) | ||
309 | { | ||
310 | /* not currently needed on ia64 */ | ||
311 | } | ||
312 | |||
313 | |||
308 | #endif /* __ASM_IA64_UV_HUB__ */ | 314 | #endif /* __ASM_IA64_UV_HUB__ */ |
309 | 315 | ||
diff --git a/arch/ia64/include/asm/uv/uv_mmrs.h b/arch/ia64/include/asm/uv/uv_mmrs.h index c149ef085437..fe0b8f05e1a8 100644 --- a/arch/ia64/include/asm/uv/uv_mmrs.h +++ b/arch/ia64/include/asm/uv/uv_mmrs.h | |||
@@ -8,8 +8,8 @@ | |||
8 | * Copyright (C) 2007-2008 Silicon Graphics, Inc. All rights reserved. | 8 | * Copyright (C) 2007-2008 Silicon Graphics, Inc. All rights reserved. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #ifndef __ASM_IA64_UV_MMRS__ | 11 | #ifndef _ASM_IA64_UV_UV_MMRS_H |
12 | #define __ASM_IA64_UV_MMRS__ | 12 | #define _ASM_IA64_UV_UV_MMRS_H |
13 | 13 | ||
14 | #define UV_MMR_ENABLE (1UL << 63) | 14 | #define UV_MMR_ENABLE (1UL << 63) |
15 | 15 | ||
@@ -243,6 +243,158 @@ union uvh_event_occurred0_u { | |||
243 | #define UVH_EVENT_OCCURRED0_ALIAS_32 0x005f0 | 243 | #define UVH_EVENT_OCCURRED0_ALIAS_32 0x005f0 |
244 | 244 | ||
245 | /* ========================================================================= */ | 245 | /* ========================================================================= */ |
246 | /* UVH_GR0_TLB_INT0_CONFIG */ | ||
247 | /* ========================================================================= */ | ||
248 | #define UVH_GR0_TLB_INT0_CONFIG 0x61b00UL | ||
249 | |||
250 | #define UVH_GR0_TLB_INT0_CONFIG_VECTOR_SHFT 0 | ||
251 | #define UVH_GR0_TLB_INT0_CONFIG_VECTOR_MASK 0x00000000000000ffUL | ||
252 | #define UVH_GR0_TLB_INT0_CONFIG_DM_SHFT 8 | ||
253 | #define UVH_GR0_TLB_INT0_CONFIG_DM_MASK 0x0000000000000700UL | ||
254 | #define UVH_GR0_TLB_INT0_CONFIG_DESTMODE_SHFT 11 | ||
255 | #define UVH_GR0_TLB_INT0_CONFIG_DESTMODE_MASK 0x0000000000000800UL | ||
256 | #define UVH_GR0_TLB_INT0_CONFIG_STATUS_SHFT 12 | ||
257 | #define UVH_GR0_TLB_INT0_CONFIG_STATUS_MASK 0x0000000000001000UL | ||
258 | #define UVH_GR0_TLB_INT0_CONFIG_P_SHFT 13 | ||
259 | #define UVH_GR0_TLB_INT0_CONFIG_P_MASK 0x0000000000002000UL | ||
260 | #define UVH_GR0_TLB_INT0_CONFIG_T_SHFT 15 | ||
261 | #define UVH_GR0_TLB_INT0_CONFIG_T_MASK 0x0000000000008000UL | ||
262 | #define UVH_GR0_TLB_INT0_CONFIG_M_SHFT 16 | ||
263 | #define UVH_GR0_TLB_INT0_CONFIG_M_MASK 0x0000000000010000UL | ||
264 | #define UVH_GR0_TLB_INT0_CONFIG_APIC_ID_SHFT 32 | ||
265 | #define UVH_GR0_TLB_INT0_CONFIG_APIC_ID_MASK 0xffffffff00000000UL | ||
266 | |||
267 | union uvh_gr0_tlb_int0_config_u { | ||
268 | unsigned long v; | ||
269 | struct uvh_gr0_tlb_int0_config_s { | ||
270 | unsigned long vector_ : 8; /* RW */ | ||
271 | unsigned long dm : 3; /* RW */ | ||
272 | unsigned long destmode : 1; /* RW */ | ||
273 | unsigned long status : 1; /* RO */ | ||
274 | unsigned long p : 1; /* RO */ | ||
275 | unsigned long rsvd_14 : 1; /* */ | ||
276 | unsigned long t : 1; /* RO */ | ||
277 | unsigned long m : 1; /* RW */ | ||
278 | unsigned long rsvd_17_31: 15; /* */ | ||
279 | unsigned long apic_id : 32; /* RW */ | ||
280 | } s; | ||
281 | }; | ||
282 | |||
283 | /* ========================================================================= */ | ||
284 | /* UVH_GR0_TLB_INT1_CONFIG */ | ||
285 | /* ========================================================================= */ | ||
286 | #define UVH_GR0_TLB_INT1_CONFIG 0x61b40UL | ||
287 | |||
288 | #define UVH_GR0_TLB_INT1_CONFIG_VECTOR_SHFT 0 | ||
289 | #define UVH_GR0_TLB_INT1_CONFIG_VECTOR_MASK 0x00000000000000ffUL | ||
290 | #define UVH_GR0_TLB_INT1_CONFIG_DM_SHFT 8 | ||
291 | #define UVH_GR0_TLB_INT1_CONFIG_DM_MASK 0x0000000000000700UL | ||
292 | #define UVH_GR0_TLB_INT1_CONFIG_DESTMODE_SHFT 11 | ||
293 | #define UVH_GR0_TLB_INT1_CONFIG_DESTMODE_MASK 0x0000000000000800UL | ||
294 | #define UVH_GR0_TLB_INT1_CONFIG_STATUS_SHFT 12 | ||
295 | #define UVH_GR0_TLB_INT1_CONFIG_STATUS_MASK 0x0000000000001000UL | ||
296 | #define UVH_GR0_TLB_INT1_CONFIG_P_SHFT 13 | ||
297 | #define UVH_GR0_TLB_INT1_CONFIG_P_MASK 0x0000000000002000UL | ||
298 | #define UVH_GR0_TLB_INT1_CONFIG_T_SHFT 15 | ||
299 | #define UVH_GR0_TLB_INT1_CONFIG_T_MASK 0x0000000000008000UL | ||
300 | #define UVH_GR0_TLB_INT1_CONFIG_M_SHFT 16 | ||
301 | #define UVH_GR0_TLB_INT1_CONFIG_M_MASK 0x0000000000010000UL | ||
302 | #define UVH_GR0_TLB_INT1_CONFIG_APIC_ID_SHFT 32 | ||
303 | #define UVH_GR0_TLB_INT1_CONFIG_APIC_ID_MASK 0xffffffff00000000UL | ||
304 | |||
305 | union uvh_gr0_tlb_int1_config_u { | ||
306 | unsigned long v; | ||
307 | struct uvh_gr0_tlb_int1_config_s { | ||
308 | unsigned long vector_ : 8; /* RW */ | ||
309 | unsigned long dm : 3; /* RW */ | ||
310 | unsigned long destmode : 1; /* RW */ | ||
311 | unsigned long status : 1; /* RO */ | ||
312 | unsigned long p : 1; /* RO */ | ||
313 | unsigned long rsvd_14 : 1; /* */ | ||
314 | unsigned long t : 1; /* RO */ | ||
315 | unsigned long m : 1; /* RW */ | ||
316 | unsigned long rsvd_17_31: 15; /* */ | ||
317 | unsigned long apic_id : 32; /* RW */ | ||
318 | } s; | ||
319 | }; | ||
320 | |||
321 | /* ========================================================================= */ | ||
322 | /* UVH_GR1_TLB_INT0_CONFIG */ | ||
323 | /* ========================================================================= */ | ||
324 | #define UVH_GR1_TLB_INT0_CONFIG 0x61f00UL | ||
325 | |||
326 | #define UVH_GR1_TLB_INT0_CONFIG_VECTOR_SHFT 0 | ||
327 | #define UVH_GR1_TLB_INT0_CONFIG_VECTOR_MASK 0x00000000000000ffUL | ||
328 | #define UVH_GR1_TLB_INT0_CONFIG_DM_SHFT 8 | ||
329 | #define UVH_GR1_TLB_INT0_CONFIG_DM_MASK 0x0000000000000700UL | ||
330 | #define UVH_GR1_TLB_INT0_CONFIG_DESTMODE_SHFT 11 | ||
331 | #define UVH_GR1_TLB_INT0_CONFIG_DESTMODE_MASK 0x0000000000000800UL | ||
332 | #define UVH_GR1_TLB_INT0_CONFIG_STATUS_SHFT 12 | ||
333 | #define UVH_GR1_TLB_INT0_CONFIG_STATUS_MASK 0x0000000000001000UL | ||
334 | #define UVH_GR1_TLB_INT0_CONFIG_P_SHFT 13 | ||
335 | #define UVH_GR1_TLB_INT0_CONFIG_P_MASK 0x0000000000002000UL | ||
336 | #define UVH_GR1_TLB_INT0_CONFIG_T_SHFT 15 | ||
337 | #define UVH_GR1_TLB_INT0_CONFIG_T_MASK 0x0000000000008000UL | ||
338 | #define UVH_GR1_TLB_INT0_CONFIG_M_SHFT 16 | ||
339 | #define UVH_GR1_TLB_INT0_CONFIG_M_MASK 0x0000000000010000UL | ||
340 | #define UVH_GR1_TLB_INT0_CONFIG_APIC_ID_SHFT 32 | ||
341 | #define UVH_GR1_TLB_INT0_CONFIG_APIC_ID_MASK 0xffffffff00000000UL | ||
342 | |||
343 | union uvh_gr1_tlb_int0_config_u { | ||
344 | unsigned long v; | ||
345 | struct uvh_gr1_tlb_int0_config_s { | ||
346 | unsigned long vector_ : 8; /* RW */ | ||
347 | unsigned long dm : 3; /* RW */ | ||
348 | unsigned long destmode : 1; /* RW */ | ||
349 | unsigned long status : 1; /* RO */ | ||
350 | unsigned long p : 1; /* RO */ | ||
351 | unsigned long rsvd_14 : 1; /* */ | ||
352 | unsigned long t : 1; /* RO */ | ||
353 | unsigned long m : 1; /* RW */ | ||
354 | unsigned long rsvd_17_31: 15; /* */ | ||
355 | unsigned long apic_id : 32; /* RW */ | ||
356 | } s; | ||
357 | }; | ||
358 | |||
359 | /* ========================================================================= */ | ||
360 | /* UVH_GR1_TLB_INT1_CONFIG */ | ||
361 | /* ========================================================================= */ | ||
362 | #define UVH_GR1_TLB_INT1_CONFIG 0x61f40UL | ||
363 | |||
364 | #define UVH_GR1_TLB_INT1_CONFIG_VECTOR_SHFT 0 | ||
365 | #define UVH_GR1_TLB_INT1_CONFIG_VECTOR_MASK 0x00000000000000ffUL | ||
366 | #define UVH_GR1_TLB_INT1_CONFIG_DM_SHFT 8 | ||
367 | #define UVH_GR1_TLB_INT1_CONFIG_DM_MASK 0x0000000000000700UL | ||
368 | #define UVH_GR1_TLB_INT1_CONFIG_DESTMODE_SHFT 11 | ||
369 | #define UVH_GR1_TLB_INT1_CONFIG_DESTMODE_MASK 0x0000000000000800UL | ||
370 | #define UVH_GR1_TLB_INT1_CONFIG_STATUS_SHFT 12 | ||
371 | #define UVH_GR1_TLB_INT1_CONFIG_STATUS_MASK 0x0000000000001000UL | ||
372 | #define UVH_GR1_TLB_INT1_CONFIG_P_SHFT 13 | ||
373 | #define UVH_GR1_TLB_INT1_CONFIG_P_MASK 0x0000000000002000UL | ||
374 | #define UVH_GR1_TLB_INT1_CONFIG_T_SHFT 15 | ||
375 | #define UVH_GR1_TLB_INT1_CONFIG_T_MASK 0x0000000000008000UL | ||
376 | #define UVH_GR1_TLB_INT1_CONFIG_M_SHFT 16 | ||
377 | #define UVH_GR1_TLB_INT1_CONFIG_M_MASK 0x0000000000010000UL | ||
378 | #define UVH_GR1_TLB_INT1_CONFIG_APIC_ID_SHFT 32 | ||
379 | #define UVH_GR1_TLB_INT1_CONFIG_APIC_ID_MASK 0xffffffff00000000UL | ||
380 | |||
381 | union uvh_gr1_tlb_int1_config_u { | ||
382 | unsigned long v; | ||
383 | struct uvh_gr1_tlb_int1_config_s { | ||
384 | unsigned long vector_ : 8; /* RW */ | ||
385 | unsigned long dm : 3; /* RW */ | ||
386 | unsigned long destmode : 1; /* RW */ | ||
387 | unsigned long status : 1; /* RO */ | ||
388 | unsigned long p : 1; /* RO */ | ||
389 | unsigned long rsvd_14 : 1; /* */ | ||
390 | unsigned long t : 1; /* RO */ | ||
391 | unsigned long m : 1; /* RW */ | ||
392 | unsigned long rsvd_17_31: 15; /* */ | ||
393 | unsigned long apic_id : 32; /* RW */ | ||
394 | } s; | ||
395 | }; | ||
396 | |||
397 | /* ========================================================================= */ | ||
246 | /* UVH_INT_CMPB */ | 398 | /* UVH_INT_CMPB */ |
247 | /* ========================================================================= */ | 399 | /* ========================================================================= */ |
248 | #define UVH_INT_CMPB 0x22080UL | 400 | #define UVH_INT_CMPB 0x22080UL |
@@ -670,4 +822,4 @@ union uvh_si_alias2_overlay_config_u { | |||
670 | }; | 822 | }; |
671 | 823 | ||
672 | 824 | ||
673 | #endif /* __ASM_IA64_UV_MMRS__ */ | 825 | #endif /* _ASM_IA64_UV_UV_MMRS_H */ |
diff --git a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c index c57162705147..5d7c0e5b9e76 100644 --- a/arch/ia64/kernel/process.c +++ b/arch/ia64/kernel/process.c | |||
@@ -413,7 +413,7 @@ ia64_load_extra (struct task_struct *task) | |||
413 | * so there is nothing to worry about. | 413 | * so there is nothing to worry about. |
414 | */ | 414 | */ |
415 | int | 415 | int |
416 | copy_thread (int nr, unsigned long clone_flags, | 416 | copy_thread(unsigned long clone_flags, |
417 | unsigned long user_stack_base, unsigned long user_stack_size, | 417 | unsigned long user_stack_base, unsigned long user_stack_size, |
418 | struct task_struct *p, struct pt_regs *regs) | 418 | struct task_struct *p, struct pt_regs *regs) |
419 | { | 419 | { |