diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-02-08 11:06:09 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-02-08 11:06:09 -0500 |
commit | 423ab71a8bd2345f87724abe320092a3a516b0bb (patch) | |
tree | 5d5eb306001e4341c3c073777f4d0b9e05ccd454 /include | |
parent | b7ed1de0ae4edb3fd2c53fa3dd7e6f104beb6d00 (diff) | |
parent | 63f716b9419420defb3e550a1e5f526c11b2ed2d (diff) |
Merge branch 'for-linus2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/bird
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-mips/io.h | 32 | ||||
-rw-r--r-- | include/asm-powerpc/compat.h | 5 | ||||
-rw-r--r-- | include/asm-powerpc/thread_info.h | 2 | ||||
-rw-r--r-- | include/asm-s390/uaccess.h | 10 | ||||
-rw-r--r-- | include/linux/ioc3.h | 2 | ||||
-rw-r--r-- | include/linux/videodev2.h | 2 |
6 files changed, 29 insertions, 24 deletions
diff --git a/include/asm-mips/io.h b/include/asm-mips/io.h index a9fa1254894a..6c0aae5151a6 100644 --- a/include/asm-mips/io.h +++ b/include/asm-mips/io.h | |||
@@ -56,38 +56,38 @@ | |||
56 | * variations of functions: non-prefixed ones that preserve the value | 56 | * variations of functions: non-prefixed ones that preserve the value |
57 | * and prefixed ones that preserve byte addresses. The latters are | 57 | * and prefixed ones that preserve byte addresses. The latters are |
58 | * typically used for moving raw data between a peripheral and memory (cf. | 58 | * typically used for moving raw data between a peripheral and memory (cf. |
59 | * string I/O functions), hence the "mem_" prefix. | 59 | * string I/O functions), hence the "__mem_" prefix. |
60 | */ | 60 | */ |
61 | #if defined(CONFIG_SWAP_IO_SPACE) | 61 | #if defined(CONFIG_SWAP_IO_SPACE) |
62 | 62 | ||
63 | # define ioswabb(x) (x) | 63 | # define ioswabb(x) (x) |
64 | # define mem_ioswabb(x) (x) | 64 | # define __mem_ioswabb(x) (x) |
65 | # ifdef CONFIG_SGI_IP22 | 65 | # ifdef CONFIG_SGI_IP22 |
66 | /* | 66 | /* |
67 | * IP22 seems braindead enough to swap 16bits values in hardware, but | 67 | * IP22 seems braindead enough to swap 16bits values in hardware, but |
68 | * not 32bits. Go figure... Can't tell without documentation. | 68 | * not 32bits. Go figure... Can't tell without documentation. |
69 | */ | 69 | */ |
70 | # define ioswabw(x) (x) | 70 | # define ioswabw(x) (x) |
71 | # define mem_ioswabw(x) le16_to_cpu(x) | 71 | # define __mem_ioswabw(x) le16_to_cpu(x) |
72 | # else | 72 | # else |
73 | # define ioswabw(x) le16_to_cpu(x) | 73 | # define ioswabw(x) le16_to_cpu(x) |
74 | # define mem_ioswabw(x) (x) | 74 | # define __mem_ioswabw(x) (x) |
75 | # endif | 75 | # endif |
76 | # define ioswabl(x) le32_to_cpu(x) | 76 | # define ioswabl(x) le32_to_cpu(x) |
77 | # define mem_ioswabl(x) (x) | 77 | # define __mem_ioswabl(x) (x) |
78 | # define ioswabq(x) le64_to_cpu(x) | 78 | # define ioswabq(x) le64_to_cpu(x) |
79 | # define mem_ioswabq(x) (x) | 79 | # define __mem_ioswabq(x) (x) |
80 | 80 | ||
81 | #else | 81 | #else |
82 | 82 | ||
83 | # define ioswabb(x) (x) | 83 | # define ioswabb(x) (x) |
84 | # define mem_ioswabb(x) (x) | 84 | # define __mem_ioswabb(x) (x) |
85 | # define ioswabw(x) (x) | 85 | # define ioswabw(x) (x) |
86 | # define mem_ioswabw(x) cpu_to_le16(x) | 86 | # define __mem_ioswabw(x) cpu_to_le16(x) |
87 | # define ioswabl(x) (x) | 87 | # define ioswabl(x) (x) |
88 | # define mem_ioswabl(x) cpu_to_le32(x) | 88 | # define __mem_ioswabl(x) cpu_to_le32(x) |
89 | # define ioswabq(x) (x) | 89 | # define ioswabq(x) (x) |
90 | # define mem_ioswabq(x) cpu_to_le32(x) | 90 | # define __mem_ioswabq(x) cpu_to_le32(x) |
91 | 91 | ||
92 | #endif | 92 | #endif |
93 | 93 | ||
@@ -417,7 +417,7 @@ __BUILD_MEMORY_SINGLE(bus, bwlq, type, 1) | |||
417 | \ | 417 | \ |
418 | __BUILD_MEMORY_PFX(__raw_, bwlq, type) \ | 418 | __BUILD_MEMORY_PFX(__raw_, bwlq, type) \ |
419 | __BUILD_MEMORY_PFX(, bwlq, type) \ | 419 | __BUILD_MEMORY_PFX(, bwlq, type) \ |
420 | __BUILD_MEMORY_PFX(mem_, bwlq, type) \ | 420 | __BUILD_MEMORY_PFX(__mem_, bwlq, type) \ |
421 | 421 | ||
422 | BUILDIO_MEM(b, u8) | 422 | BUILDIO_MEM(b, u8) |
423 | BUILDIO_MEM(w, u16) | 423 | BUILDIO_MEM(w, u16) |
@@ -430,7 +430,7 @@ BUILDIO_MEM(q, u64) | |||
430 | 430 | ||
431 | #define BUILDIO_IOPORT(bwlq, type) \ | 431 | #define BUILDIO_IOPORT(bwlq, type) \ |
432 | __BUILD_IOPORT_PFX(, bwlq, type) \ | 432 | __BUILD_IOPORT_PFX(, bwlq, type) \ |
433 | __BUILD_IOPORT_PFX(mem_, bwlq, type) | 433 | __BUILD_IOPORT_PFX(__mem_, bwlq, type) |
434 | 434 | ||
435 | BUILDIO_IOPORT(b, u8) | 435 | BUILDIO_IOPORT(b, u8) |
436 | BUILDIO_IOPORT(w, u16) | 436 | BUILDIO_IOPORT(w, u16) |
@@ -464,7 +464,7 @@ static inline void writes##bwlq(volatile void __iomem *mem, \ | |||
464 | const volatile type *__addr = addr; \ | 464 | const volatile type *__addr = addr; \ |
465 | \ | 465 | \ |
466 | while (count--) { \ | 466 | while (count--) { \ |
467 | mem_write##bwlq(*__addr, mem); \ | 467 | __mem_write##bwlq(*__addr, mem); \ |
468 | __addr++; \ | 468 | __addr++; \ |
469 | } \ | 469 | } \ |
470 | } \ | 470 | } \ |
@@ -475,7 +475,7 @@ static inline void reads##bwlq(volatile void __iomem *mem, void *addr, \ | |||
475 | volatile type *__addr = addr; \ | 475 | volatile type *__addr = addr; \ |
476 | \ | 476 | \ |
477 | while (count--) { \ | 477 | while (count--) { \ |
478 | *__addr = mem_read##bwlq(mem); \ | 478 | *__addr = __mem_read##bwlq(mem); \ |
479 | __addr++; \ | 479 | __addr++; \ |
480 | } \ | 480 | } \ |
481 | } | 481 | } |
@@ -488,7 +488,7 @@ static inline void outs##bwlq(unsigned long port, const void *addr, \ | |||
488 | const volatile type *__addr = addr; \ | 488 | const volatile type *__addr = addr; \ |
489 | \ | 489 | \ |
490 | while (count--) { \ | 490 | while (count--) { \ |
491 | mem_out##bwlq(*__addr, port); \ | 491 | __mem_out##bwlq(*__addr, port); \ |
492 | __addr++; \ | 492 | __addr++; \ |
493 | } \ | 493 | } \ |
494 | } \ | 494 | } \ |
@@ -499,7 +499,7 @@ static inline void ins##bwlq(unsigned long port, void *addr, \ | |||
499 | volatile type *__addr = addr; \ | 499 | volatile type *__addr = addr; \ |
500 | \ | 500 | \ |
501 | while (count--) { \ | 501 | while (count--) { \ |
502 | *__addr = mem_in##bwlq(port); \ | 502 | *__addr = __mem_in##bwlq(port); \ |
503 | __addr++; \ | 503 | __addr++; \ |
504 | } \ | 504 | } \ |
505 | } | 505 | } |
diff --git a/include/asm-powerpc/compat.h b/include/asm-powerpc/compat.h index accb80c9a339..aacaabd28ac1 100644 --- a/include/asm-powerpc/compat.h +++ b/include/asm-powerpc/compat.h | |||
@@ -126,6 +126,11 @@ static inline void __user *compat_ptr(compat_uptr_t uptr) | |||
126 | return (void __user *)(unsigned long)uptr; | 126 | return (void __user *)(unsigned long)uptr; |
127 | } | 127 | } |
128 | 128 | ||
129 | static inline compat_uptr_t ptr_to_compat(void __user *uptr) | ||
130 | { | ||
131 | return (u32)(unsigned long)uptr; | ||
132 | } | ||
133 | |||
129 | static inline void __user *compat_alloc_user_space(long len) | 134 | static inline void __user *compat_alloc_user_space(long len) |
130 | { | 135 | { |
131 | struct pt_regs *regs = current->thread.regs; | 136 | struct pt_regs *regs = current->thread.regs; |
diff --git a/include/asm-powerpc/thread_info.h b/include/asm-powerpc/thread_info.h index 67cdaf3ae9fc..c044ec16a879 100644 --- a/include/asm-powerpc/thread_info.h +++ b/include/asm-powerpc/thread_info.h | |||
@@ -37,7 +37,7 @@ struct thread_info { | |||
37 | int preempt_count; /* 0 => preemptable, | 37 | int preempt_count; /* 0 => preemptable, |
38 | <0 => BUG */ | 38 | <0 => BUG */ |
39 | struct restart_block restart_block; | 39 | struct restart_block restart_block; |
40 | void *nvgprs_frame; | 40 | void __user *nvgprs_frame; |
41 | /* low level flags - has atomic operations done on it */ | 41 | /* low level flags - has atomic operations done on it */ |
42 | unsigned long flags ____cacheline_aligned_in_smp; | 42 | unsigned long flags ____cacheline_aligned_in_smp; |
43 | }; | 43 | }; |
diff --git a/include/asm-s390/uaccess.h b/include/asm-s390/uaccess.h index be104f21c70a..0b7c0ca4c3d7 100644 --- a/include/asm-s390/uaccess.h +++ b/include/asm-s390/uaccess.h | |||
@@ -61,7 +61,7 @@ | |||
61 | #define segment_eq(a,b) ((a).ar4 == (b).ar4) | 61 | #define segment_eq(a,b) ((a).ar4 == (b).ar4) |
62 | 62 | ||
63 | 63 | ||
64 | static inline int __access_ok(const void *addr, unsigned long size) | 64 | static inline int __access_ok(const void __user *addr, unsigned long size) |
65 | { | 65 | { |
66 | return 1; | 66 | return 1; |
67 | } | 67 | } |
@@ -208,25 +208,25 @@ extern int __put_user_bad(void) __attribute__((noreturn)); | |||
208 | case 1: { \ | 208 | case 1: { \ |
209 | unsigned char __x; \ | 209 | unsigned char __x; \ |
210 | __get_user_asm(__x, ptr, __gu_err); \ | 210 | __get_user_asm(__x, ptr, __gu_err); \ |
211 | (x) = *(__typeof__(*(ptr)) *) &__x; \ | 211 | (x) = *(__force __typeof__(*(ptr)) *) &__x; \ |
212 | break; \ | 212 | break; \ |
213 | }; \ | 213 | }; \ |
214 | case 2: { \ | 214 | case 2: { \ |
215 | unsigned short __x; \ | 215 | unsigned short __x; \ |
216 | __get_user_asm(__x, ptr, __gu_err); \ | 216 | __get_user_asm(__x, ptr, __gu_err); \ |
217 | (x) = *(__typeof__(*(ptr)) *) &__x; \ | 217 | (x) = *(__force __typeof__(*(ptr)) *) &__x; \ |
218 | break; \ | 218 | break; \ |
219 | }; \ | 219 | }; \ |
220 | case 4: { \ | 220 | case 4: { \ |
221 | unsigned int __x; \ | 221 | unsigned int __x; \ |
222 | __get_user_asm(__x, ptr, __gu_err); \ | 222 | __get_user_asm(__x, ptr, __gu_err); \ |
223 | (x) = *(__typeof__(*(ptr)) *) &__x; \ | 223 | (x) = *(__force __typeof__(*(ptr)) *) &__x; \ |
224 | break; \ | 224 | break; \ |
225 | }; \ | 225 | }; \ |
226 | case 8: { \ | 226 | case 8: { \ |
227 | unsigned long long __x; \ | 227 | unsigned long long __x; \ |
228 | __get_user_asm(__x, ptr, __gu_err); \ | 228 | __get_user_asm(__x, ptr, __gu_err); \ |
229 | (x) = *(__typeof__(*(ptr)) *) &__x; \ | 229 | (x) = *(__force __typeof__(*(ptr)) *) &__x; \ |
230 | break; \ | 230 | break; \ |
231 | }; \ | 231 | }; \ |
232 | default: \ | 232 | default: \ |
diff --git a/include/linux/ioc3.h b/include/linux/ioc3.h index e7906a72a4f1..da7c09e4ede6 100644 --- a/include/linux/ioc3.h +++ b/include/linux/ioc3.h | |||
@@ -27,7 +27,7 @@ struct ioc3_driver_data { | |||
27 | int id; /* IOC3 sequence number */ | 27 | int id; /* IOC3 sequence number */ |
28 | /* PCI mapping */ | 28 | /* PCI mapping */ |
29 | unsigned long pma; /* physical address */ | 29 | unsigned long pma; /* physical address */ |
30 | struct __iomem ioc3 *vma; /* pointer to registers */ | 30 | struct ioc3 __iomem *vma; /* pointer to registers */ |
31 | struct pci_dev *pdev; /* PCI device */ | 31 | struct pci_dev *pdev; /* PCI device */ |
32 | /* IRQ stuff */ | 32 | /* IRQ stuff */ |
33 | int dual_irq; /* set if separate IRQs are used */ | 33 | int dual_irq; /* set if separate IRQs are used */ |
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index b23be44cbea8..5208b12d5550 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
@@ -549,7 +549,7 @@ struct v4l2_framebuffer | |||
549 | struct v4l2_clip | 549 | struct v4l2_clip |
550 | { | 550 | { |
551 | struct v4l2_rect c; | 551 | struct v4l2_rect c; |
552 | struct v4l2_clip *next; | 552 | struct v4l2_clip __user *next; |
553 | }; | 553 | }; |
554 | 554 | ||
555 | struct v4l2_window | 555 | struct v4l2_window |