aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-arm/arch-iop32x/iop32x.h2
-rw-r--r--include/asm-arm/cacheflush.h10
-rw-r--r--include/asm-arm/hardware/iop3xx.h6
-rw-r--r--include/asm-mips/checksum.h31
-rw-r--r--include/asm-mips/irq.h6
-rw-r--r--include/asm-parisc/cacheflush.h2
-rw-r--r--include/asm-powerpc/bug.h27
-rw-r--r--include/asm-powerpc/hvcall.h2
-rw-r--r--include/asm-powerpc/mpc52xx.h1
-rw-r--r--include/asm-s390/futex.h4
-rw-r--r--include/linux/highmem.h2
11 files changed, 66 insertions, 27 deletions
diff --git a/include/asm-arm/arch-iop32x/iop32x.h b/include/asm-arm/arch-iop32x/iop32x.h
index 4bbd85f3ed2a..2e9469047eb1 100644
--- a/include/asm-arm/arch-iop32x/iop32x.h
+++ b/include/asm-arm/arch-iop32x/iop32x.h
@@ -19,7 +19,7 @@
19 * Peripherals that are shared between the iop32x and iop33x but 19 * Peripherals that are shared between the iop32x and iop33x but
20 * located at different addresses. 20 * located at different addresses.
21 */ 21 */
22#define IOP3XX_GPIO_REG(reg) (IOP3XX_PERIPHERAL_VIRT_BASE + 0x07c0 + (reg)) 22#define IOP3XX_GPIO_REG(reg) (IOP3XX_PERIPHERAL_VIRT_BASE + 0x07c4 + (reg))
23#define IOP3XX_TIMER_REG(reg) (IOP3XX_PERIPHERAL_VIRT_BASE + 0x07e0 + (reg)) 23#define IOP3XX_TIMER_REG(reg) (IOP3XX_PERIPHERAL_VIRT_BASE + 0x07e0 + (reg))
24 24
25#include <asm/hardware/iop3xx.h> 25#include <asm/hardware/iop3xx.h>
diff --git a/include/asm-arm/cacheflush.h b/include/asm-arm/cacheflush.h
index d51049522cd0..5f531ea03059 100644
--- a/include/asm-arm/cacheflush.h
+++ b/include/asm-arm/cacheflush.h
@@ -357,6 +357,16 @@ extern void flush_dcache_page(struct page *);
357 357
358extern void __flush_dcache_page(struct address_space *mapping, struct page *page); 358extern void __flush_dcache_page(struct address_space *mapping, struct page *page);
359 359
360#define ARCH_HAS_FLUSH_ANON_PAGE
361static inline void flush_anon_page(struct vm_area_struct *vma,
362 struct page *page, unsigned long vmaddr)
363{
364 extern void __flush_anon_page(struct vm_area_struct *vma,
365 struct page *, unsigned long);
366 if (PageAnon(page))
367 __flush_anon_page(vma, page, vmaddr);
368}
369
360#define flush_dcache_mmap_lock(mapping) \ 370#define flush_dcache_mmap_lock(mapping) \
361 write_lock_irq(&(mapping)->tree_lock) 371 write_lock_irq(&(mapping)->tree_lock)
362#define flush_dcache_mmap_unlock(mapping) \ 372#define flush_dcache_mmap_unlock(mapping) \
diff --git a/include/asm-arm/hardware/iop3xx.h b/include/asm-arm/hardware/iop3xx.h
index 1018a7486ab7..13ac8a4cd01f 100644
--- a/include/asm-arm/hardware/iop3xx.h
+++ b/include/asm-arm/hardware/iop3xx.h
@@ -168,9 +168,9 @@ extern void gpio_line_set(int line, int value);
168#define IOP3XX_PERCR0 (volatile u32 *)IOP3XX_REG_ADDR(0x0710) 168#define IOP3XX_PERCR0 (volatile u32 *)IOP3XX_REG_ADDR(0x0710)
169 169
170/* General Purpose I/O */ 170/* General Purpose I/O */
171#define IOP3XX_GPOE (volatile u32 *)IOP3XX_GPIO_REG(0x0004) 171#define IOP3XX_GPOE (volatile u32 *)IOP3XX_GPIO_REG(0x0000)
172#define IOP3XX_GPID (volatile u32 *)IOP3XX_GPIO_REG(0x0008) 172#define IOP3XX_GPID (volatile u32 *)IOP3XX_GPIO_REG(0x0004)
173#define IOP3XX_GPOD (volatile u32 *)IOP3XX_GPIO_REG(0x000c) 173#define IOP3XX_GPOD (volatile u32 *)IOP3XX_GPIO_REG(0x0008)
174 174
175/* Timers */ 175/* Timers */
176#define IOP3XX_TU_TMR0 (volatile u32 *)IOP3XX_TIMER_REG(0x0000) 176#define IOP3XX_TU_TMR0 (volatile u32 *)IOP3XX_TIMER_REG(0x0000)
diff --git a/include/asm-mips/checksum.h b/include/asm-mips/checksum.h
index 9b768c3b96b3..24cdcc6eaab8 100644
--- a/include/asm-mips/checksum.h
+++ b/include/asm-mips/checksum.h
@@ -29,31 +29,38 @@
29 */ 29 */
30__wsum csum_partial(const void *buff, int len, __wsum sum); 30__wsum csum_partial(const void *buff, int len, __wsum sum);
31 31
32__wsum __csum_partial_copy_user(const void *src, void *dst,
33 int len, __wsum sum, int *err_ptr);
34
32/* 35/*
33 * this is a new version of the above that records errors it finds in *errp, 36 * this is a new version of the above that records errors it finds in *errp,
34 * but continues and zeros the rest of the buffer. 37 * but continues and zeros the rest of the buffer.
35 */ 38 */
36__wsum csum_partial_copy_from_user(const void __user *src, 39static inline
37 void *dst, int len, 40__wsum csum_partial_copy_from_user(const void __user *src, void *dst, int len,
38 __wsum sum, int *errp); 41 __wsum sum, int *err_ptr)
42{
43 might_sleep();
44 return __csum_partial_copy_user((__force void *)src, dst,
45 len, sum, err_ptr);
46}
39 47
40/* 48/*
41 * Copy and checksum to user 49 * Copy and checksum to user
42 */ 50 */
43#define HAVE_CSUM_COPY_USER 51#define HAVE_CSUM_COPY_USER
44static inline __wsum csum_and_copy_to_user (const void *src, void __user *dst, 52static inline
45 int len, __wsum sum, 53__wsum csum_and_copy_to_user(const void *src, void __user *dst, int len,
46 int *err_ptr) 54 __wsum sum, int *err_ptr)
47{ 55{
48 might_sleep(); 56 might_sleep();
49 sum = csum_partial(src, len, sum); 57 if (access_ok(VERIFY_WRITE, dst, len))
50 58 return __csum_partial_copy_user(src, (__force void *)dst,
51 if (copy_to_user(dst, src, len)) { 59 len, sum, err_ptr);
60 if (len)
52 *err_ptr = -EFAULT; 61 *err_ptr = -EFAULT;
53 return (__force __wsum)-1;
54 }
55 62
56 return sum; 63 return (__force __wsum)-1; /* invalid checksum */
57} 64}
58 65
59/* 66/*
diff --git a/include/asm-mips/irq.h b/include/asm-mips/irq.h
index 67657089efa7..386da82e5774 100644
--- a/include/asm-mips/irq.h
+++ b/include/asm-mips/irq.h
@@ -31,14 +31,14 @@ static inline int irq_canonicalize(int irq)
31 * functions will take over re-enabling the low-level mask. 31 * functions will take over re-enabling the low-level mask.
32 * Otherwise it will be done on return from exception. 32 * Otherwise it will be done on return from exception.
33 */ 33 */
34#define __DO_IRQ_SMTC_HOOK() \ 34#define __DO_IRQ_SMTC_HOOK(irq) \
35do { \ 35do { \
36 if (irq_hwmask[irq] & 0x0000ff00) \ 36 if (irq_hwmask[irq] & 0x0000ff00) \
37 write_c0_tccontext(read_c0_tccontext() & \ 37 write_c0_tccontext(read_c0_tccontext() & \
38 ~(irq_hwmask[irq] & 0x0000ff00)); \ 38 ~(irq_hwmask[irq] & 0x0000ff00)); \
39} while (0) 39} while (0)
40#else 40#else
41#define __DO_IRQ_SMTC_HOOK() do { } while (0) 41#define __DO_IRQ_SMTC_HOOK(irq) do { } while (0)
42#endif 42#endif
43 43
44/* 44/*
@@ -52,7 +52,7 @@ do { \
52#define do_IRQ(irq) \ 52#define do_IRQ(irq) \
53do { \ 53do { \
54 irq_enter(); \ 54 irq_enter(); \
55 __DO_IRQ_SMTC_HOOK(); \ 55 __DO_IRQ_SMTC_HOOK(irq); \
56 generic_handle_irq(irq); \ 56 generic_handle_irq(irq); \
57 irq_exit(); \ 57 irq_exit(); \
58} while (0) 58} while (0)
diff --git a/include/asm-parisc/cacheflush.h b/include/asm-parisc/cacheflush.h
index aedb0512cb04..a799dd8ef395 100644
--- a/include/asm-parisc/cacheflush.h
+++ b/include/asm-parisc/cacheflush.h
@@ -186,7 +186,7 @@ flush_cache_page(struct vm_area_struct *vma, unsigned long vmaddr, unsigned long
186} 186}
187 187
188static inline void 188static inline void
189flush_anon_page(struct page *page, unsigned long vmaddr) 189flush_anon_page(struct vm_area_struct *vma, struct page *page, unsigned long vmaddr)
190{ 190{
191 if (PageAnon(page)) 191 if (PageAnon(page))
192 flush_user_dcache_page(vmaddr); 192 flush_user_dcache_page(vmaddr);
diff --git a/include/asm-powerpc/bug.h b/include/asm-powerpc/bug.h
index 709568879f73..f6fa39474846 100644
--- a/include/asm-powerpc/bug.h
+++ b/include/asm-powerpc/bug.h
@@ -11,10 +11,31 @@
11#define BUG_OPCODE .long 0x00b00b00 /* For asm */ 11#define BUG_OPCODE .long 0x00b00b00 /* For asm */
12#define BUG_ILLEGAL_INSTR "0x00b00b00" /* For BUG macro */ 12#define BUG_ILLEGAL_INSTR "0x00b00b00" /* For BUG macro */
13 13
14#ifndef __ASSEMBLY__
15
16#ifdef CONFIG_BUG 14#ifdef CONFIG_BUG
17 15
16#ifdef __ASSEMBLY__
17#ifdef CONFIG_DEBUG_BUGVERBOSE
18.macro EMIT_BUG_ENTRY addr,file,line,flags
19 .section __bug_table,"a"
205001: PPC_LONG \addr, 5002f
21 .short \line, \flags
22 .org 5001b+BUG_ENTRY_SIZE
23 .previous
24 .section .rodata,"a"
255002: .asciz "\file"
26 .previous
27.endm
28#else
29 .macro EMIT_BUG_ENTRY addr,file,line,flags
30 .section __bug_table,"a"
315001: PPC_LONG \addr
32 .short \flags
33 .org 5001b+BUG_ENTRY_SIZE
34 .previous
35.endm
36#endif /* verbose */
37
38#else /* !__ASSEMBLY__ */
18/* _EMIT_BUG_ENTRY expects args %0,%1,%2,%3 to be FILE, LINE, flags and 39/* _EMIT_BUG_ENTRY expects args %0,%1,%2,%3 to be FILE, LINE, flags and
19 sizeof(struct bug_entry), respectively */ 40 sizeof(struct bug_entry), respectively */
20#ifdef CONFIG_DEBUG_BUGVERBOSE 41#ifdef CONFIG_DEBUG_BUGVERBOSE
@@ -91,8 +112,8 @@
91#define HAVE_ARCH_BUG 112#define HAVE_ARCH_BUG
92#define HAVE_ARCH_BUG_ON 113#define HAVE_ARCH_BUG_ON
93#define HAVE_ARCH_WARN_ON 114#define HAVE_ARCH_WARN_ON
94#endif /* CONFIG_BUG */
95#endif /* __ASSEMBLY __ */ 115#endif /* __ASSEMBLY __ */
116#endif /* CONFIG_BUG */
96 117
97#include <asm-generic/bug.h> 118#include <asm-generic/bug.h>
98 119
diff --git a/include/asm-powerpc/hvcall.h b/include/asm-powerpc/hvcall.h
index 257d1cecb8c9..7a500732b671 100644
--- a/include/asm-powerpc/hvcall.h
+++ b/include/asm-powerpc/hvcall.h
@@ -252,8 +252,6 @@ struct hcall_stats {
252 unsigned long tb_total; /* total wall time (mftb) of calls. */ 252 unsigned long tb_total; /* total wall time (mftb) of calls. */
253 unsigned long purr_total; /* total cpu time (PURR) of calls. */ 253 unsigned long purr_total; /* total cpu time (PURR) of calls. */
254}; 254};
255void update_hcall_stats(unsigned long opcode, unsigned long tb_delta,
256 unsigned long purr_delta);
257#define HCALL_STAT_ARRAY_SIZE ((MAX_HCALL_OPCODE >> 2) + 1) 255#define HCALL_STAT_ARRAY_SIZE ((MAX_HCALL_OPCODE >> 2) + 1)
258 256
259#endif /* __ASSEMBLY__ */ 257#endif /* __ASSEMBLY__ */
diff --git a/include/asm-powerpc/mpc52xx.h b/include/asm-powerpc/mpc52xx.h
index 4a28a850998c..4560d72fc758 100644
--- a/include/asm-powerpc/mpc52xx.h
+++ b/include/asm-powerpc/mpc52xx.h
@@ -244,6 +244,7 @@ struct mpc52xx_cdm {
244extern void __iomem * mpc52xx_find_and_map(const char *); 244extern void __iomem * mpc52xx_find_and_map(const char *);
245extern unsigned int mpc52xx_find_ipb_freq(struct device_node *node); 245extern unsigned int mpc52xx_find_ipb_freq(struct device_node *node);
246extern void mpc52xx_setup_cpu(void); 246extern void mpc52xx_setup_cpu(void);
247extern void mpc52xx_declare_of_platform_devices(void);
247 248
248extern void mpc52xx_init_irq(void); 249extern void mpc52xx_init_irq(void);
249extern unsigned int mpc52xx_get_irq(void); 250extern unsigned int mpc52xx_get_irq(void);
diff --git a/include/asm-s390/futex.h b/include/asm-s390/futex.h
index 5e261e1de671..5c5d02de49e9 100644
--- a/include/asm-s390/futex.h
+++ b/include/asm-s390/futex.h
@@ -4,8 +4,8 @@
4#ifdef __KERNEL__ 4#ifdef __KERNEL__
5 5
6#include <linux/futex.h> 6#include <linux/futex.h>
7#include <linux/uaccess.h>
7#include <asm/errno.h> 8#include <asm/errno.h>
8#include <asm/uaccess.h>
9 9
10static inline int futex_atomic_op_inuser (int encoded_op, int __user *uaddr) 10static inline int futex_atomic_op_inuser (int encoded_op, int __user *uaddr)
11{ 11{
@@ -21,7 +21,9 @@ static inline int futex_atomic_op_inuser (int encoded_op, int __user *uaddr)
21 if (! access_ok (VERIFY_WRITE, uaddr, sizeof(int))) 21 if (! access_ok (VERIFY_WRITE, uaddr, sizeof(int)))
22 return -EFAULT; 22 return -EFAULT;
23 23
24 pagefault_disable();
24 ret = uaccess.futex_atomic_op(op, uaddr, oparg, &oldval); 25 ret = uaccess.futex_atomic_op(op, uaddr, oparg, &oldval);
26 pagefault_enable();
25 27
26 if (!ret) { 28 if (!ret) {
27 switch (cmp) { 29 switch (cmp) {
diff --git a/include/linux/highmem.h b/include/linux/highmem.h
index ca9a602cffd7..645d440807c2 100644
--- a/include/linux/highmem.h
+++ b/include/linux/highmem.h
@@ -8,7 +8,7 @@
8#include <asm/cacheflush.h> 8#include <asm/cacheflush.h>
9 9
10#ifndef ARCH_HAS_FLUSH_ANON_PAGE 10#ifndef ARCH_HAS_FLUSH_ANON_PAGE
11static inline void flush_anon_page(struct page *page, unsigned long vmaddr) 11static inline void flush_anon_page(struct vm_area_struct *vma, struct page *page, unsigned long vmaddr)
12{ 12{
13} 13}
14#endif 14#endif