diff options
Diffstat (limited to 'arch/sparc/include')
-rw-r--r-- | arch/sparc/include/asm/Kbuild | 1 | ||||
-rw-r--r-- | arch/sparc/include/asm/floppy_32.h | 3 | ||||
-rw-r--r-- | arch/sparc/include/asm/highmem.h | 4 | ||||
-rw-r--r-- | arch/sparc/include/asm/io_32.h | 31 | ||||
-rw-r--r-- | arch/sparc/include/asm/io_64.h | 31 | ||||
-rw-r--r-- | arch/sparc/include/asm/jump_label.h | 1 | ||||
-rw-r--r-- | arch/sparc/include/asm/openprom.h | 16 | ||||
-rw-r--r-- | arch/sparc/include/asm/oplib_32.h | 44 | ||||
-rw-r--r-- | arch/sparc/include/asm/oplib_64.h | 39 | ||||
-rw-r--r-- | arch/sparc/include/asm/pci_64.h | 2 | ||||
-rw-r--r-- | arch/sparc/include/asm/pgtable_32.h | 3 | ||||
-rw-r--r-- | arch/sparc/include/asm/pgtable_64.h | 2 | ||||
-rw-r--r-- | arch/sparc/include/asm/prom.h | 5 |
13 files changed, 122 insertions, 60 deletions
diff --git a/arch/sparc/include/asm/Kbuild b/arch/sparc/include/asm/Kbuild index deeb0fba8029..3c93f08ce187 100644 --- a/arch/sparc/include/asm/Kbuild +++ b/arch/sparc/include/asm/Kbuild | |||
@@ -7,7 +7,6 @@ header-y += display7seg.h | |||
7 | header-y += envctrl.h | 7 | header-y += envctrl.h |
8 | header-y += fbio.h | 8 | header-y += fbio.h |
9 | header-y += jsflash.h | 9 | header-y += jsflash.h |
10 | header-y += openprom.h | ||
11 | header-y += openpromio.h | 10 | header-y += openpromio.h |
12 | header-y += perfctr.h | 11 | header-y += perfctr.h |
13 | header-y += psrcompat.h | 12 | header-y += psrcompat.h |
diff --git a/arch/sparc/include/asm/floppy_32.h b/arch/sparc/include/asm/floppy_32.h index c792830636de..86666f70322e 100644 --- a/arch/sparc/include/asm/floppy_32.h +++ b/arch/sparc/include/asm/floppy_32.h | |||
@@ -304,7 +304,8 @@ static struct linux_prom_registers fd_regs[2]; | |||
304 | static int sun_floppy_init(void) | 304 | static int sun_floppy_init(void) |
305 | { | 305 | { |
306 | char state[128]; | 306 | char state[128]; |
307 | int tnode, fd_node, num_regs; | 307 | phandle tnode, fd_node; |
308 | int num_regs; | ||
308 | struct resource r; | 309 | struct resource r; |
309 | 310 | ||
310 | use_virtual_dma = 1; | 311 | use_virtual_dma = 1; |
diff --git a/arch/sparc/include/asm/highmem.h b/arch/sparc/include/asm/highmem.h index ec23b0a87b98..3d7afbb7f4bb 100644 --- a/arch/sparc/include/asm/highmem.h +++ b/arch/sparc/include/asm/highmem.h | |||
@@ -70,8 +70,8 @@ static inline void kunmap(struct page *page) | |||
70 | kunmap_high(page); | 70 | kunmap_high(page); |
71 | } | 71 | } |
72 | 72 | ||
73 | extern void *kmap_atomic(struct page *page, enum km_type type); | 73 | extern void *__kmap_atomic(struct page *page); |
74 | extern void kunmap_atomic_notypecheck(void *kvaddr, enum km_type type); | 74 | extern void __kunmap_atomic(void *kvaddr); |
75 | extern struct page *kmap_atomic_to_page(void *vaddr); | 75 | extern struct page *kmap_atomic_to_page(void *vaddr); |
76 | 76 | ||
77 | #define flush_cache_kmaps() flush_cache_all() | 77 | #define flush_cache_kmaps() flush_cache_all() |
diff --git a/arch/sparc/include/asm/io_32.h b/arch/sparc/include/asm/io_32.h index 2889574608db..c2ced21c9dc1 100644 --- a/arch/sparc/include/asm/io_32.h +++ b/arch/sparc/include/asm/io_32.h | |||
@@ -208,6 +208,21 @@ _memset_io(volatile void __iomem *dst, int c, __kernel_size_t n) | |||
208 | #define memset_io(d,c,sz) _memset_io(d,c,sz) | 208 | #define memset_io(d,c,sz) _memset_io(d,c,sz) |
209 | 209 | ||
210 | static inline void | 210 | static inline void |
211 | _sbus_memcpy_fromio(void *dst, const volatile void __iomem *src, | ||
212 | __kernel_size_t n) | ||
213 | { | ||
214 | char *d = dst; | ||
215 | |||
216 | while (n--) { | ||
217 | char tmp = sbus_readb(src); | ||
218 | *d++ = tmp; | ||
219 | src++; | ||
220 | } | ||
221 | } | ||
222 | |||
223 | #define sbus_memcpy_fromio(d, s, sz) _sbus_memcpy_fromio(d, s, sz) | ||
224 | |||
225 | static inline void | ||
211 | _memcpy_fromio(void *dst, const volatile void __iomem *src, __kernel_size_t n) | 226 | _memcpy_fromio(void *dst, const volatile void __iomem *src, __kernel_size_t n) |
212 | { | 227 | { |
213 | char *d = dst; | 228 | char *d = dst; |
@@ -222,6 +237,22 @@ _memcpy_fromio(void *dst, const volatile void __iomem *src, __kernel_size_t n) | |||
222 | #define memcpy_fromio(d,s,sz) _memcpy_fromio(d,s,sz) | 237 | #define memcpy_fromio(d,s,sz) _memcpy_fromio(d,s,sz) |
223 | 238 | ||
224 | static inline void | 239 | static inline void |
240 | _sbus_memcpy_toio(volatile void __iomem *dst, const void *src, | ||
241 | __kernel_size_t n) | ||
242 | { | ||
243 | const char *s = src; | ||
244 | volatile void __iomem *d = dst; | ||
245 | |||
246 | while (n--) { | ||
247 | char tmp = *s++; | ||
248 | sbus_writeb(tmp, d); | ||
249 | d++; | ||
250 | } | ||
251 | } | ||
252 | |||
253 | #define sbus_memcpy_toio(d, s, sz) _sbus_memcpy_toio(d, s, sz) | ||
254 | |||
255 | static inline void | ||
225 | _memcpy_toio(volatile void __iomem *dst, const void *src, __kernel_size_t n) | 256 | _memcpy_toio(volatile void __iomem *dst, const void *src, __kernel_size_t n) |
226 | { | 257 | { |
227 | const char *s = src; | 258 | const char *s = src; |
diff --git a/arch/sparc/include/asm/io_64.h b/arch/sparc/include/asm/io_64.h index 9517d063c79c..9c8965415f0a 100644 --- a/arch/sparc/include/asm/io_64.h +++ b/arch/sparc/include/asm/io_64.h | |||
@@ -419,6 +419,21 @@ _memset_io(volatile void __iomem *dst, int c, __kernel_size_t n) | |||
419 | #define memset_io(d,c,sz) _memset_io(d,c,sz) | 419 | #define memset_io(d,c,sz) _memset_io(d,c,sz) |
420 | 420 | ||
421 | static inline void | 421 | static inline void |
422 | _sbus_memcpy_fromio(void *dst, const volatile void __iomem *src, | ||
423 | __kernel_size_t n) | ||
424 | { | ||
425 | char *d = dst; | ||
426 | |||
427 | while (n--) { | ||
428 | char tmp = sbus_readb(src); | ||
429 | *d++ = tmp; | ||
430 | src++; | ||
431 | } | ||
432 | } | ||
433 | |||
434 | #define sbus_memcpy_fromio(d, s, sz) _sbus_memcpy_fromio(d, s, sz) | ||
435 | |||
436 | static inline void | ||
422 | _memcpy_fromio(void *dst, const volatile void __iomem *src, __kernel_size_t n) | 437 | _memcpy_fromio(void *dst, const volatile void __iomem *src, __kernel_size_t n) |
423 | { | 438 | { |
424 | char *d = dst; | 439 | char *d = dst; |
@@ -433,6 +448,22 @@ _memcpy_fromio(void *dst, const volatile void __iomem *src, __kernel_size_t n) | |||
433 | #define memcpy_fromio(d,s,sz) _memcpy_fromio(d,s,sz) | 448 | #define memcpy_fromio(d,s,sz) _memcpy_fromio(d,s,sz) |
434 | 449 | ||
435 | static inline void | 450 | static inline void |
451 | _sbus_memcpy_toio(volatile void __iomem *dst, const void *src, | ||
452 | __kernel_size_t n) | ||
453 | { | ||
454 | const char *s = src; | ||
455 | volatile void __iomem *d = dst; | ||
456 | |||
457 | while (n--) { | ||
458 | char tmp = *s++; | ||
459 | sbus_writeb(tmp, d); | ||
460 | d++; | ||
461 | } | ||
462 | } | ||
463 | |||
464 | #define sbus_memcpy_toio(d, s, sz) _sbus_memcpy_toio(d, s, sz) | ||
465 | |||
466 | static inline void | ||
436 | _memcpy_toio(volatile void __iomem *dst, const void *src, __kernel_size_t n) | 467 | _memcpy_toio(volatile void __iomem *dst, const void *src, __kernel_size_t n) |
437 | { | 468 | { |
438 | const char *s = src; | 469 | const char *s = src; |
diff --git a/arch/sparc/include/asm/jump_label.h b/arch/sparc/include/asm/jump_label.h index 62e66d7b2fb6..d95cf44fb40d 100644 --- a/arch/sparc/include/asm/jump_label.h +++ b/arch/sparc/include/asm/jump_label.h | |||
@@ -14,6 +14,7 @@ | |||
14 | "nop\n\t" \ | 14 | "nop\n\t" \ |
15 | "nop\n\t" \ | 15 | "nop\n\t" \ |
16 | ".pushsection __jump_table, \"a\"\n\t"\ | 16 | ".pushsection __jump_table, \"a\"\n\t"\ |
17 | ".align 4\n\t" \ | ||
17 | ".word 1b, %l[" #label "], %c0\n\t" \ | 18 | ".word 1b, %l[" #label "], %c0\n\t" \ |
18 | ".popsection \n\t" \ | 19 | ".popsection \n\t" \ |
19 | : : "i" (key) : : label);\ | 20 | : : "i" (key) : : label);\ |
diff --git a/arch/sparc/include/asm/openprom.h b/arch/sparc/include/asm/openprom.h index 963e1a45c35f..81cd43432dc0 100644 --- a/arch/sparc/include/asm/openprom.h +++ b/arch/sparc/include/asm/openprom.h | |||
@@ -11,6 +11,8 @@ | |||
11 | #define LINUX_OPPROM_MAGIC 0x10010407 | 11 | #define LINUX_OPPROM_MAGIC 0x10010407 |
12 | 12 | ||
13 | #ifndef __ASSEMBLY__ | 13 | #ifndef __ASSEMBLY__ |
14 | #include <linux/of.h> | ||
15 | |||
14 | /* V0 prom device operations. */ | 16 | /* V0 prom device operations. */ |
15 | struct linux_dev_v0_funcs { | 17 | struct linux_dev_v0_funcs { |
16 | int (*v0_devopen)(char *device_str); | 18 | int (*v0_devopen)(char *device_str); |
@@ -26,7 +28,7 @@ struct linux_dev_v0_funcs { | |||
26 | 28 | ||
27 | /* V2 and later prom device operations. */ | 29 | /* V2 and later prom device operations. */ |
28 | struct linux_dev_v2_funcs { | 30 | struct linux_dev_v2_funcs { |
29 | int (*v2_inst2pkg)(int d); /* Convert ihandle to phandle */ | 31 | phandle (*v2_inst2pkg)(int d); /* Convert ihandle to phandle */ |
30 | char * (*v2_dumb_mem_alloc)(char *va, unsigned sz); | 32 | char * (*v2_dumb_mem_alloc)(char *va, unsigned sz); |
31 | void (*v2_dumb_mem_free)(char *va, unsigned sz); | 33 | void (*v2_dumb_mem_free)(char *va, unsigned sz); |
32 | 34 | ||
@@ -168,12 +170,12 @@ struct linux_romvec { | |||
168 | 170 | ||
169 | /* Routines for traversing the prom device tree. */ | 171 | /* Routines for traversing the prom device tree. */ |
170 | struct linux_nodeops { | 172 | struct linux_nodeops { |
171 | int (*no_nextnode)(int node); | 173 | phandle (*no_nextnode)(phandle node); |
172 | int (*no_child)(int node); | 174 | phandle (*no_child)(phandle node); |
173 | int (*no_proplen)(int node, const char *name); | 175 | int (*no_proplen)(phandle node, const char *name); |
174 | int (*no_getprop)(int node, const char *name, char *val); | 176 | int (*no_getprop)(phandle node, const char *name, char *val); |
175 | int (*no_setprop)(int node, const char *name, char *val, int len); | 177 | int (*no_setprop)(phandle node, const char *name, char *val, int len); |
176 | char * (*no_nextprop)(int node, char *name); | 178 | char * (*no_nextprop)(phandle node, char *name); |
177 | }; | 179 | }; |
178 | 180 | ||
179 | /* More fun PROM structures for device probing. */ | 181 | /* More fun PROM structures for device probing. */ |
diff --git a/arch/sparc/include/asm/oplib_32.h b/arch/sparc/include/asm/oplib_32.h index 33e31ce6b31f..51296a6f5005 100644 --- a/arch/sparc/include/asm/oplib_32.h +++ b/arch/sparc/include/asm/oplib_32.h | |||
@@ -30,7 +30,7 @@ extern unsigned int prom_rev, prom_prev; | |||
30 | /* Root node of the prom device tree, this stays constant after | 30 | /* Root node of the prom device tree, this stays constant after |
31 | * initialization is complete. | 31 | * initialization is complete. |
32 | */ | 32 | */ |
33 | extern int prom_root_node; | 33 | extern phandle prom_root_node; |
34 | 34 | ||
35 | /* Pointer to prom structure containing the device tree traversal | 35 | /* Pointer to prom structure containing the device tree traversal |
36 | * and usage utility functions. Only prom-lib should use these, | 36 | * and usage utility functions. Only prom-lib should use these, |
@@ -178,68 +178,68 @@ extern void prom_putsegment(int context, unsigned long virt_addr, | |||
178 | /* PROM device tree traversal functions... */ | 178 | /* PROM device tree traversal functions... */ |
179 | 179 | ||
180 | /* Get the child node of the given node, or zero if no child exists. */ | 180 | /* Get the child node of the given node, or zero if no child exists. */ |
181 | extern int prom_getchild(int parent_node); | 181 | extern phandle prom_getchild(phandle parent_node); |
182 | 182 | ||
183 | /* Get the next sibling node of the given node, or zero if no further | 183 | /* Get the next sibling node of the given node, or zero if no further |
184 | * siblings exist. | 184 | * siblings exist. |
185 | */ | 185 | */ |
186 | extern int prom_getsibling(int node); | 186 | extern phandle prom_getsibling(phandle node); |
187 | 187 | ||
188 | /* Get the length, at the passed node, of the given property type. | 188 | /* Get the length, at the passed node, of the given property type. |
189 | * Returns -1 on error (ie. no such property at this node). | 189 | * Returns -1 on error (ie. no such property at this node). |
190 | */ | 190 | */ |
191 | extern int prom_getproplen(int thisnode, const char *property); | 191 | extern int prom_getproplen(phandle thisnode, const char *property); |
192 | 192 | ||
193 | /* Fetch the requested property using the given buffer. Returns | 193 | /* Fetch the requested property using the given buffer. Returns |
194 | * the number of bytes the prom put into your buffer or -1 on error. | 194 | * the number of bytes the prom put into your buffer or -1 on error. |
195 | */ | 195 | */ |
196 | extern int __must_check prom_getproperty(int thisnode, const char *property, | 196 | extern int __must_check prom_getproperty(phandle thisnode, const char *property, |
197 | char *prop_buffer, int propbuf_size); | 197 | char *prop_buffer, int propbuf_size); |
198 | 198 | ||
199 | /* Acquire an integer property. */ | 199 | /* Acquire an integer property. */ |
200 | extern int prom_getint(int node, char *property); | 200 | extern int prom_getint(phandle node, char *property); |
201 | 201 | ||
202 | /* Acquire an integer property, with a default value. */ | 202 | /* Acquire an integer property, with a default value. */ |
203 | extern int prom_getintdefault(int node, char *property, int defval); | 203 | extern int prom_getintdefault(phandle node, char *property, int defval); |
204 | 204 | ||
205 | /* Acquire a boolean property, 0=FALSE 1=TRUE. */ | 205 | /* Acquire a boolean property, 0=FALSE 1=TRUE. */ |
206 | extern int prom_getbool(int node, char *prop); | 206 | extern int prom_getbool(phandle node, char *prop); |
207 | 207 | ||
208 | /* Acquire a string property, null string on error. */ | 208 | /* Acquire a string property, null string on error. */ |
209 | extern void prom_getstring(int node, char *prop, char *buf, int bufsize); | 209 | extern void prom_getstring(phandle node, char *prop, char *buf, int bufsize); |
210 | 210 | ||
211 | /* Does the passed node have the given "name"? YES=1 NO=0 */ | 211 | /* Does the passed node have the given "name"? YES=1 NO=0 */ |
212 | extern int prom_nodematch(int thisnode, char *name); | 212 | extern int prom_nodematch(phandle thisnode, char *name); |
213 | 213 | ||
214 | /* Search all siblings starting at the passed node for "name" matching | 214 | /* Search all siblings starting at the passed node for "name" matching |
215 | * the given string. Returns the node on success, zero on failure. | 215 | * the given string. Returns the node on success, zero on failure. |
216 | */ | 216 | */ |
217 | extern int prom_searchsiblings(int node_start, char *name); | 217 | extern phandle prom_searchsiblings(phandle node_start, char *name); |
218 | 218 | ||
219 | /* Return the first property type, as a string, for the given node. | 219 | /* Return the first property type, as a string, for the given node. |
220 | * Returns a null string on error. | 220 | * Returns a null string on error. |
221 | */ | 221 | */ |
222 | extern char *prom_firstprop(int node, char *buffer); | 222 | extern char *prom_firstprop(phandle node, char *buffer); |
223 | 223 | ||
224 | /* Returns the next property after the passed property for the given | 224 | /* Returns the next property after the passed property for the given |
225 | * node. Returns null string on failure. | 225 | * node. Returns null string on failure. |
226 | */ | 226 | */ |
227 | extern char *prom_nextprop(int node, char *prev_property, char *buffer); | 227 | extern char *prom_nextprop(phandle node, char *prev_property, char *buffer); |
228 | 228 | ||
229 | /* Returns phandle of the path specified */ | 229 | /* Returns phandle of the path specified */ |
230 | extern int prom_finddevice(char *name); | 230 | extern phandle prom_finddevice(char *name); |
231 | 231 | ||
232 | /* Returns 1 if the specified node has given property. */ | 232 | /* Returns 1 if the specified node has given property. */ |
233 | extern int prom_node_has_property(int node, char *property); | 233 | extern int prom_node_has_property(phandle node, char *property); |
234 | 234 | ||
235 | /* Set the indicated property at the given node with the passed value. | 235 | /* Set the indicated property at the given node with the passed value. |
236 | * Returns the number of bytes of your value that the prom took. | 236 | * Returns the number of bytes of your value that the prom took. |
237 | */ | 237 | */ |
238 | extern int prom_setprop(int node, const char *prop_name, char *prop_value, | 238 | extern int prom_setprop(phandle node, const char *prop_name, char *prop_value, |
239 | int value_size); | 239 | int value_size); |
240 | 240 | ||
241 | extern int prom_pathtoinode(char *path); | 241 | extern phandle prom_pathtoinode(char *path); |
242 | extern int prom_inst2pkg(int); | 242 | extern phandle prom_inst2pkg(int); |
243 | 243 | ||
244 | /* Dorking with Bus ranges... */ | 244 | /* Dorking with Bus ranges... */ |
245 | 245 | ||
@@ -247,13 +247,13 @@ extern int prom_inst2pkg(int); | |||
247 | extern void prom_apply_obio_ranges(struct linux_prom_registers *obioregs, int nregs); | 247 | extern void prom_apply_obio_ranges(struct linux_prom_registers *obioregs, int nregs); |
248 | 248 | ||
249 | /* Apply ranges of any prom node (and optionally parent node as well) to registers. */ | 249 | /* Apply ranges of any prom node (and optionally parent node as well) to registers. */ |
250 | extern void prom_apply_generic_ranges(int node, int parent, | 250 | extern void prom_apply_generic_ranges(phandle node, phandle parent, |
251 | struct linux_prom_registers *sbusregs, int nregs); | 251 | struct linux_prom_registers *sbusregs, int nregs); |
252 | 252 | ||
253 | /* CPU probing helpers. */ | 253 | /* CPU probing helpers. */ |
254 | int cpu_find_by_instance(int instance, int *prom_node, int *mid); | 254 | int cpu_find_by_instance(int instance, phandle *prom_node, int *mid); |
255 | int cpu_find_by_mid(int mid, int *prom_node); | 255 | int cpu_find_by_mid(int mid, phandle *prom_node); |
256 | int cpu_get_hwmid(int prom_node); | 256 | int cpu_get_hwmid(phandle prom_node); |
257 | 257 | ||
258 | extern spinlock_t prom_lock; | 258 | extern spinlock_t prom_lock; |
259 | 259 | ||
diff --git a/arch/sparc/include/asm/oplib_64.h b/arch/sparc/include/asm/oplib_64.h index 3e0b2d62303d..c9cc078e3e31 100644 --- a/arch/sparc/include/asm/oplib_64.h +++ b/arch/sparc/include/asm/oplib_64.h | |||
@@ -16,7 +16,7 @@ extern char prom_version[]; | |||
16 | /* Root node of the prom device tree, this stays constant after | 16 | /* Root node of the prom device tree, this stays constant after |
17 | * initialization is complete. | 17 | * initialization is complete. |
18 | */ | 18 | */ |
19 | extern int prom_root_node; | 19 | extern phandle prom_root_node; |
20 | 20 | ||
21 | /* PROM stdin and stdout */ | 21 | /* PROM stdin and stdout */ |
22 | extern int prom_stdin, prom_stdout; | 22 | extern int prom_stdin, prom_stdout; |
@@ -24,7 +24,7 @@ extern int prom_stdin, prom_stdout; | |||
24 | /* /chosen node of the prom device tree, this stays constant after | 24 | /* /chosen node of the prom device tree, this stays constant after |
25 | * initialization is complete. | 25 | * initialization is complete. |
26 | */ | 26 | */ |
27 | extern int prom_chosen_node; | 27 | extern phandle prom_chosen_node; |
28 | 28 | ||
29 | /* Helper values and strings in arch/sparc64/kernel/head.S */ | 29 | /* Helper values and strings in arch/sparc64/kernel/head.S */ |
30 | extern const char prom_peer_name[]; | 30 | extern const char prom_peer_name[]; |
@@ -218,68 +218,69 @@ extern void prom_unmap(unsigned long size, unsigned long vaddr); | |||
218 | /* PROM device tree traversal functions... */ | 218 | /* PROM device tree traversal functions... */ |
219 | 219 | ||
220 | /* Get the child node of the given node, or zero if no child exists. */ | 220 | /* Get the child node of the given node, or zero if no child exists. */ |
221 | extern int prom_getchild(int parent_node); | 221 | extern phandle prom_getchild(phandle parent_node); |
222 | 222 | ||
223 | /* Get the next sibling node of the given node, or zero if no further | 223 | /* Get the next sibling node of the given node, or zero if no further |
224 | * siblings exist. | 224 | * siblings exist. |
225 | */ | 225 | */ |
226 | extern int prom_getsibling(int node); | 226 | extern phandle prom_getsibling(phandle node); |
227 | 227 | ||
228 | /* Get the length, at the passed node, of the given property type. | 228 | /* Get the length, at the passed node, of the given property type. |
229 | * Returns -1 on error (ie. no such property at this node). | 229 | * Returns -1 on error (ie. no such property at this node). |
230 | */ | 230 | */ |
231 | extern int prom_getproplen(int thisnode, const char *property); | 231 | extern int prom_getproplen(phandle thisnode, const char *property); |
232 | 232 | ||
233 | /* Fetch the requested property using the given buffer. Returns | 233 | /* Fetch the requested property using the given buffer. Returns |
234 | * the number of bytes the prom put into your buffer or -1 on error. | 234 | * the number of bytes the prom put into your buffer or -1 on error. |
235 | */ | 235 | */ |
236 | extern int prom_getproperty(int thisnode, const char *property, | 236 | extern int prom_getproperty(phandle thisnode, const char *property, |
237 | char *prop_buffer, int propbuf_size); | 237 | char *prop_buffer, int propbuf_size); |
238 | 238 | ||
239 | /* Acquire an integer property. */ | 239 | /* Acquire an integer property. */ |
240 | extern int prom_getint(int node, const char *property); | 240 | extern int prom_getint(phandle node, const char *property); |
241 | 241 | ||
242 | /* Acquire an integer property, with a default value. */ | 242 | /* Acquire an integer property, with a default value. */ |
243 | extern int prom_getintdefault(int node, const char *property, int defval); | 243 | extern int prom_getintdefault(phandle node, const char *property, int defval); |
244 | 244 | ||
245 | /* Acquire a boolean property, 0=FALSE 1=TRUE. */ | 245 | /* Acquire a boolean property, 0=FALSE 1=TRUE. */ |
246 | extern int prom_getbool(int node, const char *prop); | 246 | extern int prom_getbool(phandle node, const char *prop); |
247 | 247 | ||
248 | /* Acquire a string property, null string on error. */ | 248 | /* Acquire a string property, null string on error. */ |
249 | extern void prom_getstring(int node, const char *prop, char *buf, int bufsize); | 249 | extern void prom_getstring(phandle node, const char *prop, char *buf, |
250 | int bufsize); | ||
250 | 251 | ||
251 | /* Does the passed node have the given "name"? YES=1 NO=0 */ | 252 | /* Does the passed node have the given "name"? YES=1 NO=0 */ |
252 | extern int prom_nodematch(int thisnode, const char *name); | 253 | extern int prom_nodematch(phandle thisnode, const char *name); |
253 | 254 | ||
254 | /* Search all siblings starting at the passed node for "name" matching | 255 | /* Search all siblings starting at the passed node for "name" matching |
255 | * the given string. Returns the node on success, zero on failure. | 256 | * the given string. Returns the node on success, zero on failure. |
256 | */ | 257 | */ |
257 | extern int prom_searchsiblings(int node_start, const char *name); | 258 | extern phandle prom_searchsiblings(phandle node_start, const char *name); |
258 | 259 | ||
259 | /* Return the first property type, as a string, for the given node. | 260 | /* Return the first property type, as a string, for the given node. |
260 | * Returns a null string on error. Buffer should be at least 32B long. | 261 | * Returns a null string on error. Buffer should be at least 32B long. |
261 | */ | 262 | */ |
262 | extern char *prom_firstprop(int node, char *buffer); | 263 | extern char *prom_firstprop(phandle node, char *buffer); |
263 | 264 | ||
264 | /* Returns the next property after the passed property for the given | 265 | /* Returns the next property after the passed property for the given |
265 | * node. Returns null string on failure. Buffer should be at least 32B long. | 266 | * node. Returns null string on failure. Buffer should be at least 32B long. |
266 | */ | 267 | */ |
267 | extern char *prom_nextprop(int node, const char *prev_property, char *buffer); | 268 | extern char *prom_nextprop(phandle node, const char *prev_property, char *buf); |
268 | 269 | ||
269 | /* Returns 1 if the specified node has given property. */ | 270 | /* Returns 1 if the specified node has given property. */ |
270 | extern int prom_node_has_property(int node, const char *property); | 271 | extern int prom_node_has_property(phandle node, const char *property); |
271 | 272 | ||
272 | /* Returns phandle of the path specified */ | 273 | /* Returns phandle of the path specified */ |
273 | extern int prom_finddevice(const char *name); | 274 | extern phandle prom_finddevice(const char *name); |
274 | 275 | ||
275 | /* Set the indicated property at the given node with the passed value. | 276 | /* Set the indicated property at the given node with the passed value. |
276 | * Returns the number of bytes of your value that the prom took. | 277 | * Returns the number of bytes of your value that the prom took. |
277 | */ | 278 | */ |
278 | extern int prom_setprop(int node, const char *prop_name, char *prop_value, | 279 | extern int prom_setprop(phandle node, const char *prop_name, char *prop_value, |
279 | int value_size); | 280 | int value_size); |
280 | 281 | ||
281 | extern int prom_pathtoinode(const char *path); | 282 | extern phandle prom_pathtoinode(const char *path); |
282 | extern int prom_inst2pkg(int); | 283 | extern phandle prom_inst2pkg(int); |
283 | extern int prom_service_exists(const char *service_name); | 284 | extern int prom_service_exists(const char *service_name); |
284 | extern void prom_sun4v_guest_soft_state(void); | 285 | extern void prom_sun4v_guest_soft_state(void); |
285 | 286 | ||
diff --git a/arch/sparc/include/asm/pci_64.h b/arch/sparc/include/asm/pci_64.h index 5312782f0b5e..948b686ec089 100644 --- a/arch/sparc/include/asm/pci_64.h +++ b/arch/sparc/include/asm/pci_64.h | |||
@@ -38,7 +38,7 @@ static inline void pcibios_penalize_isa_irq(int irq, int active) | |||
38 | * types on sparc64. However, it requires that the device | 38 | * types on sparc64. However, it requires that the device |
39 | * can drive enough of the 64 bits. | 39 | * can drive enough of the 64 bits. |
40 | */ | 40 | */ |
41 | #define PCI64_REQUIRED_MASK (~(dma64_addr_t)0) | 41 | #define PCI64_REQUIRED_MASK (~(u64)0) |
42 | #define PCI64_ADDR_BASE 0xfffc000000000000UL | 42 | #define PCI64_ADDR_BASE 0xfffc000000000000UL |
43 | 43 | ||
44 | #ifdef CONFIG_PCI | 44 | #ifdef CONFIG_PCI |
diff --git a/arch/sparc/include/asm/pgtable_32.h b/arch/sparc/include/asm/pgtable_32.h index 0ece77f47753..303bd4dc8292 100644 --- a/arch/sparc/include/asm/pgtable_32.h +++ b/arch/sparc/include/asm/pgtable_32.h | |||
@@ -304,10 +304,7 @@ BTFIXUPDEF_CALL(pte_t *, pte_offset_kernel, pmd_t *, unsigned long) | |||
304 | * and sun4c is guaranteed to have no highmem anyway. | 304 | * and sun4c is guaranteed to have no highmem anyway. |
305 | */ | 305 | */ |
306 | #define pte_offset_map(d, a) pte_offset_kernel(d,a) | 306 | #define pte_offset_map(d, a) pte_offset_kernel(d,a) |
307 | #define pte_offset_map_nested(d, a) pte_offset_kernel(d,a) | ||
308 | |||
309 | #define pte_unmap(pte) do{}while(0) | 307 | #define pte_unmap(pte) do{}while(0) |
310 | #define pte_unmap_nested(pte) do{}while(0) | ||
311 | 308 | ||
312 | /* Certain architectures need to do special things when pte's | 309 | /* Certain architectures need to do special things when pte's |
313 | * within a page table are directly modified. Thus, the following | 310 | * within a page table are directly modified. Thus, the following |
diff --git a/arch/sparc/include/asm/pgtable_64.h b/arch/sparc/include/asm/pgtable_64.h index f5b5fa76c02d..f8dddb7045bb 100644 --- a/arch/sparc/include/asm/pgtable_64.h +++ b/arch/sparc/include/asm/pgtable_64.h | |||
@@ -652,9 +652,7 @@ static inline int pte_special(pte_t pte) | |||
652 | ((address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))) | 652 | ((address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))) |
653 | #define pte_offset_kernel pte_index | 653 | #define pte_offset_kernel pte_index |
654 | #define pte_offset_map pte_index | 654 | #define pte_offset_map pte_index |
655 | #define pte_offset_map_nested pte_index | ||
656 | #define pte_unmap(pte) do { } while (0) | 655 | #define pte_unmap(pte) do { } while (0) |
657 | #define pte_unmap_nested(pte) do { } while (0) | ||
658 | 656 | ||
659 | /* Actual page table PTE updates. */ | 657 | /* Actual page table PTE updates. */ |
660 | extern void tlb_batch_add(struct mm_struct *mm, unsigned long vaddr, pte_t *ptep, pte_t orig); | 658 | extern void tlb_batch_add(struct mm_struct *mm, unsigned long vaddr, pte_t *ptep, pte_t orig); |
diff --git a/arch/sparc/include/asm/prom.h b/arch/sparc/include/asm/prom.h index 291f12575edd..56bbaadef646 100644 --- a/arch/sparc/include/asm/prom.h +++ b/arch/sparc/include/asm/prom.h | |||
@@ -18,6 +18,7 @@ | |||
18 | * 2 of the License, or (at your option) any later version. | 18 | * 2 of the License, or (at your option) any later version. |
19 | */ | 19 | */ |
20 | #include <linux/types.h> | 20 | #include <linux/types.h> |
21 | #include <linux/of_pdt.h> | ||
21 | #include <linux/proc_fs.h> | 22 | #include <linux/proc_fs.h> |
22 | #include <linux/mutex.h> | 23 | #include <linux/mutex.h> |
23 | #include <asm/atomic.h> | 24 | #include <asm/atomic.h> |
@@ -67,8 +68,8 @@ extern struct device_node *of_console_device; | |||
67 | extern char *of_console_path; | 68 | extern char *of_console_path; |
68 | extern char *of_console_options; | 69 | extern char *of_console_options; |
69 | 70 | ||
70 | extern void (*prom_build_more)(struct device_node *dp, struct device_node ***nextp); | 71 | extern void irq_trans_init(struct device_node *dp); |
71 | extern char *build_full_name(struct device_node *dp); | 72 | extern char *build_path_component(struct device_node *dp); |
72 | 73 | ||
73 | #endif /* __KERNEL__ */ | 74 | #endif /* __KERNEL__ */ |
74 | #endif /* _SPARC_PROM_H */ | 75 | #endif /* _SPARC_PROM_H */ |