diff options
author | Arnd Bergmann <arnd@arndb.de> | 2006-12-06 23:37:29 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-07 11:39:37 -0500 |
commit | f5738ceed46782aea7663d62cb6398eb05fc4ce0 (patch) | |
tree | 156ebf498bc1d892d6f9e33d2751869417e30eb4 /include/asm-x86_64/unistd.h | |
parent | 28ec24e23229ae3d333f8d7f0e6b31fa8ea7bf46 (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-x86_64/unistd.h')
-rw-r--r-- | include/asm-x86_64/unistd.h | 99 |
1 files changed, 0 insertions, 99 deletions
diff --git a/include/asm-x86_64/unistd.h b/include/asm-x86_64/unistd.h index 777288eb7e75..c5f596e71faa 100644 --- a/include/asm-x86_64/unistd.h +++ b/include/asm-x86_64/unistd.h | |||
@@ -622,25 +622,7 @@ __SYSCALL(__NR_move_pages, sys_move_pages) | |||
622 | 622 | ||
623 | #define __NR_syscall_max __NR_move_pages | 623 | #define __NR_syscall_max __NR_move_pages |
624 | 624 | ||
625 | #ifdef __KERNEL__ | ||
626 | #include <linux/err.h> | ||
627 | #endif | ||
628 | |||
629 | #ifndef __NO_STUBS | 625 | #ifndef __NO_STUBS |
630 | |||
631 | /* user-visible error numbers are in the range -1 - -MAX_ERRNO */ | ||
632 | |||
633 | #define __syscall_clobber "r11","rcx","memory" | ||
634 | |||
635 | #define __syscall_return(type, res) \ | ||
636 | do { \ | ||
637 | if ((unsigned long)(res) >= (unsigned long)(-MAX_ERRNO)) { \ | ||
638 | errno = -(res); \ | ||
639 | res = -1; \ | ||
640 | } \ | ||
641 | return (type) (res); \ | ||
642 | } while (0) | ||
643 | |||
644 | #define __ARCH_WANT_OLD_READDIR | 626 | #define __ARCH_WANT_OLD_READDIR |
645 | #define __ARCH_WANT_OLD_STAT | 627 | #define __ARCH_WANT_OLD_STAT |
646 | #define __ARCH_WANT_SYS_ALARM | 628 | #define __ARCH_WANT_SYS_ALARM |
@@ -664,87 +646,6 @@ do { \ | |||
664 | #define __ARCH_WANT_SYS_TIME | 646 | #define __ARCH_WANT_SYS_TIME |
665 | #define __ARCH_WANT_COMPAT_SYS_TIME | 647 | #define __ARCH_WANT_COMPAT_SYS_TIME |
666 | 648 | ||
667 | #define __syscall "syscall" | ||
668 | |||
669 | #define _syscall0(type,name) \ | ||
670 | type name(void) \ | ||
671 | { \ | ||
672 | long __res; \ | ||
673 | __asm__ volatile (__syscall \ | ||
674 | : "=a" (__res) \ | ||
675 | : "0" (__NR_##name) : __syscall_clobber ); \ | ||
676 | __syscall_return(type,__res); \ | ||
677 | } | ||
678 | |||
679 | #define _syscall1(type,name,type1,arg1) \ | ||
680 | type name(type1 arg1) \ | ||
681 | { \ | ||
682 | long __res; \ | ||
683 | __asm__ volatile (__syscall \ | ||
684 | : "=a" (__res) \ | ||
685 | : "0" (__NR_##name),"D" ((long)(arg1)) : __syscall_clobber ); \ | ||
686 | __syscall_return(type,__res); \ | ||
687 | } | ||
688 | |||
689 | #define _syscall2(type,name,type1,arg1,type2,arg2) \ | ||
690 | type name(type1 arg1,type2 arg2) \ | ||
691 | { \ | ||
692 | long __res; \ | ||
693 | __asm__ volatile (__syscall \ | ||
694 | : "=a" (__res) \ | ||
695 | : "0" (__NR_##name),"D" ((long)(arg1)),"S" ((long)(arg2)) : __syscall_clobber ); \ | ||
696 | __syscall_return(type,__res); \ | ||
697 | } | ||
698 | |||
699 | #define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \ | ||
700 | type name(type1 arg1,type2 arg2,type3 arg3) \ | ||
701 | { \ | ||
702 | long __res; \ | ||
703 | __asm__ volatile (__syscall \ | ||
704 | : "=a" (__res) \ | ||
705 | : "0" (__NR_##name),"D" ((long)(arg1)),"S" ((long)(arg2)), \ | ||
706 | "d" ((long)(arg3)) : __syscall_clobber); \ | ||
707 | __syscall_return(type,__res); \ | ||
708 | } | ||
709 | |||
710 | #define _syscall4(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \ | ||
711 | type name (type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ | ||
712 | { \ | ||
713 | long __res; \ | ||
714 | __asm__ volatile ("movq %5,%%r10 ;" __syscall \ | ||
715 | : "=a" (__res) \ | ||
716 | : "0" (__NR_##name),"D" ((long)(arg1)),"S" ((long)(arg2)), \ | ||
717 | "d" ((long)(arg3)),"g" ((long)(arg4)) : __syscall_clobber,"r10" ); \ | ||
718 | __syscall_return(type,__res); \ | ||
719 | } | ||
720 | |||
721 | #define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \ | ||
722 | type5,arg5) \ | ||
723 | type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \ | ||
724 | { \ | ||
725 | long __res; \ | ||
726 | __asm__ volatile ("movq %5,%%r10 ; movq %6,%%r8 ; " __syscall \ | ||
727 | : "=a" (__res) \ | ||
728 | : "0" (__NR_##name),"D" ((long)(arg1)),"S" ((long)(arg2)), \ | ||
729 | "d" ((long)(arg3)),"g" ((long)(arg4)),"g" ((long)(arg5)) : \ | ||
730 | __syscall_clobber,"r8","r10" ); \ | ||
731 | __syscall_return(type,__res); \ | ||
732 | } | ||
733 | |||
734 | #define _syscall6(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \ | ||
735 | type5,arg5,type6,arg6) \ | ||
736 | type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5,type6 arg6) \ | ||
737 | { \ | ||
738 | long __res; \ | ||
739 | __asm__ volatile ("movq %5,%%r10 ; movq %6,%%r8 ; movq %7,%%r9 ; " __syscall \ | ||
740 | : "=a" (__res) \ | ||
741 | : "0" (__NR_##name),"D" ((long)(arg1)),"S" ((long)(arg2)), \ | ||
742 | "d" ((long)(arg3)), "g" ((long)(arg4)), "g" ((long)(arg5)), \ | ||
743 | "g" ((long)(arg6)) : \ | ||
744 | __syscall_clobber,"r8","r10","r9" ); \ | ||
745 | __syscall_return(type,__res); \ | ||
746 | } | ||
747 | |||
748 | #ifdef __KERNEL__ | 649 | #ifdef __KERNEL__ |
749 | #ifndef __ASSEMBLY__ | 650 | #ifndef __ASSEMBLY__ |
750 | 651 | ||