aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sh64
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2006-12-06 23:37:29 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-07 11:39:37 -0500
commitf5738ceed46782aea7663d62cb6398eb05fc4ce0 (patch)
tree156ebf498bc1d892d6f9e33d2751869417e30eb4 /include/asm-sh64
parent28ec24e23229ae3d333f8d7f0e6b31fa8ea7bf46 (diff)
[PATCH] remove kernel syscalls
The last thing we agreed on was to remove the macros entirely for 2.6.19, on all architectures. Unfortunately, I think nobody actually _did_ that, so they are still there. [akpm@osdl.org: x86_64 fix] Cc: David Woodhouse <dwmw2@infradead.org> Cc: Greg Schafer <gschafer@zip.com.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-sh64')
-rw-r--r--include/asm-sh64/unistd.h142
1 files changed, 0 insertions, 142 deletions
diff --git a/include/asm-sh64/unistd.h b/include/asm-sh64/unistd.h
index ee7828b27ad1..1f38a7aacaaf 100644
--- a/include/asm-sh64/unistd.h
+++ b/include/asm-sh64/unistd.h
@@ -347,148 +347,6 @@
347#ifdef __KERNEL__ 347#ifdef __KERNEL__
348 348
349#define NR_syscalls 321 349#define NR_syscalls 321
350#include <linux/err.h>
351
352/* user-visible error numbers are in the range -1 - -MAX_ERRNO:
353 * see <asm-sh64/errno.h> */
354
355#define __syscall_return(type, res) \
356do { \
357 /* Note: when returning from kernel the return value is in r9 \
358 ** This prevents conflicts between return value and arg1 \
359 ** when dispatching signal handler, in other words makes \
360 ** life easier in the system call epilogue (see entry.S) \
361 */ \
362 register unsigned long __sr2 __asm__ ("r2") = res; \
363 if ((unsigned long)(res) >= (unsigned long)(-MAX_ERRNO)) { \
364 errno = -(res); \
365 __sr2 = -1; \
366 } \
367 return (type) (__sr2); \
368} while (0)
369
370/* XXX - _foo needs to be __foo, while __NR_bar could be _NR_bar. */
371
372#define _syscall0(type,name) \
373type name(void) \
374{ \
375register unsigned long __sc0 __asm__ ("r9") = ((0x10 << 16) | __NR_##name); \
376__asm__ __volatile__ ("trapa %1 !\t\t\t" #name "()" \
377 : "=r" (__sc0) \
378 : "r" (__sc0) ); \
379__syscall_return(type,__sc0); \
380}
381
382 /*
383 * The apparent spurious "dummy" assembler comment is *needed*,
384 * as without it, the compiler treats the arg<n> variables
385 * as no longer live just before the asm. The compiler can
386 * then optimize the storage into any registers it wishes.
387 * The additional dummy statement forces the compiler to put
388 * the arguments into the correct registers before the TRAPA.
389 */
390#define _syscall1(type,name,type1,arg1) \
391type name(type1 arg1) \
392{ \
393register unsigned long __sc0 __asm__ ("r9") = ((0x11 << 16) | __NR_##name); \
394register unsigned long __sc2 __asm__ ("r2") = (unsigned long) arg1; \
395__asm__ __volatile__ ("trapa %1 !\t\t\t" #name "(%2)" \
396 : "=r" (__sc0) \
397 : "r" (__sc0), "r" (__sc2)); \
398__asm__ __volatile__ ("!dummy %0 %1" \
399 : \
400 : "r" (__sc0), "r" (__sc2)); \
401__syscall_return(type,__sc0); \
402}
403
404#define _syscall2(type,name,type1,arg1,type2,arg2) \
405type name(type1 arg1,type2 arg2) \
406{ \
407register unsigned long __sc0 __asm__ ("r9") = ((0x12 << 16) | __NR_##name); \
408register unsigned long __sc2 __asm__ ("r2") = (unsigned long) arg1; \
409register unsigned long __sc3 __asm__ ("r3") = (unsigned long) arg2; \
410__asm__ __volatile__ ("trapa %1 !\t\t\t" #name "(%2,%3)" \
411 : "=r" (__sc0) \
412 : "r" (__sc0), "r" (__sc2), "r" (__sc3) ); \
413__asm__ __volatile__ ("!dummy %0 %1 %2" \
414 : \
415 : "r" (__sc0), "r" (__sc2), "r" (__sc3) ); \
416__syscall_return(type,__sc0); \
417}
418
419#define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \
420type name(type1 arg1,type2 arg2,type3 arg3) \
421{ \
422register unsigned long __sc0 __asm__ ("r9") = ((0x13 << 16) | __NR_##name); \
423register unsigned long __sc2 __asm__ ("r2") = (unsigned long) arg1; \
424register unsigned long __sc3 __asm__ ("r3") = (unsigned long) arg2; \
425register unsigned long __sc4 __asm__ ("r4") = (unsigned long) arg3; \
426__asm__ __volatile__ ("trapa %1 !\t\t\t" #name "(%2,%3,%4)" \
427 : "=r" (__sc0) \
428 : "r" (__sc0), "r" (__sc2), "r" (__sc3), "r" (__sc4) ); \
429__asm__ __volatile__ ("!dummy %0 %1 %2 %3" \
430 : \
431 : "r" (__sc0), "r" (__sc2), "r" (__sc3), "r" (__sc4) ); \
432__syscall_return(type,__sc0); \
433}
434
435#define _syscall4(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \
436type name (type1 arg1, type2 arg2, type3 arg3, type4 arg4) \
437{ \
438register unsigned long __sc0 __asm__ ("r9") = ((0x14 << 16) | __NR_##name); \
439register unsigned long __sc2 __asm__ ("r2") = (unsigned long) arg1; \
440register unsigned long __sc3 __asm__ ("r3") = (unsigned long) arg2; \
441register unsigned long __sc4 __asm__ ("r4") = (unsigned long) arg3; \
442register unsigned long __sc5 __asm__ ("r5") = (unsigned long) arg4; \
443__asm__ __volatile__ ("trapa %1 !\t\t\t" #name "(%2,%3,%4,%5)" \
444 : "=r" (__sc0) \
445 : "r" (__sc0), "r" (__sc2), "r" (__sc3), "r" (__sc4), "r" (__sc5) );\
446__asm__ __volatile__ ("!dummy %0 %1 %2 %3 %4" \
447 : \
448 : "r" (__sc0), "r" (__sc2), "r" (__sc3), "r" (__sc4), "r" (__sc5) );\
449__syscall_return(type,__sc0); \
450}
451
452#define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5) \
453type name (type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) \
454{ \
455register unsigned long __sc0 __asm__ ("r9") = ((0x15 << 16) | __NR_##name); \
456register unsigned long __sc2 __asm__ ("r2") = (unsigned long) arg1; \
457register unsigned long __sc3 __asm__ ("r3") = (unsigned long) arg2; \
458register unsigned long __sc4 __asm__ ("r4") = (unsigned long) arg3; \
459register unsigned long __sc5 __asm__ ("r5") = (unsigned long) arg4; \
460register unsigned long __sc6 __asm__ ("r6") = (unsigned long) arg5; \
461__asm__ __volatile__ ("trapa %1 !\t\t\t" #name "(%2,%3,%4,%5,%6)" \
462 : "=r" (__sc0) \
463 : "r" (__sc0), "r" (__sc2), "r" (__sc3), "r" (__sc4), "r" (__sc5), \
464 "r" (__sc6)); \
465__asm__ __volatile__ ("!dummy %0 %1 %2 %3 %4 %5" \
466 : \
467 : "r" (__sc0), "r" (__sc2), "r" (__sc3), "r" (__sc4), "r" (__sc5), \
468 "r" (__sc6)); \
469__syscall_return(type,__sc0); \
470}
471
472#define _syscall6(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5, type6, arg6) \
473type name (type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5, type6 arg6) \
474{ \
475register unsigned long __sc0 __asm__ ("r9") = ((0x16 << 16) | __NR_##name); \
476register unsigned long __sc2 __asm__ ("r2") = (unsigned long) arg1; \
477register unsigned long __sc3 __asm__ ("r3") = (unsigned long) arg2; \
478register unsigned long __sc4 __asm__ ("r4") = (unsigned long) arg3; \
479register unsigned long __sc5 __asm__ ("r5") = (unsigned long) arg4; \
480register unsigned long __sc6 __asm__ ("r6") = (unsigned long) arg5; \
481register unsigned long __sc7 __asm__ ("r7") = (unsigned long) arg6; \
482__asm__ __volatile__ ("trapa %1 !\t\t\t" #name "(%2,%3,%4,%5,%6,%7)" \
483 : "=r" (__sc0) \
484 : "r" (__sc0), "r" (__sc2), "r" (__sc3), "r" (__sc4), "r" (__sc5), \
485 "r" (__sc6), "r" (__sc7)); \
486__asm__ __volatile__ ("!dummy %0 %1 %2 %3 %4 %5 %6" \
487 : \
488 : "r" (__sc0), "r" (__sc2), "r" (__sc3), "r" (__sc4), "r" (__sc5), \
489 "r" (__sc6), "r" (__sc7)); \
490__syscall_return(type,__sc0); \
491}
492 350
493#define __ARCH_WANT_IPC_PARSE_VERSION 351#define __ARCH_WANT_IPC_PARSE_VERSION
494#define __ARCH_WANT_OLD_READDIR 352#define __ARCH_WANT_OLD_READDIR