diff options
Diffstat (limited to 'include/asm-sparc64')
-rw-r--r-- | include/asm-sparc64/dma-mapping.h | 4 | ||||
-rw-r--r-- | include/asm-sparc64/futex.h | 4 | ||||
-rw-r--r-- | include/asm-sparc64/pgalloc.h | 2 | ||||
-rw-r--r-- | include/asm-sparc64/unistd.h | 118 |
4 files changed, 5 insertions, 123 deletions
diff --git a/include/asm-sparc64/dma-mapping.h b/include/asm-sparc64/dma-mapping.h index 27c46fbeebd6..2f858a2df94a 100644 --- a/include/asm-sparc64/dma-mapping.h +++ b/include/asm-sparc64/dma-mapping.h | |||
@@ -181,7 +181,7 @@ dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle, size_t siz | |||
181 | 181 | ||
182 | #define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f) | 182 | #define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f) |
183 | #define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) | 183 | #define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) |
184 | #define dma_is_consistent(d) (1) | 184 | #define dma_is_consistent(d, h) (1) |
185 | 185 | ||
186 | static inline int | 186 | static inline int |
187 | dma_get_cache_alignment(void) | 187 | dma_get_cache_alignment(void) |
@@ -210,7 +210,7 @@ dma_sync_single_range_for_device(struct device *dev, dma_addr_t dma_handle, | |||
210 | } | 210 | } |
211 | 211 | ||
212 | static inline void | 212 | static inline void |
213 | dma_cache_sync(void *vaddr, size_t size, | 213 | dma_cache_sync(struct device *dev, void *vaddr, size_t size, |
214 | enum dma_data_direction direction) | 214 | enum dma_data_direction direction) |
215 | { | 215 | { |
216 | /* could define this in terms of the dma_cache ... operations, | 216 | /* could define this in terms of the dma_cache ... operations, |
diff --git a/include/asm-sparc64/futex.h b/include/asm-sparc64/futex.h index 7392fc4a954e..876312fe82cc 100644 --- a/include/asm-sparc64/futex.h +++ b/include/asm-sparc64/futex.h | |||
@@ -45,7 +45,7 @@ static inline int futex_atomic_op_inuser(int encoded_op, int __user *uaddr) | |||
45 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) | 45 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) |
46 | oparg = 1 << oparg; | 46 | oparg = 1 << oparg; |
47 | 47 | ||
48 | inc_preempt_count(); | 48 | pagefault_disable(); |
49 | 49 | ||
50 | switch (op) { | 50 | switch (op) { |
51 | case FUTEX_OP_SET: | 51 | case FUTEX_OP_SET: |
@@ -67,7 +67,7 @@ static inline int futex_atomic_op_inuser(int encoded_op, int __user *uaddr) | |||
67 | ret = -ENOSYS; | 67 | ret = -ENOSYS; |
68 | } | 68 | } |
69 | 69 | ||
70 | dec_preempt_count(); | 70 | pagefault_enable(); |
71 | 71 | ||
72 | if (!ret) { | 72 | if (!ret) { |
73 | switch (cmp) { | 73 | switch (cmp) { |
diff --git a/include/asm-sparc64/pgalloc.h b/include/asm-sparc64/pgalloc.h index 010f9cd0a672..5891ff7ba760 100644 --- a/include/asm-sparc64/pgalloc.h +++ b/include/asm-sparc64/pgalloc.h | |||
@@ -13,7 +13,7 @@ | |||
13 | #include <asm/page.h> | 13 | #include <asm/page.h> |
14 | 14 | ||
15 | /* Page table allocation/freeing. */ | 15 | /* Page table allocation/freeing. */ |
16 | extern kmem_cache_t *pgtable_cache; | 16 | extern struct kmem_cache *pgtable_cache; |
17 | 17 | ||
18 | static inline pgd_t *pgd_alloc(struct mm_struct *mm) | 18 | static inline pgd_t *pgd_alloc(struct mm_struct *mm) |
19 | { | 19 | { |
diff --git a/include/asm-sparc64/unistd.h b/include/asm-sparc64/unistd.h index 63669dad0d72..47047536f261 100644 --- a/include/asm-sparc64/unistd.h +++ b/include/asm-sparc64/unistd.h | |||
@@ -332,124 +332,6 @@ | |||
332 | * find a free slot in the 0-302 range. | 332 | * find a free slot in the 0-302 range. |
333 | */ | 333 | */ |
334 | 334 | ||
335 | #define _syscall0(type,name) \ | ||
336 | type name(void) \ | ||
337 | { \ | ||
338 | long __res; \ | ||
339 | register long __g1 __asm__ ("g1") = __NR_##name; \ | ||
340 | __asm__ __volatile__ ("t 0x6d\n\t" \ | ||
341 | "sub %%g0, %%o0, %0\n\t" \ | ||
342 | "movcc %%xcc, %%o0, %0\n\t" \ | ||
343 | : "=r" (__res)\ | ||
344 | : "r" (__g1) \ | ||
345 | : "o0", "cc"); \ | ||
346 | if (__res >= 0) \ | ||
347 | return (type) __res; \ | ||
348 | errno = -__res; \ | ||
349 | return -1; \ | ||
350 | } | ||
351 | |||
352 | #define _syscall1(type,name,type1,arg1) \ | ||
353 | type name(type1 arg1) \ | ||
354 | { \ | ||
355 | long __res; \ | ||
356 | register long __g1 __asm__ ("g1") = __NR_##name; \ | ||
357 | register long __o0 __asm__ ("o0") = (long)(arg1); \ | ||
358 | __asm__ __volatile__ ("t 0x6d\n\t" \ | ||
359 | "sub %%g0, %%o0, %0\n\t" \ | ||
360 | "movcc %%xcc, %%o0, %0\n\t" \ | ||
361 | : "=r" (__res), "=&r" (__o0) \ | ||
362 | : "1" (__o0), "r" (__g1) \ | ||
363 | : "cc"); \ | ||
364 | if (__res >= 0) \ | ||
365 | return (type) __res; \ | ||
366 | errno = -__res; \ | ||
367 | return -1; \ | ||
368 | } | ||
369 | |||
370 | #define _syscall2(type,name,type1,arg1,type2,arg2) \ | ||
371 | type name(type1 arg1,type2 arg2) \ | ||
372 | { \ | ||
373 | long __res; \ | ||
374 | register long __g1 __asm__ ("g1") = __NR_##name; \ | ||
375 | register long __o0 __asm__ ("o0") = (long)(arg1); \ | ||
376 | register long __o1 __asm__ ("o1") = (long)(arg2); \ | ||
377 | __asm__ __volatile__ ("t 0x6d\n\t" \ | ||
378 | "sub %%g0, %%o0, %0\n\t" \ | ||
379 | "movcc %%xcc, %%o0, %0\n\t" \ | ||
380 | : "=r" (__res), "=&r" (__o0) \ | ||
381 | : "1" (__o0), "r" (__o1), "r" (__g1) \ | ||
382 | : "cc"); \ | ||
383 | if (__res >= 0) \ | ||
384 | return (type) __res; \ | ||
385 | errno = -__res; \ | ||
386 | return -1; \ | ||
387 | } | ||
388 | |||
389 | #define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \ | ||
390 | type name(type1 arg1,type2 arg2,type3 arg3) \ | ||
391 | { \ | ||
392 | long __res; \ | ||
393 | register long __g1 __asm__ ("g1") = __NR_##name; \ | ||
394 | register long __o0 __asm__ ("o0") = (long)(arg1); \ | ||
395 | register long __o1 __asm__ ("o1") = (long)(arg2); \ | ||
396 | register long __o2 __asm__ ("o2") = (long)(arg3); \ | ||
397 | __asm__ __volatile__ ("t 0x6d\n\t" \ | ||
398 | "sub %%g0, %%o0, %0\n\t" \ | ||
399 | "movcc %%xcc, %%o0, %0\n\t" \ | ||
400 | : "=r" (__res), "=&r" (__o0) \ | ||
401 | : "1" (__o0), "r" (__o1), "r" (__o2), "r" (__g1) \ | ||
402 | : "cc"); \ | ||
403 | if (__res>=0) \ | ||
404 | return (type) __res; \ | ||
405 | errno = -__res; \ | ||
406 | return -1; \ | ||
407 | } | ||
408 | |||
409 | #define _syscall4(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \ | ||
410 | type name (type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ | ||
411 | { \ | ||
412 | long __res; \ | ||
413 | register long __g1 __asm__ ("g1") = __NR_##name; \ | ||
414 | register long __o0 __asm__ ("o0") = (long)(arg1); \ | ||
415 | register long __o1 __asm__ ("o1") = (long)(arg2); \ | ||
416 | register long __o2 __asm__ ("o2") = (long)(arg3); \ | ||
417 | register long __o3 __asm__ ("o3") = (long)(arg4); \ | ||
418 | __asm__ __volatile__ ("t 0x6d\n\t" \ | ||
419 | "sub %%g0, %%o0, %0\n\t" \ | ||
420 | "movcc %%xcc, %%o0, %0\n\t" \ | ||
421 | : "=r" (__res), "=&r" (__o0) \ | ||
422 | : "1" (__o0), "r" (__o1), "r" (__o2), "r" (__o3), "r" (__g1) \ | ||
423 | : "cc"); \ | ||
424 | if (__res>=0) \ | ||
425 | return (type) __res; \ | ||
426 | errno = -__res; \ | ||
427 | return -1; \ | ||
428 | } | ||
429 | |||
430 | #define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \ | ||
431 | type5,arg5) \ | ||
432 | type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \ | ||
433 | { \ | ||
434 | long __res; \ | ||
435 | register long __g1 __asm__ ("g1") = __NR_##name; \ | ||
436 | register long __o0 __asm__ ("o0") = (long)(arg1); \ | ||
437 | register long __o1 __asm__ ("o1") = (long)(arg2); \ | ||
438 | register long __o2 __asm__ ("o2") = (long)(arg3); \ | ||
439 | register long __o3 __asm__ ("o3") = (long)(arg4); \ | ||
440 | register long __o4 __asm__ ("o4") = (long)(arg5); \ | ||
441 | __asm__ __volatile__ ("t 0x6d\n\t" \ | ||
442 | "sub %%g0, %%o0, %0\n\t" \ | ||
443 | "movcc %%xcc, %%o0, %0\n\t" \ | ||
444 | : "=r" (__res), "=&r" (__o0) \ | ||
445 | : "1" (__o0), "r" (__o1), "r" (__o2), "r" (__o3), "r" (__o4), "r" (__g1) \ | ||
446 | : "cc"); \ | ||
447 | if (__res>=0) \ | ||
448 | return (type) __res; \ | ||
449 | errno = -__res; \ | ||
450 | return -1; \ | ||
451 | } | ||
452 | |||
453 | /* sysconf options, for SunOS compatibility */ | 335 | /* sysconf options, for SunOS compatibility */ |
454 | #define _SC_ARG_MAX 1 | 336 | #define _SC_ARG_MAX 1 |
455 | #define _SC_CHILD_MAX 2 | 337 | #define _SC_CHILD_MAX 2 |