diff options
Diffstat (limited to 'include/asm-x86_64')
-rw-r--r-- | include/asm-x86_64/Kbuild | 1 | ||||
-rw-r--r-- | include/asm-x86_64/atomic.h | 2 | ||||
-rw-r--r-- | include/asm-x86_64/dma-mapping.h | 5 | ||||
-rw-r--r-- | include/asm-x86_64/futex.h | 4 | ||||
-rw-r--r-- | include/asm-x86_64/smp.h | 7 | ||||
-rw-r--r-- | include/asm-x86_64/spinlock_types.h | 4 | ||||
-rw-r--r-- | include/asm-x86_64/unistd.h | 99 |
7 files changed, 8 insertions, 114 deletions
diff --git a/include/asm-x86_64/Kbuild b/include/asm-x86_64/Kbuild index 6c455b4068c0..ebd7117782a6 100644 --- a/include/asm-x86_64/Kbuild +++ b/include/asm-x86_64/Kbuild | |||
@@ -11,7 +11,6 @@ header-y += ldt.h | |||
11 | header-y += msr.h | 11 | header-y += msr.h |
12 | header-y += prctl.h | 12 | header-y += prctl.h |
13 | header-y += ptrace-abi.h | 13 | header-y += ptrace-abi.h |
14 | header-y += setup.h | ||
15 | header-y += sigcontext32.h | 14 | header-y += sigcontext32.h |
16 | header-y += ucontext.h | 15 | header-y += ucontext.h |
17 | header-y += vsyscall32.h | 16 | header-y += vsyscall32.h |
diff --git a/include/asm-x86_64/atomic.h b/include/asm-x86_64/atomic.h index 626d3715fbb5..706ca4b60000 100644 --- a/include/asm-x86_64/atomic.h +++ b/include/asm-x86_64/atomic.h | |||
@@ -21,7 +21,7 @@ | |||
21 | * on us. We need to use _exactly_ the address the user gave us, | 21 | * on us. We need to use _exactly_ the address the user gave us, |
22 | * not some alias that contains the same information. | 22 | * not some alias that contains the same information. |
23 | */ | 23 | */ |
24 | typedef struct { volatile int counter; } atomic_t; | 24 | typedef struct { int counter; } atomic_t; |
25 | 25 | ||
26 | #define ATOMIC_INIT(i) { (i) } | 26 | #define ATOMIC_INIT(i) { (i) } |
27 | 27 | ||
diff --git a/include/asm-x86_64/dma-mapping.h b/include/asm-x86_64/dma-mapping.h index 10174b110a5c..be9ec6890723 100644 --- a/include/asm-x86_64/dma-mapping.h +++ b/include/asm-x86_64/dma-mapping.h | |||
@@ -180,12 +180,13 @@ static inline int dma_get_cache_alignment(void) | |||
180 | return boot_cpu_data.x86_clflush_size; | 180 | return boot_cpu_data.x86_clflush_size; |
181 | } | 181 | } |
182 | 182 | ||
183 | #define dma_is_consistent(h) 1 | 183 | #define dma_is_consistent(d, h) 1 |
184 | 184 | ||
185 | extern int dma_set_mask(struct device *dev, u64 mask); | 185 | extern int dma_set_mask(struct device *dev, u64 mask); |
186 | 186 | ||
187 | static inline void | 187 | static inline void |
188 | dma_cache_sync(void *vaddr, size_t size, enum dma_data_direction dir) | 188 | dma_cache_sync(struct device *dev, void *vaddr, size_t size, |
189 | enum dma_data_direction dir) | ||
189 | { | 190 | { |
190 | flush_write_buffers(); | 191 | flush_write_buffers(); |
191 | } | 192 | } |
diff --git a/include/asm-x86_64/futex.h b/include/asm-x86_64/futex.h index 9804bf07b092..5cdfb08013c3 100644 --- a/include/asm-x86_64/futex.h +++ b/include/asm-x86_64/futex.h | |||
@@ -55,7 +55,7 @@ futex_atomic_op_inuser (int encoded_op, int __user *uaddr) | |||
55 | if (! access_ok (VERIFY_WRITE, uaddr, sizeof(int))) | 55 | if (! access_ok (VERIFY_WRITE, uaddr, sizeof(int))) |
56 | return -EFAULT; | 56 | return -EFAULT; |
57 | 57 | ||
58 | inc_preempt_count(); | 58 | pagefault_disable(); |
59 | 59 | ||
60 | switch (op) { | 60 | switch (op) { |
61 | case FUTEX_OP_SET: | 61 | case FUTEX_OP_SET: |
@@ -78,7 +78,7 @@ futex_atomic_op_inuser (int encoded_op, int __user *uaddr) | |||
78 | ret = -ENOSYS; | 78 | ret = -ENOSYS; |
79 | } | 79 | } |
80 | 80 | ||
81 | dec_preempt_count(); | 81 | pagefault_enable(); |
82 | 82 | ||
83 | if (!ret) { | 83 | if (!ret) { |
84 | switch (cmp) { | 84 | switch (cmp) { |
diff --git a/include/asm-x86_64/smp.h b/include/asm-x86_64/smp.h index 7ae7e7d89d16..e17b9ec42e98 100644 --- a/include/asm-x86_64/smp.h +++ b/include/asm-x86_64/smp.h | |||
@@ -113,13 +113,6 @@ static __inline int logical_smp_processor_id(void) | |||
113 | #define cpu_physical_id(cpu) x86_cpu_to_apicid[cpu] | 113 | #define cpu_physical_id(cpu) x86_cpu_to_apicid[cpu] |
114 | #else | 114 | #else |
115 | #define cpu_physical_id(cpu) boot_cpu_id | 115 | #define cpu_physical_id(cpu) boot_cpu_id |
116 | static inline int smp_call_function_single(int cpuid, void (*func) (void *info), | ||
117 | void *info, int retry, int wait) | ||
118 | { | ||
119 | /* Disable interrupts here? */ | ||
120 | func(info); | ||
121 | return 0; | ||
122 | } | ||
123 | #endif /* !CONFIG_SMP */ | 116 | #endif /* !CONFIG_SMP */ |
124 | #endif | 117 | #endif |
125 | 118 | ||
diff --git a/include/asm-x86_64/spinlock_types.h b/include/asm-x86_64/spinlock_types.h index 59efe849f351..4da9345c1500 100644 --- a/include/asm-x86_64/spinlock_types.h +++ b/include/asm-x86_64/spinlock_types.h | |||
@@ -6,13 +6,13 @@ | |||
6 | #endif | 6 | #endif |
7 | 7 | ||
8 | typedef struct { | 8 | typedef struct { |
9 | volatile unsigned int slock; | 9 | unsigned int slock; |
10 | } raw_spinlock_t; | 10 | } raw_spinlock_t; |
11 | 11 | ||
12 | #define __RAW_SPIN_LOCK_UNLOCKED { 1 } | 12 | #define __RAW_SPIN_LOCK_UNLOCKED { 1 } |
13 | 13 | ||
14 | typedef struct { | 14 | typedef struct { |
15 | volatile unsigned int lock; | 15 | unsigned int lock; |
16 | } raw_rwlock_t; | 16 | } raw_rwlock_t; |
17 | 17 | ||
18 | #define __RAW_RW_LOCK_UNLOCKED { RW_LOCK_BIAS } | 18 | #define __RAW_RW_LOCK_UNLOCKED { RW_LOCK_BIAS } |
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 | ||