aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-alpha/compiler.h47
-rw-r--r--include/asm-alpha/core_mcpcia.h2
-rw-r--r--include/asm-alpha/io.h1
-rw-r--r--include/asm-powerpc/systbl.h2
-rw-r--r--include/linux/io.h13
-rw-r--r--include/linux/plist.h54
6 files changed, 75 insertions, 44 deletions
diff --git a/include/asm-alpha/compiler.h b/include/asm-alpha/compiler.h
index d2768cc3d7a4..da6bb199839c 100644
--- a/include/asm-alpha/compiler.h
+++ b/include/asm-alpha/compiler.h
@@ -17,9 +17,6 @@
17# define __kernel_extbl(val, shift) __builtin_alpha_extbl(val, shift) 17# define __kernel_extbl(val, shift) __builtin_alpha_extbl(val, shift)
18# define __kernel_extwl(val, shift) __builtin_alpha_extwl(val, shift) 18# define __kernel_extwl(val, shift) __builtin_alpha_extwl(val, shift)
19# define __kernel_cmpbge(a, b) __builtin_alpha_cmpbge(a, b) 19# define __kernel_cmpbge(a, b) __builtin_alpha_cmpbge(a, b)
20# define __kernel_cttz(x) __builtin_ctzl(x)
21# define __kernel_ctlz(x) __builtin_clzl(x)
22# define __kernel_ctpop(x) __builtin_popcountl(x)
23#else 20#else
24# define __kernel_insbl(val, shift) \ 21# define __kernel_insbl(val, shift) \
25 ({ unsigned long __kir; \ 22 ({ unsigned long __kir; \
@@ -49,17 +46,39 @@
49 ({ unsigned long __kir; \ 46 ({ unsigned long __kir; \
50 __asm__("cmpbge %r2,%1,%0" : "=r"(__kir) : "rI"(b), "rJ"(a)); \ 47 __asm__("cmpbge %r2,%1,%0" : "=r"(__kir) : "rI"(b), "rJ"(a)); \
51 __kir; }) 48 __kir; })
49#endif
50
51#ifdef __alpha_cix__
52# if __GNUC__ == 3 && __GNUC_MINOR__ >= 4 || __GNUC__ > 3
53# define __kernel_cttz(x) __builtin_ctzl(x)
54# define __kernel_ctlz(x) __builtin_clzl(x)
55# define __kernel_ctpop(x) __builtin_popcountl(x)
56# else
57# define __kernel_cttz(x) \
58 ({ unsigned long __kir; \
59 __asm__("cttz %1,%0" : "=r"(__kir) : "r"(x)); \
60 __kir; })
61# define __kernel_ctlz(x) \
62 ({ unsigned long __kir; \
63 __asm__("ctlz %1,%0" : "=r"(__kir) : "r"(x)); \
64 __kir; })
65# define __kernel_ctpop(x) \
66 ({ unsigned long __kir; \
67 __asm__("ctpop %1,%0" : "=r"(__kir) : "r"(x)); \
68 __kir; })
69# endif
70#else
52# define __kernel_cttz(x) \ 71# define __kernel_cttz(x) \
53 ({ unsigned long __kir; \ 72 ({ unsigned long __kir; \
54 __asm__("cttz %1,%0" : "=r"(__kir) : "r"(x)); \ 73 __asm__(".arch ev67; cttz %1,%0" : "=r"(__kir) : "r"(x)); \
55 __kir; }) 74 __kir; })
56# define __kernel_ctlz(x) \ 75# define __kernel_ctlz(x) \
57 ({ unsigned long __kir; \ 76 ({ unsigned long __kir; \
58 __asm__("ctlz %1,%0" : "=r"(__kir) : "r"(x)); \ 77 __asm__(".arch ev67; ctlz %1,%0" : "=r"(__kir) : "r"(x)); \
59 __kir; }) 78 __kir; })
60# define __kernel_ctpop(x) \ 79# define __kernel_ctpop(x) \
61 ({ unsigned long __kir; \ 80 ({ unsigned long __kir; \
62 __asm__("ctpop %1,%0" : "=r"(__kir) : "r"(x)); \ 81 __asm__(".arch ev67; ctpop %1,%0" : "=r"(__kir) : "r"(x)); \
63 __kir; }) 82 __kir; })
64#endif 83#endif
65 84
@@ -78,16 +97,20 @@
78#else 97#else
79#define __kernel_ldbu(mem) \ 98#define __kernel_ldbu(mem) \
80 ({ unsigned char __kir; \ 99 ({ unsigned char __kir; \
81 __asm__("ldbu %0,%1" : "=r"(__kir) : "m"(mem)); \ 100 __asm__(".arch ev56; \
101 ldbu %0,%1" : "=r"(__kir) : "m"(mem)); \
82 __kir; }) 102 __kir; })
83#define __kernel_ldwu(mem) \ 103#define __kernel_ldwu(mem) \
84 ({ unsigned short __kir; \ 104 ({ unsigned short __kir; \
85 __asm__("ldwu %0,%1" : "=r"(__kir) : "m"(mem)); \ 105 __asm__(".arch ev56; \
106 ldwu %0,%1" : "=r"(__kir) : "m"(mem)); \
86 __kir; }) 107 __kir; })
87#define __kernel_stb(val,mem) \ 108#define __kernel_stb(val,mem) \
88 __asm__("stb %1,%0" : "=m"(mem) : "r"(val)) 109 __asm__(".arch ev56; \
89#define __kernel_stw(val,mem) \ 110 stb %1,%0" : "=m"(mem) : "r"(val))
90 __asm__("stw %1,%0" : "=m"(mem) : "r"(val)) 111#define __kernel_stw(val,mem) \
112 __asm__(".arch ev56; \
113 stw %1,%0" : "=m"(mem) : "r"(val))
91#endif 114#endif
92 115
93#ifdef __KERNEL__ 116#ifdef __KERNEL__
diff --git a/include/asm-alpha/core_mcpcia.h b/include/asm-alpha/core_mcpcia.h
index 980a3c51b18e..525b4f6a7ace 100644
--- a/include/asm-alpha/core_mcpcia.h
+++ b/include/asm-alpha/core_mcpcia.h
@@ -72,6 +72,8 @@
72 * 72 *
73 */ 73 */
74 74
75#define MCPCIA_MAX_HOSES 4
76
75#define MCPCIA_MID(m) ((unsigned long)(m) << 33) 77#define MCPCIA_MID(m) ((unsigned long)(m) << 33)
76 78
77/* Dodge has PCI0 and PCI1 at MID 4 and 5 respectively. 79/* Dodge has PCI0 and PCI1 at MID 4 and 5 respectively.
diff --git a/include/asm-alpha/io.h b/include/asm-alpha/io.h
index 24bdcc8b63aa..21a86f1a05b3 100644
--- a/include/asm-alpha/io.h
+++ b/include/asm-alpha/io.h
@@ -113,6 +113,7 @@ static inline unsigned long virt_to_bus(void *address)
113 unsigned long bus = phys + __direct_map_base; 113 unsigned long bus = phys + __direct_map_base;
114 return phys <= __direct_map_size ? bus : 0; 114 return phys <= __direct_map_size ? bus : 0;
115} 115}
116#define isa_virt_to_bus virt_to_bus
116 117
117static inline void *bus_to_virt(unsigned long address) 118static inline void *bus_to_virt(unsigned long address)
118{ 119{
diff --git a/include/asm-powerpc/systbl.h b/include/asm-powerpc/systbl.h
index 8d853c554631..0b00068313f9 100644
--- a/include/asm-powerpc/systbl.h
+++ b/include/asm-powerpc/systbl.h
@@ -288,7 +288,7 @@ COMPAT_SYS(ppoll)
288SYSCALL_SPU(unshare) 288SYSCALL_SPU(unshare)
289SYSCALL_SPU(splice) 289SYSCALL_SPU(splice)
290SYSCALL_SPU(tee) 290SYSCALL_SPU(tee)
291SYSCALL_SPU(vmsplice) 291COMPAT_SYS_SPU(vmsplice)
292COMPAT_SYS_SPU(openat) 292COMPAT_SYS_SPU(openat)
293SYSCALL_SPU(mkdirat) 293SYSCALL_SPU(mkdirat)
294SYSCALL_SPU(mknodat) 294SYSCALL_SPU(mknodat)
diff --git a/include/linux/io.h b/include/linux/io.h
index c244a0cc9319..09d351236379 100644
--- a/include/linux/io.h
+++ b/include/linux/io.h
@@ -33,9 +33,22 @@ int ioremap_page_range(unsigned long addr, unsigned long end,
33/* 33/*
34 * Managed iomap interface 34 * Managed iomap interface
35 */ 35 */
36#ifdef CONFIG_HAS_IOPORT
36void __iomem * devm_ioport_map(struct device *dev, unsigned long port, 37void __iomem * devm_ioport_map(struct device *dev, unsigned long port,
37 unsigned int nr); 38 unsigned int nr);
38void devm_ioport_unmap(struct device *dev, void __iomem *addr); 39void devm_ioport_unmap(struct device *dev, void __iomem *addr);
40#else
41static inline void __iomem *devm_ioport_map(struct device *dev,
42 unsigned long port,
43 unsigned int nr)
44{
45 return NULL;
46}
47
48static inline void devm_ioport_unmap(struct device *dev, void __iomem *addr)
49{
50}
51#endif
39 52
40void __iomem * devm_ioremap(struct device *dev, unsigned long offset, 53void __iomem * devm_ioremap(struct device *dev, unsigned long offset,
41 unsigned long size); 54 unsigned long size);
diff --git a/include/linux/plist.h b/include/linux/plist.h
index b95818a037ad..85de2f055874 100644
--- a/include/linux/plist.h
+++ b/include/linux/plist.h
@@ -97,9 +97,9 @@ struct plist_node {
97#endif 97#endif
98 98
99/** 99/**
100 * #PLIST_HEAD_INIT - static struct plist_head initializer 100 * PLIST_HEAD_INIT - static struct plist_head initializer
101 *
102 * @head: struct plist_head variable name 101 * @head: struct plist_head variable name
102 * @_lock: lock to initialize for this list
103 */ 103 */
104#define PLIST_HEAD_INIT(head, _lock) \ 104#define PLIST_HEAD_INIT(head, _lock) \
105{ \ 105{ \
@@ -109,8 +109,7 @@ struct plist_node {
109} 109}
110 110
111/** 111/**
112 * #PLIST_NODE_INIT - static struct plist_node initializer 112 * PLIST_NODE_INIT - static struct plist_node initializer
113 *
114 * @node: struct plist_node variable name 113 * @node: struct plist_node variable name
115 * @__prio: initial node priority 114 * @__prio: initial node priority
116 */ 115 */
@@ -122,8 +121,8 @@ struct plist_node {
122 121
123/** 122/**
124 * plist_head_init - dynamic struct plist_head initializer 123 * plist_head_init - dynamic struct plist_head initializer
125 *
126 * @head: &struct plist_head pointer 124 * @head: &struct plist_head pointer
125 * @lock: list spinlock, remembered for debugging
127 */ 126 */
128static inline void 127static inline void
129plist_head_init(struct plist_head *head, spinlock_t *lock) 128plist_head_init(struct plist_head *head, spinlock_t *lock)
@@ -137,7 +136,6 @@ plist_head_init(struct plist_head *head, spinlock_t *lock)
137 136
138/** 137/**
139 * plist_node_init - Dynamic struct plist_node initializer 138 * plist_node_init - Dynamic struct plist_node initializer
140 *
141 * @node: &struct plist_node pointer 139 * @node: &struct plist_node pointer
142 * @prio: initial node priority 140 * @prio: initial node priority
143 */ 141 */
@@ -152,49 +150,46 @@ extern void plist_del(struct plist_node *node, struct plist_head *head);
152 150
153/** 151/**
154 * plist_for_each - iterate over the plist 152 * plist_for_each - iterate over the plist
155 * 153 * @pos: the type * to use as a loop counter
156 * @pos1: the type * to use as a loop counter. 154 * @head: the head for your list
157 * @head: the head for your list.
158 */ 155 */
159#define plist_for_each(pos, head) \ 156#define plist_for_each(pos, head) \
160 list_for_each_entry(pos, &(head)->node_list, plist.node_list) 157 list_for_each_entry(pos, &(head)->node_list, plist.node_list)
161 158
162/** 159/**
163 * plist_for_each_entry_safe - iterate over a plist of given type safe 160 * plist_for_each_safe - iterate safely over a plist of given type
164 * against removal of list entry 161 * @pos: the type * to use as a loop counter
162 * @n: another type * to use as temporary storage
163 * @head: the head for your list
165 * 164 *
166 * @pos1: the type * to use as a loop counter. 165 * Iterate over a plist of given type, safe against removal of list entry.
167 * @n1: another type * to use as temporary storage
168 * @head: the head for your list.
169 */ 166 */
170#define plist_for_each_safe(pos, n, head) \ 167#define plist_for_each_safe(pos, n, head) \
171 list_for_each_entry_safe(pos, n, &(head)->node_list, plist.node_list) 168 list_for_each_entry_safe(pos, n, &(head)->node_list, plist.node_list)
172 169
173/** 170/**
174 * plist_for_each_entry - iterate over list of given type 171 * plist_for_each_entry - iterate over list of given type
175 * 172 * @pos: the type * to use as a loop counter
176 * @pos: the type * to use as a loop counter. 173 * @head: the head for your list
177 * @head: the head for your list. 174 * @mem: the name of the list_struct within the struct
178 * @member: the name of the list_struct within the struct.
179 */ 175 */
180#define plist_for_each_entry(pos, head, mem) \ 176#define plist_for_each_entry(pos, head, mem) \
181 list_for_each_entry(pos, &(head)->node_list, mem.plist.node_list) 177 list_for_each_entry(pos, &(head)->node_list, mem.plist.node_list)
182 178
183/** 179/**
184 * plist_for_each_entry_safe - iterate over list of given type safe against 180 * plist_for_each_entry_safe - iterate safely over list of given type
185 * removal of list entry 181 * @pos: the type * to use as a loop counter
186 *
187 * @pos: the type * to use as a loop counter.
188 * @n: another type * to use as temporary storage 182 * @n: another type * to use as temporary storage
189 * @head: the head for your list. 183 * @head: the head for your list
190 * @m: the name of the list_struct within the struct. 184 * @m: the name of the list_struct within the struct
185 *
186 * Iterate over list of given type, safe against removal of list entry.
191 */ 187 */
192#define plist_for_each_entry_safe(pos, n, head, m) \ 188#define plist_for_each_entry_safe(pos, n, head, m) \
193 list_for_each_entry_safe(pos, n, &(head)->node_list, m.plist.node_list) 189 list_for_each_entry_safe(pos, n, &(head)->node_list, m.plist.node_list)
194 190
195/** 191/**
196 * plist_head_empty - return !0 if a plist_head is empty 192 * plist_head_empty - return !0 if a plist_head is empty
197 *
198 * @head: &struct plist_head pointer 193 * @head: &struct plist_head pointer
199 */ 194 */
200static inline int plist_head_empty(const struct plist_head *head) 195static inline int plist_head_empty(const struct plist_head *head)
@@ -204,7 +199,6 @@ static inline int plist_head_empty(const struct plist_head *head)
204 199
205/** 200/**
206 * plist_node_empty - return !0 if plist_node is not on a list 201 * plist_node_empty - return !0 if plist_node is not on a list
207 *
208 * @node: &struct plist_node pointer 202 * @node: &struct plist_node pointer
209 */ 203 */
210static inline int plist_node_empty(const struct plist_node *node) 204static inline int plist_node_empty(const struct plist_node *node)
@@ -216,10 +210,9 @@ static inline int plist_node_empty(const struct plist_node *node)
216 210
217/** 211/**
218 * plist_first_entry - get the struct for the first entry 212 * plist_first_entry - get the struct for the first entry
219 * 213 * @head: the &struct plist_head pointer
220 * @ptr: the &struct plist_head pointer. 214 * @type: the type of the struct this is embedded in
221 * @type: the type of the struct this is embedded in. 215 * @member: the name of the list_struct within the struct
222 * @member: the name of the list_struct within the struct.
223 */ 216 */
224#ifdef CONFIG_DEBUG_PI_LIST 217#ifdef CONFIG_DEBUG_PI_LIST
225# define plist_first_entry(head, type, member) \ 218# define plist_first_entry(head, type, member) \
@@ -234,7 +227,6 @@ static inline int plist_node_empty(const struct plist_node *node)
234 227
235/** 228/**
236 * plist_first - return the first node (and thus, highest priority) 229 * plist_first - return the first node (and thus, highest priority)
237 *
238 * @head: the &struct plist_head pointer 230 * @head: the &struct plist_head pointer
239 * 231 *
240 * Assumes the plist is _not_ empty. 232 * Assumes the plist is _not_ empty.