diff options
author | Ingo Molnar <mingo@elte.hu> | 2012-02-28 04:26:07 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2012-02-28 04:27:36 -0500 |
commit | 458ce2910aa83d8a2cafb489d727f7da839e73c6 (patch) | |
tree | 28e088137eb068e5620f17eaf0ca19d1562006ed /include/asm-generic | |
parent | 69466466ce889cd2cbc8cda9ff1c6083f48cc7f9 (diff) | |
parent | 586c6e7013c8cbb8c91aaa6568ec349b1dc2c691 (diff) |
Merge branch 'linus' into x86/asm
Sync up the latest NMI fixes.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/asm-generic')
-rw-r--r-- | include/asm-generic/cputime.h | 64 | ||||
-rw-r--r-- | include/asm-generic/gpio.h | 10 | ||||
-rw-r--r-- | include/asm-generic/io-64-nonatomic-hi-lo.h | 28 | ||||
-rw-r--r-- | include/asm-generic/io-64-nonatomic-lo-hi.h | 28 | ||||
-rw-r--r-- | include/asm-generic/io.h | 6 | ||||
-rw-r--r-- | include/asm-generic/iomap.h | 9 | ||||
-rw-r--r-- | include/asm-generic/page.h | 10 | ||||
-rw-r--r-- | include/asm-generic/param.h | 13 | ||||
-rw-r--r-- | include/asm-generic/pci_iomap.h | 35 | ||||
-rw-r--r-- | include/asm-generic/poll.h | 2 | ||||
-rw-r--r-- | include/asm-generic/socket.h | 3 | ||||
-rw-r--r-- | include/asm-generic/tlb.h | 14 | ||||
-rw-r--r-- | include/asm-generic/types.h | 6 | ||||
-rw-r--r-- | include/asm-generic/uaccess.h | 7 |
14 files changed, 174 insertions, 61 deletions
diff --git a/include/asm-generic/cputime.h b/include/asm-generic/cputime.h index 62ce6823c0f2..9a62937c56ca 100644 --- a/include/asm-generic/cputime.h +++ b/include/asm-generic/cputime.h | |||
@@ -4,70 +4,66 @@ | |||
4 | #include <linux/time.h> | 4 | #include <linux/time.h> |
5 | #include <linux/jiffies.h> | 5 | #include <linux/jiffies.h> |
6 | 6 | ||
7 | typedef unsigned long cputime_t; | 7 | typedef unsigned long __nocast cputime_t; |
8 | 8 | ||
9 | #define cputime_zero (0UL) | ||
10 | #define cputime_one_jiffy jiffies_to_cputime(1) | 9 | #define cputime_one_jiffy jiffies_to_cputime(1) |
11 | #define cputime_max ((~0UL >> 1) - 1) | 10 | #define cputime_to_jiffies(__ct) (__force unsigned long)(__ct) |
12 | #define cputime_add(__a, __b) ((__a) + (__b)) | ||
13 | #define cputime_sub(__a, __b) ((__a) - (__b)) | ||
14 | #define cputime_div(__a, __n) ((__a) / (__n)) | ||
15 | #define cputime_halve(__a) ((__a) >> 1) | ||
16 | #define cputime_eq(__a, __b) ((__a) == (__b)) | ||
17 | #define cputime_gt(__a, __b) ((__a) > (__b)) | ||
18 | #define cputime_ge(__a, __b) ((__a) >= (__b)) | ||
19 | #define cputime_lt(__a, __b) ((__a) < (__b)) | ||
20 | #define cputime_le(__a, __b) ((__a) <= (__b)) | ||
21 | #define cputime_to_jiffies(__ct) (__ct) | ||
22 | #define cputime_to_scaled(__ct) (__ct) | 11 | #define cputime_to_scaled(__ct) (__ct) |
23 | #define jiffies_to_cputime(__hz) (__hz) | 12 | #define jiffies_to_cputime(__hz) (__force cputime_t)(__hz) |
24 | 13 | ||
25 | typedef u64 cputime64_t; | 14 | typedef u64 __nocast cputime64_t; |
26 | 15 | ||
27 | #define cputime64_zero (0ULL) | 16 | #define cputime64_to_jiffies64(__ct) (__force u64)(__ct) |
28 | #define cputime64_add(__a, __b) ((__a) + (__b)) | 17 | #define jiffies64_to_cputime64(__jif) (__force cputime64_t)(__jif) |
29 | #define cputime64_sub(__a, __b) ((__a) - (__b)) | ||
30 | #define cputime64_to_jiffies64(__ct) (__ct) | ||
31 | #define jiffies64_to_cputime64(__jif) (__jif) | ||
32 | #define cputime_to_cputime64(__ct) ((u64) __ct) | ||
33 | #define cputime64_gt(__a, __b) ((__a) > (__b)) | ||
34 | 18 | ||
35 | #define nsecs_to_cputime64(__ct) nsecs_to_jiffies64(__ct) | 19 | #define nsecs_to_cputime64(__ct) \ |
20 | jiffies64_to_cputime64(nsecs_to_jiffies64(__ct)) | ||
36 | 21 | ||
37 | 22 | ||
38 | /* | 23 | /* |
39 | * Convert cputime to microseconds and back. | 24 | * Convert cputime to microseconds and back. |
40 | */ | 25 | */ |
41 | #define cputime_to_usecs(__ct) jiffies_to_usecs(__ct) | 26 | #define cputime_to_usecs(__ct) \ |
42 | #define usecs_to_cputime(__msecs) usecs_to_jiffies(__msecs) | 27 | jiffies_to_usecs(cputime_to_jiffies(__ct)) |
28 | #define usecs_to_cputime(__usec) \ | ||
29 | jiffies_to_cputime(usecs_to_jiffies(__usec)) | ||
30 | #define usecs_to_cputime64(__usec) \ | ||
31 | jiffies64_to_cputime64(nsecs_to_jiffies64((__usec) * 1000)) | ||
43 | 32 | ||
44 | /* | 33 | /* |
45 | * Convert cputime to seconds and back. | 34 | * Convert cputime to seconds and back. |
46 | */ | 35 | */ |
47 | #define cputime_to_secs(jif) ((jif) / HZ) | 36 | #define cputime_to_secs(jif) (cputime_to_jiffies(jif) / HZ) |
48 | #define secs_to_cputime(sec) ((sec) * HZ) | 37 | #define secs_to_cputime(sec) jiffies_to_cputime((sec) * HZ) |
49 | 38 | ||
50 | /* | 39 | /* |
51 | * Convert cputime to timespec and back. | 40 | * Convert cputime to timespec and back. |
52 | */ | 41 | */ |
53 | #define timespec_to_cputime(__val) timespec_to_jiffies(__val) | 42 | #define timespec_to_cputime(__val) \ |
54 | #define cputime_to_timespec(__ct,__val) jiffies_to_timespec(__ct,__val) | 43 | jiffies_to_cputime(timespec_to_jiffies(__val)) |
44 | #define cputime_to_timespec(__ct,__val) \ | ||
45 | jiffies_to_timespec(cputime_to_jiffies(__ct),__val) | ||
55 | 46 | ||
56 | /* | 47 | /* |
57 | * Convert cputime to timeval and back. | 48 | * Convert cputime to timeval and back. |
58 | */ | 49 | */ |
59 | #define timeval_to_cputime(__val) timeval_to_jiffies(__val) | 50 | #define timeval_to_cputime(__val) \ |
60 | #define cputime_to_timeval(__ct,__val) jiffies_to_timeval(__ct,__val) | 51 | jiffies_to_cputime(timeval_to_jiffies(__val)) |
52 | #define cputime_to_timeval(__ct,__val) \ | ||
53 | jiffies_to_timeval(cputime_to_jiffies(__ct),__val) | ||
61 | 54 | ||
62 | /* | 55 | /* |
63 | * Convert cputime to clock and back. | 56 | * Convert cputime to clock and back. |
64 | */ | 57 | */ |
65 | #define cputime_to_clock_t(__ct) jiffies_to_clock_t(__ct) | 58 | #define cputime_to_clock_t(__ct) \ |
66 | #define clock_t_to_cputime(__x) clock_t_to_jiffies(__x) | 59 | jiffies_to_clock_t(cputime_to_jiffies(__ct)) |
60 | #define clock_t_to_cputime(__x) \ | ||
61 | jiffies_to_cputime(clock_t_to_jiffies(__x)) | ||
67 | 62 | ||
68 | /* | 63 | /* |
69 | * Convert cputime64 to clock. | 64 | * Convert cputime64 to clock. |
70 | */ | 65 | */ |
71 | #define cputime64_to_clock_t(__ct) jiffies_64_to_clock_t(__ct) | 66 | #define cputime64_to_clock_t(__ct) \ |
67 | jiffies_64_to_clock_t(cputime64_to_jiffies64(__ct)) | ||
72 | 68 | ||
73 | #endif | 69 | #endif |
diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h index 8c8621097fa0..1ff4e221cb4d 100644 --- a/include/asm-generic/gpio.h +++ b/include/asm-generic/gpio.h | |||
@@ -4,6 +4,7 @@ | |||
4 | #include <linux/kernel.h> | 4 | #include <linux/kernel.h> |
5 | #include <linux/types.h> | 5 | #include <linux/types.h> |
6 | #include <linux/errno.h> | 6 | #include <linux/errno.h> |
7 | #include <linux/of.h> | ||
7 | 8 | ||
8 | #ifdef CONFIG_GPIOLIB | 9 | #ifdef CONFIG_GPIOLIB |
9 | 10 | ||
@@ -128,13 +129,14 @@ struct gpio_chip { | |||
128 | */ | 129 | */ |
129 | struct device_node *of_node; | 130 | struct device_node *of_node; |
130 | int of_gpio_n_cells; | 131 | int of_gpio_n_cells; |
131 | int (*of_xlate)(struct gpio_chip *gc, struct device_node *np, | 132 | int (*of_xlate)(struct gpio_chip *gc, |
132 | const void *gpio_spec, u32 *flags); | 133 | const struct of_phandle_args *gpiospec, u32 *flags); |
133 | #endif | 134 | #endif |
134 | }; | 135 | }; |
135 | 136 | ||
136 | extern const char *gpiochip_is_requested(struct gpio_chip *chip, | 137 | extern const char *gpiochip_is_requested(struct gpio_chip *chip, |
137 | unsigned offset); | 138 | unsigned offset); |
139 | extern struct gpio_chip *gpio_to_chip(unsigned gpio); | ||
138 | extern int __must_check gpiochip_reserve(int start, int ngpio); | 140 | extern int __must_check gpiochip_reserve(int start, int ngpio); |
139 | 141 | ||
140 | /* add/remove chips */ | 142 | /* add/remove chips */ |
@@ -175,6 +177,10 @@ extern int gpio_request_one(unsigned gpio, unsigned long flags, const char *labe | |||
175 | extern int gpio_request_array(const struct gpio *array, size_t num); | 177 | extern int gpio_request_array(const struct gpio *array, size_t num); |
176 | extern void gpio_free_array(const struct gpio *array, size_t num); | 178 | extern void gpio_free_array(const struct gpio *array, size_t num); |
177 | 179 | ||
180 | /* bindings for managed devices that want to request gpios */ | ||
181 | int devm_gpio_request(struct device *dev, unsigned gpio, const char *label); | ||
182 | void devm_gpio_free(struct device *dev, unsigned int gpio); | ||
183 | |||
178 | #ifdef CONFIG_GPIO_SYSFS | 184 | #ifdef CONFIG_GPIO_SYSFS |
179 | 185 | ||
180 | /* | 186 | /* |
diff --git a/include/asm-generic/io-64-nonatomic-hi-lo.h b/include/asm-generic/io-64-nonatomic-hi-lo.h new file mode 100644 index 000000000000..a6806a94250d --- /dev/null +++ b/include/asm-generic/io-64-nonatomic-hi-lo.h | |||
@@ -0,0 +1,28 @@ | |||
1 | #ifndef _ASM_IO_64_NONATOMIC_HI_LO_H_ | ||
2 | #define _ASM_IO_64_NONATOMIC_HI_LO_H_ | ||
3 | |||
4 | #include <linux/io.h> | ||
5 | #include <asm-generic/int-ll64.h> | ||
6 | |||
7 | #ifndef readq | ||
8 | static inline __u64 readq(const volatile void __iomem *addr) | ||
9 | { | ||
10 | const volatile u32 __iomem *p = addr; | ||
11 | u32 low, high; | ||
12 | |||
13 | high = readl(p + 1); | ||
14 | low = readl(p); | ||
15 | |||
16 | return low + ((u64)high << 32); | ||
17 | } | ||
18 | #endif | ||
19 | |||
20 | #ifndef writeq | ||
21 | static inline void writeq(__u64 val, volatile void __iomem *addr) | ||
22 | { | ||
23 | writel(val >> 32, addr + 4); | ||
24 | writel(val, addr); | ||
25 | } | ||
26 | #endif | ||
27 | |||
28 | #endif /* _ASM_IO_64_NONATOMIC_HI_LO_H_ */ | ||
diff --git a/include/asm-generic/io-64-nonatomic-lo-hi.h b/include/asm-generic/io-64-nonatomic-lo-hi.h new file mode 100644 index 000000000000..ca546b1ff8b5 --- /dev/null +++ b/include/asm-generic/io-64-nonatomic-lo-hi.h | |||
@@ -0,0 +1,28 @@ | |||
1 | #ifndef _ASM_IO_64_NONATOMIC_LO_HI_H_ | ||
2 | #define _ASM_IO_64_NONATOMIC_LO_HI_H_ | ||
3 | |||
4 | #include <linux/io.h> | ||
5 | #include <asm-generic/int-ll64.h> | ||
6 | |||
7 | #ifndef readq | ||
8 | static inline __u64 readq(const volatile void __iomem *addr) | ||
9 | { | ||
10 | const volatile u32 __iomem *p = addr; | ||
11 | u32 low, high; | ||
12 | |||
13 | low = readl(p); | ||
14 | high = readl(p + 1); | ||
15 | |||
16 | return low + ((u64)high << 32); | ||
17 | } | ||
18 | #endif | ||
19 | |||
20 | #ifndef writeq | ||
21 | static inline void writeq(__u64 val, volatile void __iomem *addr) | ||
22 | { | ||
23 | writel(val, addr); | ||
24 | writel(val >> 32, addr + 4); | ||
25 | } | ||
26 | #endif | ||
27 | |||
28 | #endif /* _ASM_IO_64_NONATOMIC_LO_HI_H_ */ | ||
diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h index 912088773a69..448303bdb85f 100644 --- a/include/asm-generic/io.h +++ b/include/asm-generic/io.h | |||
@@ -19,6 +19,8 @@ | |||
19 | #include <asm-generic/iomap.h> | 19 | #include <asm-generic/iomap.h> |
20 | #endif | 20 | #endif |
21 | 21 | ||
22 | #include <asm-generic/pci_iomap.h> | ||
23 | |||
22 | #ifndef mmiowb | 24 | #ifndef mmiowb |
23 | #define mmiowb() do {} while (0) | 25 | #define mmiowb() do {} while (0) |
24 | #endif | 26 | #endif |
@@ -283,9 +285,7 @@ static inline void writesb(const void __iomem *addr, const void *buf, int len) | |||
283 | #define __io_virt(x) ((void __force *) (x)) | 285 | #define __io_virt(x) ((void __force *) (x)) |
284 | 286 | ||
285 | #ifndef CONFIG_GENERIC_IOMAP | 287 | #ifndef CONFIG_GENERIC_IOMAP |
286 | /* Create a virtual mapping cookie for a PCI BAR (memory or IO) */ | ||
287 | struct pci_dev; | 288 | struct pci_dev; |
288 | extern void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max); | ||
289 | static inline void pci_iounmap(struct pci_dev *dev, void __iomem *p) | 289 | static inline void pci_iounmap(struct pci_dev *dev, void __iomem *p) |
290 | { | 290 | { |
291 | } | 291 | } |
@@ -327,7 +327,7 @@ static inline void __iomem *ioremap(phys_addr_t offset, unsigned long size) | |||
327 | #define ioremap_wc ioremap_nocache | 327 | #define ioremap_wc ioremap_nocache |
328 | #endif | 328 | #endif |
329 | 329 | ||
330 | static inline void iounmap(void *addr) | 330 | static inline void iounmap(void __iomem *addr) |
331 | { | 331 | { |
332 | } | 332 | } |
333 | #endif /* CONFIG_MMU */ | 333 | #endif /* CONFIG_MMU */ |
diff --git a/include/asm-generic/iomap.h b/include/asm-generic/iomap.h index 98dcd76ce836..8a3d4fde2604 100644 --- a/include/asm-generic/iomap.h +++ b/include/asm-generic/iomap.h | |||
@@ -67,18 +67,15 @@ extern void ioport_unmap(void __iomem *); | |||
67 | #endif | 67 | #endif |
68 | 68 | ||
69 | #ifdef CONFIG_PCI | 69 | #ifdef CONFIG_PCI |
70 | /* Create a virtual mapping cookie for a PCI BAR (memory or IO) */ | 70 | /* Destroy a virtual mapping cookie for a PCI BAR (memory or IO) */ |
71 | struct pci_dev; | 71 | struct pci_dev; |
72 | extern void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max); | ||
73 | extern void pci_iounmap(struct pci_dev *dev, void __iomem *); | 72 | extern void pci_iounmap(struct pci_dev *dev, void __iomem *); |
74 | #else | 73 | #else |
75 | struct pci_dev; | 74 | struct pci_dev; |
76 | static inline void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max) | ||
77 | { | ||
78 | return NULL; | ||
79 | } | ||
80 | static inline void pci_iounmap(struct pci_dev *dev, void __iomem *addr) | 75 | static inline void pci_iounmap(struct pci_dev *dev, void __iomem *addr) |
81 | { } | 76 | { } |
82 | #endif | 77 | #endif |
83 | 78 | ||
79 | #include <asm-generic/pci_iomap.h> | ||
80 | |||
84 | #endif | 81 | #endif |
diff --git a/include/asm-generic/page.h b/include/asm-generic/page.h index 351889d1de19..37d1fe28960a 100644 --- a/include/asm-generic/page.h +++ b/include/asm-generic/page.h | |||
@@ -71,10 +71,14 @@ extern unsigned long memory_end; | |||
71 | #define PAGE_OFFSET (0) | 71 | #define PAGE_OFFSET (0) |
72 | #endif | 72 | #endif |
73 | 73 | ||
74 | #ifndef ARCH_PFN_OFFSET | ||
75 | #define ARCH_PFN_OFFSET (PAGE_OFFSET >> PAGE_SHIFT) | ||
76 | #endif | ||
77 | |||
74 | #ifndef __ASSEMBLY__ | 78 | #ifndef __ASSEMBLY__ |
75 | 79 | ||
76 | #define __va(x) ((void *)((unsigned long)(x) + PAGE_OFFSET)) | 80 | #define __va(x) ((void *)((unsigned long) (x))) |
77 | #define __pa(x) ((unsigned long) (x) - PAGE_OFFSET) | 81 | #define __pa(x) ((unsigned long) (x)) |
78 | 82 | ||
79 | #define virt_to_pfn(kaddr) (__pa(kaddr) >> PAGE_SHIFT) | 83 | #define virt_to_pfn(kaddr) (__pa(kaddr) >> PAGE_SHIFT) |
80 | #define pfn_to_virt(pfn) __va((pfn) << PAGE_SHIFT) | 84 | #define pfn_to_virt(pfn) __va((pfn) << PAGE_SHIFT) |
@@ -86,7 +90,7 @@ extern unsigned long memory_end; | |||
86 | #define page_to_phys(page) ((dma_addr_t)page_to_pfn(page) << PAGE_SHIFT) | 90 | #define page_to_phys(page) ((dma_addr_t)page_to_pfn(page) << PAGE_SHIFT) |
87 | #endif | 91 | #endif |
88 | 92 | ||
89 | #define pfn_valid(pfn) ((pfn) < max_mapnr) | 93 | #define pfn_valid(pfn) ((pfn) >= ARCH_PFN_OFFSET && ((pfn) - ARCH_PFN_OFFSET) < max_mapnr) |
90 | 94 | ||
91 | #define virt_addr_valid(kaddr) (((void *)(kaddr) >= (void *)PAGE_OFFSET) && \ | 95 | #define virt_addr_valid(kaddr) (((void *)(kaddr) >= (void *)PAGE_OFFSET) && \ |
92 | ((void *)(kaddr) < (void *)memory_end)) | 96 | ((void *)(kaddr) < (void *)memory_end)) |
diff --git a/include/asm-generic/param.h b/include/asm-generic/param.h index cdf8251bfb6c..835632a3b468 100644 --- a/include/asm-generic/param.h +++ b/include/asm-generic/param.h | |||
@@ -1,12 +1,6 @@ | |||
1 | #ifndef __ASM_GENERIC_PARAM_H | 1 | #ifndef __ASM_GENERIC_PARAM_H |
2 | #define __ASM_GENERIC_PARAM_H | 2 | #define __ASM_GENERIC_PARAM_H |
3 | 3 | ||
4 | #ifdef __KERNEL__ | ||
5 | # define HZ CONFIG_HZ /* Internal kernel timer frequency */ | ||
6 | # define USER_HZ 100 /* some user interfaces are */ | ||
7 | # define CLOCKS_PER_SEC (USER_HZ) /* in "ticks" like times() */ | ||
8 | #endif | ||
9 | |||
10 | #ifndef HZ | 4 | #ifndef HZ |
11 | #define HZ 100 | 5 | #define HZ 100 |
12 | #endif | 6 | #endif |
@@ -21,4 +15,11 @@ | |||
21 | 15 | ||
22 | #define MAXHOSTNAMELEN 64 /* max length of hostname */ | 16 | #define MAXHOSTNAMELEN 64 /* max length of hostname */ |
23 | 17 | ||
18 | #ifdef __KERNEL__ | ||
19 | # undef HZ | ||
20 | # define HZ CONFIG_HZ /* Internal kernel timer frequency */ | ||
21 | # define USER_HZ 100 /* some user interfaces are */ | ||
22 | # define CLOCKS_PER_SEC (USER_HZ) /* in "ticks" like times() */ | ||
23 | #endif | ||
24 | |||
24 | #endif /* __ASM_GENERIC_PARAM_H */ | 25 | #endif /* __ASM_GENERIC_PARAM_H */ |
diff --git a/include/asm-generic/pci_iomap.h b/include/asm-generic/pci_iomap.h new file mode 100644 index 000000000000..e58fcf891370 --- /dev/null +++ b/include/asm-generic/pci_iomap.h | |||
@@ -0,0 +1,35 @@ | |||
1 | /* Generic I/O port emulation, based on MN10300 code | ||
2 | * | ||
3 | * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved. | ||
4 | * Written by David Howells (dhowells@redhat.com) | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public Licence | ||
8 | * as published by the Free Software Foundation; either version | ||
9 | * 2 of the Licence, or (at your option) any later version. | ||
10 | */ | ||
11 | #ifndef __ASM_GENERIC_PCI_IOMAP_H | ||
12 | #define __ASM_GENERIC_PCI_IOMAP_H | ||
13 | |||
14 | struct pci_dev; | ||
15 | #ifdef CONFIG_PCI | ||
16 | /* Create a virtual mapping cookie for a PCI BAR (memory or IO) */ | ||
17 | extern void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max); | ||
18 | /* Create a virtual mapping cookie for a port on a given PCI device. | ||
19 | * Do not call this directly, it exists to make it easier for architectures | ||
20 | * to override */ | ||
21 | #ifdef CONFIG_NO_GENERIC_PCI_IOPORT_MAP | ||
22 | extern void __iomem *__pci_ioport_map(struct pci_dev *dev, unsigned long port, | ||
23 | unsigned int nr); | ||
24 | #else | ||
25 | #define __pci_ioport_map(dev, port, nr) ioport_map((port), (nr)) | ||
26 | #endif | ||
27 | |||
28 | #else | ||
29 | static inline void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max) | ||
30 | { | ||
31 | return NULL; | ||
32 | } | ||
33 | #endif | ||
34 | |||
35 | #endif /* __ASM_GENERIC_IO_H */ | ||
diff --git a/include/asm-generic/poll.h b/include/asm-generic/poll.h index 44bce836d350..9ce7f44aebd2 100644 --- a/include/asm-generic/poll.h +++ b/include/asm-generic/poll.h | |||
@@ -28,6 +28,8 @@ | |||
28 | #define POLLRDHUP 0x2000 | 28 | #define POLLRDHUP 0x2000 |
29 | #endif | 29 | #endif |
30 | 30 | ||
31 | #define POLLFREE 0x4000 /* currently only for epoll */ | ||
32 | |||
31 | struct pollfd { | 33 | struct pollfd { |
32 | int fd; | 34 | int fd; |
33 | short events; | 35 | short events; |
diff --git a/include/asm-generic/socket.h b/include/asm-generic/socket.h index 9a6115e7cf63..49c1704173e7 100644 --- a/include/asm-generic/socket.h +++ b/include/asm-generic/socket.h | |||
@@ -64,4 +64,7 @@ | |||
64 | #define SO_DOMAIN 39 | 64 | #define SO_DOMAIN 39 |
65 | 65 | ||
66 | #define SO_RXQ_OVFL 40 | 66 | #define SO_RXQ_OVFL 40 |
67 | |||
68 | #define SO_WIFI_STATUS 41 | ||
69 | #define SCM_WIFI_STATUS SO_WIFI_STATUS | ||
67 | #endif /* __ASM_GENERIC_SOCKET_H */ | 70 | #endif /* __ASM_GENERIC_SOCKET_H */ |
diff --git a/include/asm-generic/tlb.h b/include/asm-generic/tlb.h index e58fa777fa09..f96a5b58a975 100644 --- a/include/asm-generic/tlb.h +++ b/include/asm-generic/tlb.h | |||
@@ -139,6 +139,20 @@ static inline void tlb_remove_page(struct mmu_gather *tlb, struct page *page) | |||
139 | __tlb_remove_tlb_entry(tlb, ptep, address); \ | 139 | __tlb_remove_tlb_entry(tlb, ptep, address); \ |
140 | } while (0) | 140 | } while (0) |
141 | 141 | ||
142 | /** | ||
143 | * tlb_remove_pmd_tlb_entry - remember a pmd mapping for later tlb invalidation | ||
144 | * This is a nop so far, because only x86 needs it. | ||
145 | */ | ||
146 | #ifndef __tlb_remove_pmd_tlb_entry | ||
147 | #define __tlb_remove_pmd_tlb_entry(tlb, pmdp, address) do {} while (0) | ||
148 | #endif | ||
149 | |||
150 | #define tlb_remove_pmd_tlb_entry(tlb, pmdp, address) \ | ||
151 | do { \ | ||
152 | tlb->need_flush = 1; \ | ||
153 | __tlb_remove_pmd_tlb_entry(tlb, pmdp, address); \ | ||
154 | } while (0) | ||
155 | |||
142 | #define pte_free_tlb(tlb, ptep, address) \ | 156 | #define pte_free_tlb(tlb, ptep, address) \ |
143 | do { \ | 157 | do { \ |
144 | tlb->need_flush = 1; \ | 158 | tlb->need_flush = 1; \ |
diff --git a/include/asm-generic/types.h b/include/asm-generic/types.h index 7a0f69e6c618..bd39806013b5 100644 --- a/include/asm-generic/types.h +++ b/include/asm-generic/types.h | |||
@@ -6,10 +6,4 @@ | |||
6 | */ | 6 | */ |
7 | #include <asm-generic/int-ll64.h> | 7 | #include <asm-generic/int-ll64.h> |
8 | 8 | ||
9 | #ifndef __ASSEMBLY__ | ||
10 | |||
11 | typedef unsigned short umode_t; | ||
12 | |||
13 | #endif /* __ASSEMBLY__ */ | ||
14 | |||
15 | #endif /* _ASM_GENERIC_TYPES_H */ | 9 | #endif /* _ASM_GENERIC_TYPES_H */ |
diff --git a/include/asm-generic/uaccess.h b/include/asm-generic/uaccess.h index ac68c999b6c2..9788568f7978 100644 --- a/include/asm-generic/uaccess.h +++ b/include/asm-generic/uaccess.h | |||
@@ -289,9 +289,14 @@ strncpy_from_user(char *dst, const char __user *src, long count) | |||
289 | * Return 0 on exception, a value greater than N if too long | 289 | * Return 0 on exception, a value greater than N if too long |
290 | */ | 290 | */ |
291 | #ifndef __strnlen_user | 291 | #ifndef __strnlen_user |
292 | #define __strnlen_user strnlen | 292 | #define __strnlen_user(s, n) (strnlen((s), (n)) + 1) |
293 | #endif | 293 | #endif |
294 | 294 | ||
295 | /* | ||
296 | * Unlike strnlen, strnlen_user includes the nul terminator in | ||
297 | * its returned count. Callers should check for a returned value | ||
298 | * greater than N as an indication the string is too long. | ||
299 | */ | ||
295 | static inline long strnlen_user(const char __user *src, long n) | 300 | static inline long strnlen_user(const char __user *src, long n) |
296 | { | 301 | { |
297 | if (!access_ok(VERIFY_READ, src, 1)) | 302 | if (!access_ok(VERIFY_READ, src, 1)) |