diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-ia64/semaphore.h | 8 | ||||
-rw-r--r-- | include/asm-ia64/sn/xp.h | 3 | ||||
-rw-r--r-- | include/asm-ia64/sn/xpc.h | 9 | ||||
-rw-r--r-- | include/asm-ia64/topology.h | 4 | ||||
-rw-r--r-- | include/asm-sparc/oplib.h | 2 | ||||
-rw-r--r-- | include/asm-sparc/thread_info.h | 5 | ||||
-rw-r--r-- | include/asm-sparc/unistd.h | 22 | ||||
-rw-r--r-- | include/asm-sparc64/thread_info.h | 6 | ||||
-rw-r--r-- | include/asm-sparc64/unistd.h | 23 |
9 files changed, 62 insertions, 20 deletions
diff --git a/include/asm-ia64/semaphore.h b/include/asm-ia64/semaphore.h index bb8906285fab..f483eeb95dd1 100644 --- a/include/asm-ia64/semaphore.h +++ b/include/asm-ia64/semaphore.h | |||
@@ -61,7 +61,7 @@ static inline void | |||
61 | down (struct semaphore *sem) | 61 | down (struct semaphore *sem) |
62 | { | 62 | { |
63 | might_sleep(); | 63 | might_sleep(); |
64 | if (atomic_dec_return(&sem->count) < 0) | 64 | if (ia64_fetchadd(-1, &sem->count.counter, acq) < 1) |
65 | __down(sem); | 65 | __down(sem); |
66 | } | 66 | } |
67 | 67 | ||
@@ -75,7 +75,7 @@ down_interruptible (struct semaphore * sem) | |||
75 | int ret = 0; | 75 | int ret = 0; |
76 | 76 | ||
77 | might_sleep(); | 77 | might_sleep(); |
78 | if (atomic_dec_return(&sem->count) < 0) | 78 | if (ia64_fetchadd(-1, &sem->count.counter, acq) < 1) |
79 | ret = __down_interruptible(sem); | 79 | ret = __down_interruptible(sem); |
80 | return ret; | 80 | return ret; |
81 | } | 81 | } |
@@ -85,7 +85,7 @@ down_trylock (struct semaphore *sem) | |||
85 | { | 85 | { |
86 | int ret = 0; | 86 | int ret = 0; |
87 | 87 | ||
88 | if (atomic_dec_return(&sem->count) < 0) | 88 | if (ia64_fetchadd(-1, &sem->count.counter, acq) < 1) |
89 | ret = __down_trylock(sem); | 89 | ret = __down_trylock(sem); |
90 | return ret; | 90 | return ret; |
91 | } | 91 | } |
@@ -93,7 +93,7 @@ down_trylock (struct semaphore *sem) | |||
93 | static inline void | 93 | static inline void |
94 | up (struct semaphore * sem) | 94 | up (struct semaphore * sem) |
95 | { | 95 | { |
96 | if (atomic_inc_return(&sem->count) <= 0) | 96 | if (ia64_fetchadd(1, &sem->count.counter, rel) <= -1) |
97 | __up(sem); | 97 | __up(sem); |
98 | } | 98 | } |
99 | 99 | ||
diff --git a/include/asm-ia64/sn/xp.h b/include/asm-ia64/sn/xp.h index 203945ae034e..9bd2f9bf329b 100644 --- a/include/asm-ia64/sn/xp.h +++ b/include/asm-ia64/sn/xp.h | |||
@@ -18,6 +18,7 @@ | |||
18 | 18 | ||
19 | #include <linux/cache.h> | 19 | #include <linux/cache.h> |
20 | #include <linux/hardirq.h> | 20 | #include <linux/hardirq.h> |
21 | #include <linux/mutex.h> | ||
21 | #include <asm/sn/types.h> | 22 | #include <asm/sn/types.h> |
22 | #include <asm/sn/bte.h> | 23 | #include <asm/sn/bte.h> |
23 | 24 | ||
@@ -359,7 +360,7 @@ typedef void (*xpc_notify_func)(enum xpc_retval reason, partid_t partid, | |||
359 | * the channel. | 360 | * the channel. |
360 | */ | 361 | */ |
361 | struct xpc_registration { | 362 | struct xpc_registration { |
362 | struct semaphore sema; | 363 | struct mutex mutex; |
363 | xpc_channel_func func; /* function to call */ | 364 | xpc_channel_func func; /* function to call */ |
364 | void *key; /* pointer to user's key */ | 365 | void *key; /* pointer to user's key */ |
365 | u16 nentries; /* #of msg entries in local msg queue */ | 366 | u16 nentries; /* #of msg entries in local msg queue */ |
diff --git a/include/asm-ia64/sn/xpc.h b/include/asm-ia64/sn/xpc.h index 87e9cd588510..0c36928ffd8b 100644 --- a/include/asm-ia64/sn/xpc.h +++ b/include/asm-ia64/sn/xpc.h | |||
@@ -19,6 +19,8 @@ | |||
19 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
20 | #include <linux/sysctl.h> | 20 | #include <linux/sysctl.h> |
21 | #include <linux/device.h> | 21 | #include <linux/device.h> |
22 | #include <linux/mutex.h> | ||
23 | #include <linux/completion.h> | ||
22 | #include <asm/pgtable.h> | 24 | #include <asm/pgtable.h> |
23 | #include <asm/processor.h> | 25 | #include <asm/processor.h> |
24 | #include <asm/sn/bte.h> | 26 | #include <asm/sn/bte.h> |
@@ -335,8 +337,7 @@ struct xpc_openclose_args { | |||
335 | * and consumed by the intended recipient. | 337 | * and consumed by the intended recipient. |
336 | */ | 338 | */ |
337 | struct xpc_notify { | 339 | struct xpc_notify { |
338 | struct semaphore sema; /* notify semaphore */ | 340 | volatile u8 type; /* type of notification */ |
339 | volatile u8 type; /* type of notification */ | ||
340 | 341 | ||
341 | /* the following two fields are only used if type == XPC_N_CALL */ | 342 | /* the following two fields are only used if type == XPC_N_CALL */ |
342 | xpc_notify_func func; /* user's notify function */ | 343 | xpc_notify_func func; /* user's notify function */ |
@@ -465,8 +466,8 @@ struct xpc_channel { | |||
465 | xpc_channel_func func; /* user's channel function */ | 466 | xpc_channel_func func; /* user's channel function */ |
466 | void *key; /* pointer to user's key */ | 467 | void *key; /* pointer to user's key */ |
467 | 468 | ||
468 | struct semaphore msg_to_pull_sema; /* next msg to pull serialization */ | 469 | struct mutex msg_to_pull_mutex; /* next msg to pull serialization */ |
469 | struct semaphore wdisconnect_sema; /* wait for channel disconnect */ | 470 | struct completion wdisconnect_wait; /* wait for channel disconnect */ |
470 | 471 | ||
471 | struct xpc_openclose_args *local_openclose_args; /* args passed on */ | 472 | struct xpc_openclose_args *local_openclose_args; /* args passed on */ |
472 | /* opening or closing of channel */ | 473 | /* opening or closing of channel */ |
diff --git a/include/asm-ia64/topology.h b/include/asm-ia64/topology.h index d8aae4da3978..412ef8e493a8 100644 --- a/include/asm-ia64/topology.h +++ b/include/asm-ia64/topology.h | |||
@@ -18,6 +18,10 @@ | |||
18 | #include <asm/smp.h> | 18 | #include <asm/smp.h> |
19 | 19 | ||
20 | #ifdef CONFIG_NUMA | 20 | #ifdef CONFIG_NUMA |
21 | |||
22 | /* Nodes w/o CPUs are preferred for memory allocations, see build_zonelists */ | ||
23 | #define PENALTY_FOR_NODE_WITH_CPUS 255 | ||
24 | |||
21 | /* | 25 | /* |
22 | * Returns the number of the node containing CPU 'cpu' | 26 | * Returns the number of the node containing CPU 'cpu' |
23 | */ | 27 | */ |
diff --git a/include/asm-sparc/oplib.h b/include/asm-sparc/oplib.h index 95944556d8b6..d0d76b30eb4c 100644 --- a/include/asm-sparc/oplib.h +++ b/include/asm-sparc/oplib.h | |||
@@ -164,6 +164,7 @@ enum prom_input_device { | |||
164 | PROMDEV_IKBD, /* input from keyboard */ | 164 | PROMDEV_IKBD, /* input from keyboard */ |
165 | PROMDEV_ITTYA, /* input from ttya */ | 165 | PROMDEV_ITTYA, /* input from ttya */ |
166 | PROMDEV_ITTYB, /* input from ttyb */ | 166 | PROMDEV_ITTYB, /* input from ttyb */ |
167 | PROMDEV_IRSC, /* input from rsc */ | ||
167 | PROMDEV_I_UNK, | 168 | PROMDEV_I_UNK, |
168 | }; | 169 | }; |
169 | 170 | ||
@@ -175,6 +176,7 @@ enum prom_output_device { | |||
175 | PROMDEV_OSCREEN, /* to screen */ | 176 | PROMDEV_OSCREEN, /* to screen */ |
176 | PROMDEV_OTTYA, /* to ttya */ | 177 | PROMDEV_OTTYA, /* to ttya */ |
177 | PROMDEV_OTTYB, /* to ttyb */ | 178 | PROMDEV_OTTYB, /* to ttyb */ |
179 | PROMDEV_ORSC, /* to rsc */ | ||
178 | PROMDEV_O_UNK, | 180 | PROMDEV_O_UNK, |
179 | }; | 181 | }; |
180 | 182 | ||
diff --git a/include/asm-sparc/thread_info.h b/include/asm-sparc/thread_info.h index 65f060b040ab..91b9f5888c85 100644 --- a/include/asm-sparc/thread_info.h +++ b/include/asm-sparc/thread_info.h | |||
@@ -128,9 +128,10 @@ BTFIXUPDEF_CALL(void, free_thread_info, struct thread_info *) | |||
128 | * thread information flag bit numbers | 128 | * thread information flag bit numbers |
129 | */ | 129 | */ |
130 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ | 130 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ |
131 | #define TIF_NOTIFY_RESUME 1 /* resumption notification requested */ | 131 | /* flag bit 1 is available */ |
132 | #define TIF_SIGPENDING 2 /* signal pending */ | 132 | #define TIF_SIGPENDING 2 /* signal pending */ |
133 | #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ | 133 | #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ |
134 | #define TIF_RESTORE_SIGMASK 4 /* restore signal mask in do_signal() */ | ||
134 | #define TIF_USEDFPU 8 /* FPU was used by this task | 135 | #define TIF_USEDFPU 8 /* FPU was used by this task |
135 | * this quantum (SMP) */ | 136 | * this quantum (SMP) */ |
136 | #define TIF_POLLING_NRFLAG 9 /* true if poll_idle() is polling | 137 | #define TIF_POLLING_NRFLAG 9 /* true if poll_idle() is polling |
@@ -139,9 +140,9 @@ BTFIXUPDEF_CALL(void, free_thread_info, struct thread_info *) | |||
139 | 140 | ||
140 | /* as above, but as bit values */ | 141 | /* as above, but as bit values */ |
141 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) | 142 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) |
142 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) | ||
143 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) | 143 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) |
144 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) | 144 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) |
145 | #define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) | ||
145 | #define _TIF_USEDFPU (1<<TIF_USEDFPU) | 146 | #define _TIF_USEDFPU (1<<TIF_USEDFPU) |
146 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) | 147 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) |
147 | 148 | ||
diff --git a/include/asm-sparc/unistd.h b/include/asm-sparc/unistd.h index 58dba518239e..2ac64e65e336 100644 --- a/include/asm-sparc/unistd.h +++ b/include/asm-sparc/unistd.h | |||
@@ -300,11 +300,26 @@ | |||
300 | #define __NR_add_key 281 | 300 | #define __NR_add_key 281 |
301 | #define __NR_request_key 282 | 301 | #define __NR_request_key 282 |
302 | #define __NR_keyctl 283 | 302 | #define __NR_keyctl 283 |
303 | #define __NR_openat 284 | ||
304 | #define __NR_mkdirat 285 | ||
305 | #define __NR_mknodat 286 | ||
306 | #define __NR_fchownat 287 | ||
307 | #define __NR_futimesat 288 | ||
308 | #define __NR_newfstatat 289 | ||
309 | #define __NR_unlinkat 290 | ||
310 | #define __NR_renameat 291 | ||
311 | #define __NR_linkat 292 | ||
312 | #define __NR_symlinkat 293 | ||
313 | #define __NR_readlinkat 294 | ||
314 | #define __NR_fchmodat 295 | ||
315 | #define __NR_faccessat 296 | ||
316 | #define __NR_pselect6 297 | ||
317 | #define __NR_ppoll 298 | ||
303 | 318 | ||
304 | /* WARNING: You MAY NOT add syscall numbers larger than 283, since | 319 | /* WARNING: You MAY NOT add syscall numbers larger than 298, since |
305 | * all of the syscall tables in the Sparc kernel are | 320 | * all of the syscall tables in the Sparc kernel are |
306 | * sized to have 283 entries (starting at zero). Therefore | 321 | * sized to have 298 entries (starting at zero). Therefore |
307 | * find a free slot in the 0-282 range. | 322 | * find a free slot in the 0-298 range. |
308 | */ | 323 | */ |
309 | 324 | ||
310 | #define _syscall0(type,name) \ | 325 | #define _syscall0(type,name) \ |
@@ -458,6 +473,7 @@ return -1; \ | |||
458 | #define __ARCH_WANT_SYS_OLDUMOUNT | 473 | #define __ARCH_WANT_SYS_OLDUMOUNT |
459 | #define __ARCH_WANT_SYS_SIGPENDING | 474 | #define __ARCH_WANT_SYS_SIGPENDING |
460 | #define __ARCH_WANT_SYS_SIGPROCMASK | 475 | #define __ARCH_WANT_SYS_SIGPROCMASK |
476 | #define __ARCH_WANT_SYS_RT_SIGSUSPEND | ||
461 | #endif | 477 | #endif |
462 | 478 | ||
463 | #ifdef __KERNEL_SYSCALLS__ | 479 | #ifdef __KERNEL_SYSCALLS__ |
diff --git a/include/asm-sparc64/thread_info.h b/include/asm-sparc64/thread_info.h index c94d8b3991bd..ac9d068aab4f 100644 --- a/include/asm-sparc64/thread_info.h +++ b/include/asm-sparc64/thread_info.h | |||
@@ -221,7 +221,7 @@ register struct thread_info *current_thread_info_reg asm("g6"); | |||
221 | * nop | 221 | * nop |
222 | */ | 222 | */ |
223 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ | 223 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ |
224 | #define TIF_NOTIFY_RESUME 1 /* resumption notification requested */ | 224 | #define TIF_RESTORE_SIGMASK 1 /* restore signal mask in do_signal() */ |
225 | #define TIF_SIGPENDING 2 /* signal pending */ | 225 | #define TIF_SIGPENDING 2 /* signal pending */ |
226 | #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ | 226 | #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ |
227 | #define TIF_PERFCTR 4 /* performance counters active */ | 227 | #define TIF_PERFCTR 4 /* performance counters active */ |
@@ -241,7 +241,6 @@ register struct thread_info *current_thread_info_reg asm("g6"); | |||
241 | #define TIF_POLLING_NRFLAG 14 | 241 | #define TIF_POLLING_NRFLAG 14 |
242 | 242 | ||
243 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) | 243 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) |
244 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) | ||
245 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) | 244 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) |
246 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) | 245 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) |
247 | #define _TIF_PERFCTR (1<<TIF_PERFCTR) | 246 | #define _TIF_PERFCTR (1<<TIF_PERFCTR) |
@@ -250,11 +249,12 @@ register struct thread_info *current_thread_info_reg asm("g6"); | |||
250 | #define _TIF_32BIT (1<<TIF_32BIT) | 249 | #define _TIF_32BIT (1<<TIF_32BIT) |
251 | #define _TIF_SECCOMP (1<<TIF_SECCOMP) | 250 | #define _TIF_SECCOMP (1<<TIF_SECCOMP) |
252 | #define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT) | 251 | #define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT) |
252 | #define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) | ||
253 | #define _TIF_ABI_PENDING (1<<TIF_ABI_PENDING) | 253 | #define _TIF_ABI_PENDING (1<<TIF_ABI_PENDING) |
254 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) | 254 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) |
255 | 255 | ||
256 | #define _TIF_USER_WORK_MASK ((0xff << TI_FLAG_WSAVED_SHIFT) | \ | 256 | #define _TIF_USER_WORK_MASK ((0xff << TI_FLAG_WSAVED_SHIFT) | \ |
257 | (_TIF_NOTIFY_RESUME | _TIF_SIGPENDING | \ | 257 | (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK | \ |
258 | _TIF_NEED_RESCHED | _TIF_PERFCTR)) | 258 | _TIF_NEED_RESCHED | _TIF_PERFCTR)) |
259 | 259 | ||
260 | #endif /* __KERNEL__ */ | 260 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-sparc64/unistd.h b/include/asm-sparc64/unistd.h index 51ec2879b881..84ac2bdb0902 100644 --- a/include/asm-sparc64/unistd.h +++ b/include/asm-sparc64/unistd.h | |||
@@ -302,11 +302,26 @@ | |||
302 | #define __NR_add_key 281 | 302 | #define __NR_add_key 281 |
303 | #define __NR_request_key 282 | 303 | #define __NR_request_key 282 |
304 | #define __NR_keyctl 283 | 304 | #define __NR_keyctl 283 |
305 | #define __NR_openat 284 | ||
306 | #define __NR_mkdirat 285 | ||
307 | #define __NR_mknodat 286 | ||
308 | #define __NR_fchownat 287 | ||
309 | #define __NR_futimesat 288 | ||
310 | #define __NR_newfstatat 289 | ||
311 | #define __NR_unlinkat 290 | ||
312 | #define __NR_renameat 291 | ||
313 | #define __NR_linkat 292 | ||
314 | #define __NR_symlinkat 293 | ||
315 | #define __NR_readlinkat 294 | ||
316 | #define __NR_fchmodat 295 | ||
317 | #define __NR_faccessat 296 | ||
318 | #define __NR_pselect6 297 | ||
319 | #define __NR_ppoll 298 | ||
305 | 320 | ||
306 | /* WARNING: You MAY NOT add syscall numbers larger than 283, since | 321 | /* WARNING: You MAY NOT add syscall numbers larger than 298, since |
307 | * all of the syscall tables in the Sparc kernel are | 322 | * all of the syscall tables in the Sparc kernel are |
308 | * sized to have 283 entries (starting at zero). Therefore | 323 | * sized to have 298 entries (starting at zero). Therefore |
309 | * find a free slot in the 0-282 range. | 324 | * find a free slot in the 0-298 range. |
310 | */ | 325 | */ |
311 | 326 | ||
312 | #define _syscall0(type,name) \ | 327 | #define _syscall0(type,name) \ |
@@ -501,6 +516,8 @@ asmlinkage long sys_rt_sigaction(int sig, | |||
501 | #define __ARCH_WANT_SYS_OLDUMOUNT | 516 | #define __ARCH_WANT_SYS_OLDUMOUNT |
502 | #define __ARCH_WANT_SYS_SIGPENDING | 517 | #define __ARCH_WANT_SYS_SIGPENDING |
503 | #define __ARCH_WANT_SYS_SIGPROCMASK | 518 | #define __ARCH_WANT_SYS_SIGPROCMASK |
519 | #define __ARCH_WANT_SYS_RT_SIGSUSPEND | ||
520 | #define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND | ||
504 | #endif | 521 | #endif |
505 | 522 | ||
506 | /* | 523 | /* |