diff options
Diffstat (limited to 'include/asm-parisc')
-rw-r--r-- | include/asm-parisc/auxvec.h | 4 | ||||
-rw-r--r-- | include/asm-parisc/compat.h | 10 | ||||
-rw-r--r-- | include/asm-parisc/fcntl.h | 56 | ||||
-rw-r--r-- | include/asm-parisc/futex.h | 53 | ||||
-rw-r--r-- | include/asm-parisc/hdreg.h | 1 | ||||
-rw-r--r-- | include/asm-parisc/irq.h | 5 | ||||
-rw-r--r-- | include/asm-parisc/page.h | 16 | ||||
-rw-r--r-- | include/asm-parisc/types.h | 2 | ||||
-rw-r--r-- | include/asm-parisc/uaccess.h | 4 |
9 files changed, 71 insertions, 80 deletions
diff --git a/include/asm-parisc/auxvec.h b/include/asm-parisc/auxvec.h new file mode 100644 index 000000000000..9c3ac4b89dc9 --- /dev/null +++ b/include/asm-parisc/auxvec.h | |||
@@ -0,0 +1,4 @@ | |||
1 | #ifndef __ASMPARISC_AUXVEC_H | ||
2 | #define __ASMPARISC_AUXVEC_H | ||
3 | |||
4 | #endif | ||
diff --git a/include/asm-parisc/compat.h b/include/asm-parisc/compat.h index 7630d1ad2391..38b918feead9 100644 --- a/include/asm-parisc/compat.h +++ b/include/asm-parisc/compat.h | |||
@@ -13,8 +13,10 @@ typedef s32 compat_ssize_t; | |||
13 | typedef s32 compat_time_t; | 13 | typedef s32 compat_time_t; |
14 | typedef s32 compat_clock_t; | 14 | typedef s32 compat_clock_t; |
15 | typedef s32 compat_pid_t; | 15 | typedef s32 compat_pid_t; |
16 | typedef u32 compat_uid_t; | 16 | typedef u32 __compat_uid_t; |
17 | typedef u32 compat_gid_t; | 17 | typedef u32 __compat_gid_t; |
18 | typedef u32 __compat_uid32_t; | ||
19 | typedef u32 __compat_gid32_t; | ||
18 | typedef u16 compat_mode_t; | 20 | typedef u16 compat_mode_t; |
19 | typedef u32 compat_ino_t; | 21 | typedef u32 compat_ino_t; |
20 | typedef u32 compat_dev_t; | 22 | typedef u32 compat_dev_t; |
@@ -67,8 +69,8 @@ struct compat_stat { | |||
67 | compat_dev_t st_realdev; | 69 | compat_dev_t st_realdev; |
68 | u16 st_basemode; | 70 | u16 st_basemode; |
69 | u16 st_spareshort; | 71 | u16 st_spareshort; |
70 | compat_uid_t st_uid; | 72 | __compat_uid32_t st_uid; |
71 | compat_gid_t st_gid; | 73 | __compat_gid32_t st_gid; |
72 | u32 st_spare4[3]; | 74 | u32 st_spare4[3]; |
73 | }; | 75 | }; |
74 | 76 | ||
diff --git a/include/asm-parisc/fcntl.h b/include/asm-parisc/fcntl.h index def35230716a..317851fa78f3 100644 --- a/include/asm-parisc/fcntl.h +++ b/include/asm-parisc/fcntl.h | |||
@@ -3,38 +3,22 @@ | |||
3 | 3 | ||
4 | /* open/fcntl - O_SYNC is only implemented on blocks devices and on files | 4 | /* open/fcntl - O_SYNC is only implemented on blocks devices and on files |
5 | located on an ext2 file system */ | 5 | located on an ext2 file system */ |
6 | #define O_ACCMODE 00000003 | ||
7 | #define O_RDONLY 00000000 | ||
8 | #define O_WRONLY 00000001 | ||
9 | #define O_RDWR 00000002 | ||
10 | #define O_APPEND 00000010 | 6 | #define O_APPEND 00000010 |
11 | #define O_BLKSEEK 00000100 /* HPUX only */ | 7 | #define O_BLKSEEK 00000100 /* HPUX only */ |
12 | #define O_CREAT 00000400 /* not fcntl */ | 8 | #define O_CREAT 00000400 /* not fcntl */ |
13 | #define O_TRUNC 00001000 /* not fcntl */ | ||
14 | #define O_EXCL 00002000 /* not fcntl */ | 9 | #define O_EXCL 00002000 /* not fcntl */ |
15 | #define O_LARGEFILE 00004000 | 10 | #define O_LARGEFILE 00004000 |
16 | #define O_SYNC 00100000 | 11 | #define O_SYNC 00100000 |
17 | #define O_NONBLOCK 00200004 /* HPUX has separate NDELAY & NONBLOCK */ | 12 | #define O_NONBLOCK 00200004 /* HPUX has separate NDELAY & NONBLOCK */ |
18 | #define O_NDELAY O_NONBLOCK | ||
19 | #define O_NOCTTY 00400000 /* not fcntl */ | 13 | #define O_NOCTTY 00400000 /* not fcntl */ |
20 | #define O_DSYNC 01000000 /* HPUX only */ | 14 | #define O_DSYNC 01000000 /* HPUX only */ |
21 | #define O_RSYNC 02000000 /* HPUX only */ | 15 | #define O_RSYNC 02000000 /* HPUX only */ |
22 | #define O_NOATIME 04000000 | 16 | #define O_NOATIME 04000000 |
23 | 17 | ||
24 | #define FASYNC 00020000 /* fcntl, for BSD compatibility */ | ||
25 | #define O_DIRECT 00040000 /* direct disk access hint - currently ignored */ | ||
26 | #define O_DIRECTORY 00010000 /* must be a directory */ | 18 | #define O_DIRECTORY 00010000 /* must be a directory */ |
27 | #define O_NOFOLLOW 00000200 /* don't follow links */ | 19 | #define O_NOFOLLOW 00000200 /* don't follow links */ |
28 | #define O_INVISIBLE 04000000 /* invisible I/O, for DMAPI/XDSM */ | 20 | #define O_INVISIBLE 04000000 /* invisible I/O, for DMAPI/XDSM */ |
29 | 21 | ||
30 | #define F_DUPFD 0 /* dup */ | ||
31 | #define F_GETFD 1 /* get f_flags */ | ||
32 | #define F_SETFD 2 /* set f_flags */ | ||
33 | #define F_GETFL 3 /* more flags (cloexec) */ | ||
34 | #define F_SETFL 4 | ||
35 | #define F_GETLK 5 | ||
36 | #define F_SETLK 6 | ||
37 | #define F_SETLKW 7 | ||
38 | #define F_GETLK64 8 | 22 | #define F_GETLK64 8 |
39 | #define F_SETLK64 9 | 23 | #define F_SETLK64 9 |
40 | #define F_SETLKW64 10 | 24 | #define F_SETLKW64 10 |
@@ -44,49 +28,11 @@ | |||
44 | #define F_SETSIG 13 /* for sockets. */ | 28 | #define F_SETSIG 13 /* for sockets. */ |
45 | #define F_GETSIG 14 /* for sockets. */ | 29 | #define F_GETSIG 14 /* for sockets. */ |
46 | 30 | ||
47 | /* for F_[GET|SET]FL */ | ||
48 | #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ | ||
49 | |||
50 | /* for posix fcntl() and lockf() */ | 31 | /* for posix fcntl() and lockf() */ |
51 | #define F_RDLCK 01 | 32 | #define F_RDLCK 01 |
52 | #define F_WRLCK 02 | 33 | #define F_WRLCK 02 |
53 | #define F_UNLCK 03 | 34 | #define F_UNLCK 03 |
54 | 35 | ||
55 | /* for old implementation of bsd flock () */ | 36 | #include <asm-generic/fcntl.h> |
56 | #define F_EXLCK 4 /* or 3 */ | ||
57 | #define F_SHLCK 8 /* or 4 */ | ||
58 | |||
59 | /* for leases */ | ||
60 | #define F_INPROGRESS 16 | ||
61 | |||
62 | /* operations for bsd flock(), also used by the kernel implementation */ | ||
63 | #define LOCK_SH 1 /* shared lock */ | ||
64 | #define LOCK_EX 2 /* exclusive lock */ | ||
65 | #define LOCK_NB 4 /* or'd with one of the above to prevent | ||
66 | blocking */ | ||
67 | #define LOCK_UN 8 /* remove lock */ | ||
68 | |||
69 | #define LOCK_MAND 32 /* This is a mandatory flock */ | ||
70 | #define LOCK_READ 64 /* ... Which allows concurrent read operations */ | ||
71 | #define LOCK_WRITE 128 /* ... Which allows concurrent write operations */ | ||
72 | #define LOCK_RW 192 /* ... Which allows concurrent read & write ops */ | ||
73 | |||
74 | struct flock { | ||
75 | short l_type; | ||
76 | short l_whence; | ||
77 | off_t l_start; | ||
78 | off_t l_len; | ||
79 | pid_t l_pid; | ||
80 | }; | ||
81 | |||
82 | struct flock64 { | ||
83 | short l_type; | ||
84 | short l_whence; | ||
85 | loff_t l_start; | ||
86 | loff_t l_len; | ||
87 | pid_t l_pid; | ||
88 | }; | ||
89 | |||
90 | #define F_LINUX_SPECIFIC_BASE 1024 | ||
91 | 37 | ||
92 | #endif | 38 | #endif |
diff --git a/include/asm-parisc/futex.h b/include/asm-parisc/futex.h new file mode 100644 index 000000000000..2cac5ecd9d00 --- /dev/null +++ b/include/asm-parisc/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-parisc/hdreg.h b/include/asm-parisc/hdreg.h deleted file mode 100644 index 7f7fd1af0af3..000000000000 --- a/include/asm-parisc/hdreg.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/hdreg.h> | ||
diff --git a/include/asm-parisc/irq.h b/include/asm-parisc/irq.h index 75654ba93353..f876bdf22056 100644 --- a/include/asm-parisc/irq.h +++ b/include/asm-parisc/irq.h | |||
@@ -26,6 +26,11 @@ | |||
26 | 26 | ||
27 | #define NR_IRQS (CPU_IRQ_MAX + 1) | 27 | #define NR_IRQS (CPU_IRQ_MAX + 1) |
28 | 28 | ||
29 | /* | ||
30 | * IRQ line status macro IRQ_PER_CPU is used | ||
31 | */ | ||
32 | #define ARCH_HAS_IRQ_PER_CPU | ||
33 | |||
29 | static __inline__ int irq_canonicalize(int irq) | 34 | static __inline__ int irq_canonicalize(int irq) |
30 | { | 35 | { |
31 | return (irq == 2) ? 9 : irq; | 36 | return (irq == 2) ? 9 : irq; |
diff --git a/include/asm-parisc/page.h b/include/asm-parisc/page.h index 4a12692f94b4..44eae9f8274d 100644 --- a/include/asm-parisc/page.h +++ b/include/asm-parisc/page.h | |||
@@ -74,20 +74,6 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
74 | #define __pgd(x) ((pgd_t) { (x) } ) | 74 | #define __pgd(x) ((pgd_t) { (x) } ) |
75 | #define __pgprot(x) ((pgprot_t) { (x) } ) | 75 | #define __pgprot(x) ((pgprot_t) { (x) } ) |
76 | 76 | ||
77 | /* Pure 2^n version of get_order */ | ||
78 | extern __inline__ int get_order(unsigned long size) | ||
79 | { | ||
80 | int order; | ||
81 | |||
82 | size = (size-1) >> (PAGE_SHIFT-1); | ||
83 | order = -1; | ||
84 | do { | ||
85 | size >>= 1; | ||
86 | order++; | ||
87 | } while (size); | ||
88 | return order; | ||
89 | } | ||
90 | |||
91 | typedef struct __physmem_range { | 77 | typedef struct __physmem_range { |
92 | unsigned long start_pfn; | 78 | unsigned long start_pfn; |
93 | unsigned long pages; /* PAGE_SIZE pages */ | 79 | unsigned long pages; /* PAGE_SIZE pages */ |
@@ -159,4 +145,6 @@ extern int npmem_ranges; | |||
159 | 145 | ||
160 | #endif /* __KERNEL__ */ | 146 | #endif /* __KERNEL__ */ |
161 | 147 | ||
148 | #include <asm-generic/page.h> | ||
149 | |||
162 | #endif /* _PARISC_PAGE_H */ | 150 | #endif /* _PARISC_PAGE_H */ |
diff --git a/include/asm-parisc/types.h b/include/asm-parisc/types.h index 8fe7a44ea205..d21b9d0d63ea 100644 --- a/include/asm-parisc/types.h +++ b/include/asm-parisc/types.h | |||
@@ -56,8 +56,6 @@ typedef unsigned long long u64; | |||
56 | typedef u32 dma_addr_t; | 56 | typedef u32 dma_addr_t; |
57 | typedef u64 dma64_addr_t; | 57 | typedef u64 dma64_addr_t; |
58 | 58 | ||
59 | typedef unsigned int kmem_bufctl_t; | ||
60 | |||
61 | #endif /* __ASSEMBLY__ */ | 59 | #endif /* __ASSEMBLY__ */ |
62 | 60 | ||
63 | #endif /* __KERNEL__ */ | 61 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-parisc/uaccess.h b/include/asm-parisc/uaccess.h index c1b5bdea53ee..f6c417c8c484 100644 --- a/include/asm-parisc/uaccess.h +++ b/include/asm-parisc/uaccess.h | |||
@@ -40,10 +40,6 @@ static inline long access_ok(int type, const void __user * addr, | |||
40 | return 1; | 40 | return 1; |
41 | } | 41 | } |
42 | 42 | ||
43 | #define verify_area(type,addr,size) (0) /* FIXME: all users should go away soon, | ||
44 | * and use access_ok instead, then this | ||
45 | * should be removed. */ | ||
46 | |||
47 | #define put_user __put_user | 43 | #define put_user __put_user |
48 | #define get_user __get_user | 44 | #define get_user __get_user |
49 | 45 | ||