diff options
Diffstat (limited to 'include/asm-m68knommu')
-rw-r--r-- | include/asm-m68knommu/atomic.h | 2 | ||||
-rw-r--r-- | include/asm-m68knommu/bitops.h | 3 | ||||
-rw-r--r-- | include/asm-m68knommu/futex.h | 49 | ||||
-rw-r--r-- | include/asm-m68knommu/ioctl.h | 2 | ||||
-rw-r--r-- | include/asm-m68knommu/irq.h | 6 | ||||
-rw-r--r-- | include/asm-m68knommu/machdep.h | 1 | ||||
-rw-r--r-- | include/asm-m68knommu/mutex.h | 9 | ||||
-rw-r--r-- | include/asm-m68knommu/sigcontext.h | 1 | ||||
-rw-r--r-- | include/asm-m68knommu/thread_info.h | 2 |
9 files changed, 18 insertions, 57 deletions
diff --git a/include/asm-m68knommu/atomic.h b/include/asm-m68knommu/atomic.h index 3c1cc153c415..6c4e4b63e454 100644 --- a/include/asm-m68knommu/atomic.h +++ b/include/asm-m68knommu/atomic.h | |||
@@ -129,6 +129,7 @@ static inline int atomic_sub_return(int i, atomic_t * v) | |||
129 | } | 129 | } |
130 | 130 | ||
131 | #define atomic_cmpxchg(v, o, n) ((int)cmpxchg(&((v)->counter), (o), (n))) | 131 | #define atomic_cmpxchg(v, o, n) ((int)cmpxchg(&((v)->counter), (o), (n))) |
132 | #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) | ||
132 | 133 | ||
133 | #define atomic_add_unless(v, a, u) \ | 134 | #define atomic_add_unless(v, a, u) \ |
134 | ({ \ | 135 | ({ \ |
@@ -143,4 +144,5 @@ static inline int atomic_sub_return(int i, atomic_t * v) | |||
143 | #define atomic_dec_return(v) atomic_sub_return(1,(v)) | 144 | #define atomic_dec_return(v) atomic_sub_return(1,(v)) |
144 | #define atomic_inc_return(v) atomic_add_return(1,(v)) | 145 | #define atomic_inc_return(v) atomic_add_return(1,(v)) |
145 | 146 | ||
147 | #include <asm-generic/atomic.h> | ||
146 | #endif /* __ARCH_M68KNOMMU_ATOMIC __ */ | 148 | #endif /* __ARCH_M68KNOMMU_ATOMIC __ */ |
diff --git a/include/asm-m68knommu/bitops.h b/include/asm-m68knommu/bitops.h index c42f88a9b9f9..25d8a3cfef90 100644 --- a/include/asm-m68knommu/bitops.h +++ b/include/asm-m68knommu/bitops.h | |||
@@ -290,7 +290,7 @@ static __inline__ int find_next_zero_bit (const void * addr, int size, int offse | |||
290 | tmp = *p; | 290 | tmp = *p; |
291 | 291 | ||
292 | found_first: | 292 | found_first: |
293 | tmp |= ~0UL >> size; | 293 | tmp |= ~0UL << size; |
294 | found_middle: | 294 | found_middle: |
295 | return result + ffz(tmp); | 295 | return result + ffz(tmp); |
296 | } | 296 | } |
@@ -499,5 +499,6 @@ found_middle: | |||
499 | * fls: find last bit set. | 499 | * fls: find last bit set. |
500 | */ | 500 | */ |
501 | #define fls(x) generic_fls(x) | 501 | #define fls(x) generic_fls(x) |
502 | #define fls64(x) generic_fls64(x) | ||
502 | 503 | ||
503 | #endif /* _M68KNOMMU_BITOPS_H */ | 504 | #endif /* _M68KNOMMU_BITOPS_H */ |
diff --git a/include/asm-m68knommu/futex.h b/include/asm-m68knommu/futex.h index 9feff4ce1424..6a332a9f099c 100644 --- a/include/asm-m68knommu/futex.h +++ b/include/asm-m68knommu/futex.h | |||
@@ -1,53 +1,6 @@ | |||
1 | #ifndef _ASM_FUTEX_H | 1 | #ifndef _ASM_FUTEX_H |
2 | #define _ASM_FUTEX_H | 2 | #define _ASM_FUTEX_H |
3 | 3 | ||
4 | #ifdef __KERNEL__ | 4 | #include <asm-generic/futex.h> |
5 | 5 | ||
6 | #include <linux/futex.h> | ||
7 | #include <asm/errno.h> | ||
8 | #include <asm/uaccess.h> | ||
9 | |||
10 | static inline int | ||
11 | futex_atomic_op_inuser (int encoded_op, int __user *uaddr) | ||
12 | { | ||
13 | int op = (encoded_op >> 28) & 7; | ||
14 | int cmp = (encoded_op >> 24) & 15; | ||
15 | int oparg = (encoded_op << 8) >> 20; | ||
16 | int cmparg = (encoded_op << 20) >> 20; | ||
17 | int oldval = 0, ret; | ||
18 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) | ||
19 | oparg = 1 << oparg; | ||
20 | |||
21 | if (! access_ok (VERIFY_WRITE, uaddr, sizeof(int))) | ||
22 | return -EFAULT; | ||
23 | |||
24 | inc_preempt_count(); | ||
25 | |||
26 | switch (op) { | ||
27 | case FUTEX_OP_SET: | ||
28 | case FUTEX_OP_ADD: | ||
29 | case FUTEX_OP_OR: | ||
30 | case FUTEX_OP_ANDN: | ||
31 | case FUTEX_OP_XOR: | ||
32 | default: | ||
33 | ret = -ENOSYS; | ||
34 | } | ||
35 | |||
36 | dec_preempt_count(); | ||
37 | |||
38 | if (!ret) { | ||
39 | switch (cmp) { | ||
40 | case FUTEX_OP_CMP_EQ: ret = (oldval == cmparg); break; | ||
41 | case FUTEX_OP_CMP_NE: ret = (oldval != cmparg); break; | ||
42 | case FUTEX_OP_CMP_LT: ret = (oldval < cmparg); break; | ||
43 | case FUTEX_OP_CMP_GE: ret = (oldval >= cmparg); break; | ||
44 | case FUTEX_OP_CMP_LE: ret = (oldval <= cmparg); break; | ||
45 | case FUTEX_OP_CMP_GT: ret = (oldval > cmparg); break; | ||
46 | default: ret = -ENOSYS; | ||
47 | } | ||
48 | } | ||
49 | return ret; | ||
50 | } | ||
51 | |||
52 | #endif | ||
53 | #endif | 6 | #endif |
diff --git a/include/asm-m68knommu/ioctl.h b/include/asm-m68knommu/ioctl.h index cff72f33350f..b279fe06dfe5 100644 --- a/include/asm-m68knommu/ioctl.h +++ b/include/asm-m68knommu/ioctl.h | |||
@@ -1 +1 @@ | |||
#include <asm-m68k/ioctl.h> | #include <asm-generic/ioctl.h> | ||
diff --git a/include/asm-m68knommu/irq.h b/include/asm-m68knommu/irq.h index a08fa9b958da..20c48ec858a4 100644 --- a/include/asm-m68knommu/irq.h +++ b/include/asm-m68knommu/irq.h | |||
@@ -84,10 +84,8 @@ extern void (*mach_disable_irq)(unsigned int); | |||
84 | /* | 84 | /* |
85 | * Some drivers want these entry points | 85 | * Some drivers want these entry points |
86 | */ | 86 | */ |
87 | #define enable_irq(x) (mach_enable_irq ? (*mach_enable_irq)(x) : 0) | 87 | #define enable_irq(x) 0 |
88 | #define disable_irq(x) (mach_disable_irq ? (*mach_disable_irq)(x) : 0) | 88 | #define disable_irq(x) do { } while (0) |
89 | |||
90 | #define enable_irq_nosync(x) enable_irq(x) | ||
91 | #define disable_irq_nosync(x) disable_irq(x) | 89 | #define disable_irq_nosync(x) disable_irq(x) |
92 | 90 | ||
93 | struct irqaction; | 91 | struct irqaction; |
diff --git a/include/asm-m68knommu/machdep.h b/include/asm-m68knommu/machdep.h index 5a9f9c297f79..27c90afd3339 100644 --- a/include/asm-m68knommu/machdep.h +++ b/include/asm-m68knommu/machdep.h | |||
@@ -38,7 +38,6 @@ extern void (*mach_power_off)( void ); | |||
38 | extern unsigned long (*mach_hd_init) (unsigned long, unsigned long); | 38 | extern unsigned long (*mach_hd_init) (unsigned long, unsigned long); |
39 | extern void (*mach_hd_setup)(char *, int *); | 39 | extern void (*mach_hd_setup)(char *, int *); |
40 | extern long mach_max_dma_address; | 40 | extern long mach_max_dma_address; |
41 | extern void (*mach_floppy_setup)(char *, int *); | ||
42 | extern void (*mach_floppy_eject)(void); | 41 | extern void (*mach_floppy_eject)(void); |
43 | extern void (*mach_heartbeat) (int); | 42 | extern void (*mach_heartbeat) (int); |
44 | extern void (*mach_l2_flush) (int); | 43 | extern void (*mach_l2_flush) (int); |
diff --git a/include/asm-m68knommu/mutex.h b/include/asm-m68knommu/mutex.h new file mode 100644 index 000000000000..458c1f7fbc18 --- /dev/null +++ b/include/asm-m68knommu/mutex.h | |||
@@ -0,0 +1,9 @@ | |||
1 | /* | ||
2 | * Pull in the generic implementation for the mutex fastpath. | ||
3 | * | ||
4 | * TODO: implement optimized primitives instead, or leave the generic | ||
5 | * implementation in place, or pick the atomic_xchg() based generic | ||
6 | * implementation. (see asm-generic/mutex-xchg.h for details) | ||
7 | */ | ||
8 | |||
9 | #include <asm-generic/mutex-dec.h> | ||
diff --git a/include/asm-m68knommu/sigcontext.h b/include/asm-m68knommu/sigcontext.h index 84bf36dc7a83..36c293fc133d 100644 --- a/include/asm-m68knommu/sigcontext.h +++ b/include/asm-m68knommu/sigcontext.h | |||
@@ -8,6 +8,7 @@ struct sigcontext { | |||
8 | unsigned long sc_d1; | 8 | unsigned long sc_d1; |
9 | unsigned long sc_a0; | 9 | unsigned long sc_a0; |
10 | unsigned long sc_a1; | 10 | unsigned long sc_a1; |
11 | unsigned long sc_a5; | ||
11 | unsigned short sc_sr; | 12 | unsigned short sc_sr; |
12 | unsigned long sc_pc; | 13 | unsigned long sc_pc; |
13 | unsigned short sc_formatvec; | 14 | unsigned short sc_formatvec; |
diff --git a/include/asm-m68knommu/thread_info.h b/include/asm-m68knommu/thread_info.h index 7b9a3fa3af5d..b8f009edf2b2 100644 --- a/include/asm-m68knommu/thread_info.h +++ b/include/asm-m68knommu/thread_info.h | |||
@@ -75,8 +75,6 @@ static inline struct thread_info *current_thread_info(void) | |||
75 | #define alloc_thread_info(tsk) ((struct thread_info *) \ | 75 | #define alloc_thread_info(tsk) ((struct thread_info *) \ |
76 | __get_free_pages(GFP_KERNEL, THREAD_SIZE_ORDER)) | 76 | __get_free_pages(GFP_KERNEL, THREAD_SIZE_ORDER)) |
77 | #define free_thread_info(ti) free_pages((unsigned long) (ti), THREAD_SIZE_ORDER) | 77 | #define free_thread_info(ti) free_pages((unsigned long) (ti), THREAD_SIZE_ORDER) |
78 | #define get_thread_info(ti) get_task_struct((ti)->task) | ||
79 | #define put_thread_info(ti) put_task_struct((ti)->task) | ||
80 | #endif /* __ASSEMBLY__ */ | 78 | #endif /* __ASSEMBLY__ */ |
81 | 79 | ||
82 | #define PREEMPT_ACTIVE 0x4000000 | 80 | #define PREEMPT_ACTIVE 0x4000000 |