diff options
Diffstat (limited to 'include/asm-generic')
-rw-r--r-- | include/asm-generic/gpio.h | 8 | ||||
-rw-r--r-- | include/asm-generic/kmap_types.h | 47 | ||||
-rw-r--r-- | include/asm-generic/sections.h | 16 |
3 files changed, 48 insertions, 23 deletions
diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h index d6c379dc64fa..9cca3785cab8 100644 --- a/include/asm-generic/gpio.h +++ b/include/asm-generic/gpio.h | |||
@@ -141,6 +141,8 @@ extern int __gpio_to_irq(unsigned gpio); | |||
141 | * but more typically is configured entirely from userspace. | 141 | * but more typically is configured entirely from userspace. |
142 | */ | 142 | */ |
143 | extern int gpio_export(unsigned gpio, bool direction_may_change); | 143 | extern int gpio_export(unsigned gpio, bool direction_may_change); |
144 | extern int gpio_export_link(struct device *dev, const char *name, | ||
145 | unsigned gpio); | ||
144 | extern void gpio_unexport(unsigned gpio); | 146 | extern void gpio_unexport(unsigned gpio); |
145 | 147 | ||
146 | #endif /* CONFIG_GPIO_SYSFS */ | 148 | #endif /* CONFIG_GPIO_SYSFS */ |
@@ -185,6 +187,12 @@ static inline int gpio_export(unsigned gpio, bool direction_may_change) | |||
185 | return -ENOSYS; | 187 | return -ENOSYS; |
186 | } | 188 | } |
187 | 189 | ||
190 | static inline int gpio_export_link(struct device *dev, const char *name, | ||
191 | unsigned gpio) | ||
192 | { | ||
193 | return -ENOSYS; | ||
194 | } | ||
195 | |||
188 | static inline void gpio_unexport(unsigned gpio) | 196 | static inline void gpio_unexport(unsigned gpio) |
189 | { | 197 | { |
190 | } | 198 | } |
diff --git a/include/asm-generic/kmap_types.h b/include/asm-generic/kmap_types.h index eddbce0f9fb9..e5f234a08540 100644 --- a/include/asm-generic/kmap_types.h +++ b/include/asm-generic/kmap_types.h | |||
@@ -2,34 +2,35 @@ | |||
2 | #define _ASM_GENERIC_KMAP_TYPES_H | 2 | #define _ASM_GENERIC_KMAP_TYPES_H |
3 | 3 | ||
4 | #ifdef __WITH_KM_FENCE | 4 | #ifdef __WITH_KM_FENCE |
5 | # define D(n) __KM_FENCE_##n , | 5 | # define KMAP_D(n) __KM_FENCE_##n , |
6 | #else | 6 | #else |
7 | # define D(n) | 7 | # define KMAP_D(n) |
8 | #endif | 8 | #endif |
9 | 9 | ||
10 | enum km_type { | 10 | enum km_type { |
11 | D(0) KM_BOUNCE_READ, | 11 | KMAP_D(0) KM_BOUNCE_READ, |
12 | D(1) KM_SKB_SUNRPC_DATA, | 12 | KMAP_D(1) KM_SKB_SUNRPC_DATA, |
13 | D(2) KM_SKB_DATA_SOFTIRQ, | 13 | KMAP_D(2) KM_SKB_DATA_SOFTIRQ, |
14 | D(3) KM_USER0, | 14 | KMAP_D(3) KM_USER0, |
15 | D(4) KM_USER1, | 15 | KMAP_D(4) KM_USER1, |
16 | D(5) KM_BIO_SRC_IRQ, | 16 | KMAP_D(5) KM_BIO_SRC_IRQ, |
17 | D(6) KM_BIO_DST_IRQ, | 17 | KMAP_D(6) KM_BIO_DST_IRQ, |
18 | D(7) KM_PTE0, | 18 | KMAP_D(7) KM_PTE0, |
19 | D(8) KM_PTE1, | 19 | KMAP_D(8) KM_PTE1, |
20 | D(9) KM_IRQ0, | 20 | KMAP_D(9) KM_IRQ0, |
21 | D(10) KM_IRQ1, | 21 | KMAP_D(10) KM_IRQ1, |
22 | D(11) KM_SOFTIRQ0, | 22 | KMAP_D(11) KM_SOFTIRQ0, |
23 | D(12) KM_SOFTIRQ1, | 23 | KMAP_D(12) KM_SOFTIRQ1, |
24 | D(13) KM_SYNC_ICACHE, | 24 | KMAP_D(13) KM_SYNC_ICACHE, |
25 | D(14) KM_SYNC_DCACHE, | 25 | KMAP_D(14) KM_SYNC_DCACHE, |
26 | D(15) KM_UML_USERCOPY, /* UML specific, for copy_*_user - used in do_op_one_page */ | 26 | /* UML specific, for copy_*_user - used in do_op_one_page */ |
27 | D(16) KM_IRQ_PTE, | 27 | KMAP_D(15) KM_UML_USERCOPY, |
28 | D(17) KM_NMI, | 28 | KMAP_D(16) KM_IRQ_PTE, |
29 | D(18) KM_NMI_PTE, | 29 | KMAP_D(17) KM_NMI, |
30 | D(19) KM_TYPE_NR | 30 | KMAP_D(18) KM_NMI_PTE, |
31 | KMAP_D(19) KM_TYPE_NR | ||
31 | }; | 32 | }; |
32 | 33 | ||
33 | #undef D | 34 | #undef KMAP_D |
34 | 35 | ||
35 | #endif | 36 | #endif |
diff --git a/include/asm-generic/sections.h b/include/asm-generic/sections.h index d083561337f2..b3bfabc258f3 100644 --- a/include/asm-generic/sections.h +++ b/include/asm-generic/sections.h | |||
@@ -23,4 +23,20 @@ extern char __ctors_start[], __ctors_end[]; | |||
23 | #define dereference_function_descriptor(p) (p) | 23 | #define dereference_function_descriptor(p) (p) |
24 | #endif | 24 | #endif |
25 | 25 | ||
26 | /* random extra sections (if any). Override | ||
27 | * in asm/sections.h */ | ||
28 | #ifndef arch_is_kernel_text | ||
29 | static inline int arch_is_kernel_text(unsigned long addr) | ||
30 | { | ||
31 | return 0; | ||
32 | } | ||
33 | #endif | ||
34 | |||
35 | #ifndef arch_is_kernel_data | ||
36 | static inline int arch_is_kernel_data(unsigned long addr) | ||
37 | { | ||
38 | return 0; | ||
39 | } | ||
40 | #endif | ||
41 | |||
26 | #endif /* _ASM_GENERIC_SECTIONS_H_ */ | 42 | #endif /* _ASM_GENERIC_SECTIONS_H_ */ |