diff options
author | Len Brown <len.brown@intel.com> | 2005-09-08 01:45:47 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2005-09-08 01:45:47 -0400 |
commit | 64e47488c913ac704d465a6af86a26786d1412a5 (patch) | |
tree | d3b0148592963dcde26e4bb35ddfec8b1eaf8e23 /include/asm-m68knommu | |
parent | 4a35a46bf1cda4737c428380d1db5d15e2590d18 (diff) | |
parent | caf39e87cc1182f7dae84eefc43ca14d54c78ef9 (diff) |
Merge linux-2.6 with linux-acpi-2.6
Diffstat (limited to 'include/asm-m68knommu')
-rw-r--r-- | include/asm-m68knommu/auxvec.h | 4 | ||||
-rw-r--r-- | include/asm-m68knommu/futex.h | 53 | ||||
-rw-r--r-- | include/asm-m68knommu/hdreg.h | 1 | ||||
-rw-r--r-- | include/asm-m68knommu/page.h | 16 | ||||
-rw-r--r-- | include/asm-m68knommu/uaccess.h | 6 |
5 files changed, 59 insertions, 21 deletions
diff --git a/include/asm-m68knommu/auxvec.h b/include/asm-m68knommu/auxvec.h new file mode 100644 index 000000000000..844d6d52204b --- /dev/null +++ b/include/asm-m68knommu/auxvec.h | |||
@@ -0,0 +1,4 @@ | |||
1 | #ifndef __ASMm68k_AUXVEC_H | ||
2 | #define __ASMm68k_AUXVEC_H | ||
3 | |||
4 | #endif | ||
diff --git a/include/asm-m68knommu/futex.h b/include/asm-m68knommu/futex.h new file mode 100644 index 000000000000..2cac5ecd9d00 --- /dev/null +++ b/include/asm-m68knommu/futex.h | |||
@@ -0,0 +1,53 @@ | |||
1 | #ifndef _ASM_FUTEX_H | ||
2 | #define _ASM_FUTEX_H | ||
3 | |||
4 | #ifdef __KERNEL__ | ||
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, tem; | ||
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 | ||
diff --git a/include/asm-m68knommu/hdreg.h b/include/asm-m68knommu/hdreg.h deleted file mode 100644 index 5cdd9b084d37..000000000000 --- a/include/asm-m68knommu/hdreg.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-m68k/hdreg.h> | ||
diff --git a/include/asm-m68knommu/page.h b/include/asm-m68knommu/page.h index ff6a9265ed1c..942dfbead27f 100644 --- a/include/asm-m68knommu/page.h +++ b/include/asm-m68knommu/page.h | |||
@@ -48,20 +48,6 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
48 | /* to align the pointer to the (next) page boundary */ | 48 | /* to align the pointer to the (next) page boundary */ |
49 | #define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK) | 49 | #define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK) |
50 | 50 | ||
51 | /* Pure 2^n version of get_order */ | ||
52 | extern __inline__ int get_order(unsigned long size) | ||
53 | { | ||
54 | int order; | ||
55 | |||
56 | size = (size-1) >> (PAGE_SHIFT-1); | ||
57 | order = -1; | ||
58 | do { | ||
59 | size >>= 1; | ||
60 | order++; | ||
61 | } while (size); | ||
62 | return order; | ||
63 | } | ||
64 | |||
65 | extern unsigned long memory_start; | 51 | extern unsigned long memory_start; |
66 | extern unsigned long memory_end; | 52 | extern unsigned long memory_end; |
67 | 53 | ||
@@ -93,4 +79,6 @@ extern unsigned long memory_end; | |||
93 | 79 | ||
94 | #endif /* __KERNEL__ */ | 80 | #endif /* __KERNEL__ */ |
95 | 81 | ||
82 | #include <asm-generic/page.h> | ||
83 | |||
96 | #endif /* _M68KNOMMU_PAGE_H */ | 84 | #endif /* _M68KNOMMU_PAGE_H */ |
diff --git a/include/asm-m68knommu/uaccess.h b/include/asm-m68knommu/uaccess.h index f0be74bb353c..05be9515a2d2 100644 --- a/include/asm-m68knommu/uaccess.h +++ b/include/asm-m68knommu/uaccess.h | |||
@@ -23,12 +23,6 @@ static inline int _access_ok(unsigned long addr, unsigned long size) | |||
23 | (is_in_rom(addr) && is_in_rom(addr+size))); | 23 | (is_in_rom(addr) && is_in_rom(addr+size))); |
24 | } | 24 | } |
25 | 25 | ||
26 | /* this function will go away soon - use access_ok() instead */ | ||
27 | extern inline int __deprecated verify_area(int type, const void * addr, unsigned long size) | ||
28 | { | ||
29 | return access_ok(type,addr,size)?0:-EFAULT; | ||
30 | } | ||
31 | |||
32 | /* | 26 | /* |
33 | * The exception table consists of pairs of addresses: the first is the | 27 | * The exception table consists of pairs of addresses: the first is the |
34 | * address of an instruction that is allowed to fault, and the second is | 28 | * address of an instruction that is allowed to fault, and the second is |