diff options
author | Jiri Kosina <jkosina@suse.cz> | 2010-10-30 16:16:56 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2010-10-30 16:16:56 -0400 |
commit | f1e095f1d206b81b44160f41278ce5c78641e9b7 (patch) | |
tree | bd293d46d2d3e4cdf435a22ddb2877c6ba1b8acc /arch/sparc | |
parent | b0438a1b71955c425c304a2a483765ef24841766 (diff) | |
parent | 1792f17b7210280a3d7ff29da9614ba779cfcedb (diff) |
Merge branch 'master' into for-next
Diffstat (limited to 'arch/sparc')
42 files changed, 333 insertions, 446 deletions
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig index 3e9d31401fb2..45d9c87d083a 100644 --- a/arch/sparc/Kconfig +++ b/arch/sparc/Kconfig | |||
@@ -1,9 +1,3 @@ | |||
1 | # For a description of the syntax of this configuration file, | ||
2 | # see Documentation/kbuild/kconfig-language.txt. | ||
3 | # | ||
4 | |||
5 | mainmenu "Linux/SPARC Kernel Configuration" | ||
6 | |||
7 | config 64BIT | 1 | config 64BIT |
8 | bool "64-bit kernel" if ARCH = "sparc" | 2 | bool "64-bit kernel" if ARCH = "sparc" |
9 | default ARCH = "sparc64" | 3 | default ARCH = "sparc64" |
@@ -19,6 +13,7 @@ config SPARC | |||
19 | bool | 13 | bool |
20 | default y | 14 | default y |
21 | select OF | 15 | select OF |
16 | select OF_PROMTREE | ||
22 | select HAVE_IDE | 17 | select HAVE_IDE |
23 | select HAVE_OPROFILE | 18 | select HAVE_OPROFILE |
24 | select HAVE_ARCH_KGDB if !SMP || SPARC64 | 19 | select HAVE_ARCH_KGDB if !SMP || SPARC64 |
@@ -27,8 +22,6 @@ config SPARC | |||
27 | select RTC_CLASS | 22 | select RTC_CLASS |
28 | select RTC_DRV_M48T59 | 23 | select RTC_DRV_M48T59 |
29 | select HAVE_IRQ_WORK | 24 | select HAVE_IRQ_WORK |
30 | select HAVE_PERF_EVENTS | ||
31 | select PERF_USE_VMALLOC | ||
32 | select HAVE_DMA_ATTRS | 25 | select HAVE_DMA_ATTRS |
33 | select HAVE_DMA_API_DEBUG | 26 | select HAVE_DMA_API_DEBUG |
34 | select HAVE_ARCH_JUMP_LABEL | 27 | select HAVE_ARCH_JUMP_LABEL |
@@ -55,7 +48,6 @@ config SPARC64 | |||
55 | select RTC_DRV_BQ4802 | 48 | select RTC_DRV_BQ4802 |
56 | select RTC_DRV_SUN4V | 49 | select RTC_DRV_SUN4V |
57 | select RTC_DRV_STARFIRE | 50 | select RTC_DRV_STARFIRE |
58 | select HAVE_IRQ_WORK | ||
59 | select HAVE_PERF_EVENTS | 51 | select HAVE_PERF_EVENTS |
60 | select PERF_USE_VMALLOC | 52 | select PERF_USE_VMALLOC |
61 | 53 | ||
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..427d4684e0d2 100644 --- a/arch/sparc/include/asm/jump_label.h +++ b/arch/sparc/include/asm/jump_label.h | |||
@@ -4,7 +4,6 @@ | |||
4 | #ifdef __KERNEL__ | 4 | #ifdef __KERNEL__ |
5 | 5 | ||
6 | #include <linux/types.h> | 6 | #include <linux/types.h> |
7 | #include <asm/system.h> | ||
8 | 7 | ||
9 | #define JUMP_LABEL_NOP_SIZE 4 | 8 | #define JUMP_LABEL_NOP_SIZE 4 |
10 | 9 | ||
@@ -14,6 +13,7 @@ | |||
14 | "nop\n\t" \ | 13 | "nop\n\t" \ |
15 | "nop\n\t" \ | 14 | "nop\n\t" \ |
16 | ".pushsection __jump_table, \"a\"\n\t"\ | 15 | ".pushsection __jump_table, \"a\"\n\t"\ |
16 | ".align 4\n\t" \ | ||
17 | ".word 1b, %l[" #label "], %c0\n\t" \ | 17 | ".word 1b, %l[" #label "], %c0\n\t" \ |
18 | ".popsection \n\t" \ | 18 | ".popsection \n\t" \ |
19 | : : "i" (key) : : label);\ | 19 | : : "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 */ |
diff --git a/arch/sparc/kernel/auxio_32.c b/arch/sparc/kernel/auxio_32.c index ee8d214cae1e..35f48837871a 100644 --- a/arch/sparc/kernel/auxio_32.c +++ b/arch/sparc/kernel/auxio_32.c | |||
@@ -23,7 +23,7 @@ static DEFINE_SPINLOCK(auxio_lock); | |||
23 | 23 | ||
24 | void __init auxio_probe(void) | 24 | void __init auxio_probe(void) |
25 | { | 25 | { |
26 | int node, auxio_nd; | 26 | phandle node, auxio_nd; |
27 | struct linux_prom_registers auxregs[1]; | 27 | struct linux_prom_registers auxregs[1]; |
28 | struct resource r; | 28 | struct resource r; |
29 | 29 | ||
@@ -113,7 +113,7 @@ volatile unsigned char * auxio_power_register = NULL; | |||
113 | void __init auxio_power_probe(void) | 113 | void __init auxio_power_probe(void) |
114 | { | 114 | { |
115 | struct linux_prom_registers regs; | 115 | struct linux_prom_registers regs; |
116 | int node; | 116 | phandle node; |
117 | struct resource r; | 117 | struct resource r; |
118 | 118 | ||
119 | /* Attempt to find the sun4m power control node. */ | 119 | /* Attempt to find the sun4m power control node. */ |
diff --git a/arch/sparc/kernel/btext.c b/arch/sparc/kernel/btext.c index 8cc2d56ffe9a..89aa4eb20cf5 100644 --- a/arch/sparc/kernel/btext.c +++ b/arch/sparc/kernel/btext.c | |||
@@ -40,7 +40,7 @@ static unsigned char *dispDeviceBase __force_data; | |||
40 | 40 | ||
41 | static unsigned char vga_font[cmapsz]; | 41 | static unsigned char vga_font[cmapsz]; |
42 | 42 | ||
43 | static int __init btext_initialize(unsigned int node) | 43 | static int __init btext_initialize(phandle node) |
44 | { | 44 | { |
45 | unsigned int width, height, depth, pitch; | 45 | unsigned int width, height, depth, pitch; |
46 | unsigned long address = 0; | 46 | unsigned long address = 0; |
@@ -309,7 +309,7 @@ static struct console btext_console = { | |||
309 | 309 | ||
310 | int __init btext_find_display(void) | 310 | int __init btext_find_display(void) |
311 | { | 311 | { |
312 | unsigned int node; | 312 | phandle node; |
313 | char type[32]; | 313 | char type[32]; |
314 | int ret; | 314 | int ret; |
315 | 315 | ||
diff --git a/arch/sparc/kernel/devices.c b/arch/sparc/kernel/devices.c index 62dc7a021413..d2eddd6647cd 100644 --- a/arch/sparc/kernel/devices.c +++ b/arch/sparc/kernel/devices.c | |||
@@ -31,9 +31,9 @@ static char *cpu_mid_prop(void) | |||
31 | return "mid"; | 31 | return "mid"; |
32 | } | 32 | } |
33 | 33 | ||
34 | static int check_cpu_node(int nd, int *cur_inst, | 34 | static int check_cpu_node(phandle nd, int *cur_inst, |
35 | int (*compare)(int, int, void *), void *compare_arg, | 35 | int (*compare)(phandle, int, void *), void *compare_arg, |
36 | int *prom_node, int *mid) | 36 | phandle *prom_node, int *mid) |
37 | { | 37 | { |
38 | if (!compare(nd, *cur_inst, compare_arg)) { | 38 | if (!compare(nd, *cur_inst, compare_arg)) { |
39 | if (prom_node) | 39 | if (prom_node) |
@@ -51,8 +51,8 @@ static int check_cpu_node(int nd, int *cur_inst, | |||
51 | return -ENODEV; | 51 | return -ENODEV; |
52 | } | 52 | } |
53 | 53 | ||
54 | static int __cpu_find_by(int (*compare)(int, int, void *), void *compare_arg, | 54 | static int __cpu_find_by(int (*compare)(phandle, int, void *), |
55 | int *prom_node, int *mid) | 55 | void *compare_arg, phandle *prom_node, int *mid) |
56 | { | 56 | { |
57 | struct device_node *dp; | 57 | struct device_node *dp; |
58 | int cur_inst; | 58 | int cur_inst; |
@@ -71,7 +71,7 @@ static int __cpu_find_by(int (*compare)(int, int, void *), void *compare_arg, | |||
71 | return -ENODEV; | 71 | return -ENODEV; |
72 | } | 72 | } |
73 | 73 | ||
74 | static int cpu_instance_compare(int nd, int instance, void *_arg) | 74 | static int cpu_instance_compare(phandle nd, int instance, void *_arg) |
75 | { | 75 | { |
76 | int desired_instance = (int) _arg; | 76 | int desired_instance = (int) _arg; |
77 | 77 | ||
@@ -80,13 +80,13 @@ static int cpu_instance_compare(int nd, int instance, void *_arg) | |||
80 | return -ENODEV; | 80 | return -ENODEV; |
81 | } | 81 | } |
82 | 82 | ||
83 | int cpu_find_by_instance(int instance, int *prom_node, int *mid) | 83 | int cpu_find_by_instance(int instance, phandle *prom_node, int *mid) |
84 | { | 84 | { |
85 | return __cpu_find_by(cpu_instance_compare, (void *)instance, | 85 | return __cpu_find_by(cpu_instance_compare, (void *)instance, |
86 | prom_node, mid); | 86 | prom_node, mid); |
87 | } | 87 | } |
88 | 88 | ||
89 | static int cpu_mid_compare(int nd, int instance, void *_arg) | 89 | static int cpu_mid_compare(phandle nd, int instance, void *_arg) |
90 | { | 90 | { |
91 | int desired_mid = (int) _arg; | 91 | int desired_mid = (int) _arg; |
92 | int this_mid; | 92 | int this_mid; |
@@ -98,7 +98,7 @@ static int cpu_mid_compare(int nd, int instance, void *_arg) | |||
98 | return -ENODEV; | 98 | return -ENODEV; |
99 | } | 99 | } |
100 | 100 | ||
101 | int cpu_find_by_mid(int mid, int *prom_node) | 101 | int cpu_find_by_mid(int mid, phandle *prom_node) |
102 | { | 102 | { |
103 | return __cpu_find_by(cpu_mid_compare, (void *)mid, | 103 | return __cpu_find_by(cpu_mid_compare, (void *)mid, |
104 | prom_node, NULL); | 104 | prom_node, NULL); |
@@ -108,7 +108,7 @@ int cpu_find_by_mid(int mid, int *prom_node) | |||
108 | * address (0-3). This gives us the true hardware mid, which might have | 108 | * address (0-3). This gives us the true hardware mid, which might have |
109 | * some other bits set. On 4d hardware and software mids are the same. | 109 | * some other bits set. On 4d hardware and software mids are the same. |
110 | */ | 110 | */ |
111 | int cpu_get_hwmid(int prom_node) | 111 | int cpu_get_hwmid(phandle prom_node) |
112 | { | 112 | { |
113 | return prom_getintdefault(prom_node, cpu_mid_prop(), -ENODEV); | 113 | return prom_getintdefault(prom_node, cpu_mid_prop(), -ENODEV); |
114 | } | 114 | } |
@@ -119,7 +119,8 @@ void __init device_scan(void) | |||
119 | 119 | ||
120 | #ifndef CONFIG_SMP | 120 | #ifndef CONFIG_SMP |
121 | { | 121 | { |
122 | int err, cpu_node; | 122 | phandle cpu_node; |
123 | int err; | ||
123 | err = cpu_find_by_instance(0, &cpu_node, NULL); | 124 | err = cpu_find_by_instance(0, &cpu_node, NULL); |
124 | if (err) { | 125 | if (err) { |
125 | /* Probably a sun4e, Sun is trying to trick us ;-) */ | 126 | /* Probably a sun4e, Sun is trying to trick us ;-) */ |
diff --git a/arch/sparc/kernel/irq_32.c b/arch/sparc/kernel/irq_32.c index 0116d8d10def..5ad6e5c5dbb3 100644 --- a/arch/sparc/kernel/irq_32.c +++ b/arch/sparc/kernel/irq_32.c | |||
@@ -365,7 +365,7 @@ static int request_fast_irq(unsigned int irq, | |||
365 | unsigned long flags; | 365 | unsigned long flags; |
366 | unsigned int cpu_irq; | 366 | unsigned int cpu_irq; |
367 | int ret; | 367 | int ret; |
368 | #ifdef CONFIG_SMP | 368 | #if defined CONFIG_SMP && !defined CONFIG_SPARC_LEON |
369 | struct tt_entry *trap_table; | 369 | struct tt_entry *trap_table; |
370 | extern struct tt_entry trapbase_cpu1, trapbase_cpu2, trapbase_cpu3; | 370 | extern struct tt_entry trapbase_cpu1, trapbase_cpu2, trapbase_cpu3; |
371 | #endif | 371 | #endif |
@@ -425,7 +425,7 @@ static int request_fast_irq(unsigned int irq, | |||
425 | table[SP_TRAP_IRQ1+(cpu_irq-1)].inst_four = SPARC_NOP; | 425 | table[SP_TRAP_IRQ1+(cpu_irq-1)].inst_four = SPARC_NOP; |
426 | 426 | ||
427 | INSTANTIATE(sparc_ttable) | 427 | INSTANTIATE(sparc_ttable) |
428 | #ifdef CONFIG_SMP | 428 | #if defined CONFIG_SMP && !defined CONFIG_SPARC_LEON |
429 | trap_table = &trapbase_cpu1; INSTANTIATE(trap_table) | 429 | trap_table = &trapbase_cpu1; INSTANTIATE(trap_table) |
430 | trap_table = &trapbase_cpu2; INSTANTIATE(trap_table) | 430 | trap_table = &trapbase_cpu2; INSTANTIATE(trap_table) |
431 | trap_table = &trapbase_cpu3; INSTANTIATE(trap_table) | 431 | trap_table = &trapbase_cpu3; INSTANTIATE(trap_table) |
diff --git a/arch/sparc/kernel/leon_kernel.c b/arch/sparc/kernel/leon_kernel.c index 6a7b4dbc8e09..2d51527d810f 100644 --- a/arch/sparc/kernel/leon_kernel.c +++ b/arch/sparc/kernel/leon_kernel.c | |||
@@ -282,5 +282,5 @@ void __init leon_init_IRQ(void) | |||
282 | 282 | ||
283 | void __init leon_init(void) | 283 | void __init leon_init(void) |
284 | { | 284 | { |
285 | prom_build_more = &leon_node_init; | 285 | of_pdt_build_more = &leon_node_init; |
286 | } | 286 | } |
diff --git a/arch/sparc/kernel/leon_smp.c b/arch/sparc/kernel/leon_smp.c index e1656fc41ccb..7524689b03d2 100644 --- a/arch/sparc/kernel/leon_smp.c +++ b/arch/sparc/kernel/leon_smp.c | |||
@@ -56,8 +56,8 @@ void __init leon_configure_cache_smp(void); | |||
56 | static inline unsigned long do_swap(volatile unsigned long *ptr, | 56 | static inline unsigned long do_swap(volatile unsigned long *ptr, |
57 | unsigned long val) | 57 | unsigned long val) |
58 | { | 58 | { |
59 | __asm__ __volatile__("swapa [%1] %2, %0\n\t" : "=&r"(val) | 59 | __asm__ __volatile__("swapa [%2] %3, %0\n\t" : "=&r"(val) |
60 | : "r"(ptr), "i"(ASI_LEON_DCACHE_MISS) | 60 | : "0"(val), "r"(ptr), "i"(ASI_LEON_DCACHE_MISS) |
61 | : "memory"); | 61 | : "memory"); |
62 | return val; | 62 | return val; |
63 | } | 63 | } |
diff --git a/arch/sparc/kernel/pcic.c b/arch/sparc/kernel/pcic.c index d36a8d391ca0..aeaa09a3c655 100644 --- a/arch/sparc/kernel/pcic.c +++ b/arch/sparc/kernel/pcic.c | |||
@@ -284,7 +284,7 @@ int __init pcic_probe(void) | |||
284 | struct linux_prom_registers regs[PROMREG_MAX]; | 284 | struct linux_prom_registers regs[PROMREG_MAX]; |
285 | struct linux_pbm_info* pbm; | 285 | struct linux_pbm_info* pbm; |
286 | char namebuf[64]; | 286 | char namebuf[64]; |
287 | int node; | 287 | phandle node; |
288 | int err; | 288 | int err; |
289 | 289 | ||
290 | if (pcic0_up) { | 290 | if (pcic0_up) { |
@@ -440,7 +440,7 @@ static int __devinit pdev_to_pnode(struct linux_pbm_info *pbm, | |||
440 | { | 440 | { |
441 | struct linux_prom_pci_registers regs[PROMREG_MAX]; | 441 | struct linux_prom_pci_registers regs[PROMREG_MAX]; |
442 | int err; | 442 | int err; |
443 | int node = prom_getchild(pbm->prom_node); | 443 | phandle node = prom_getchild(pbm->prom_node); |
444 | 444 | ||
445 | while(node) { | 445 | while(node) { |
446 | err = prom_getproperty(node, "reg", | 446 | err = prom_getproperty(node, "reg", |
diff --git a/arch/sparc/kernel/prom.h b/arch/sparc/kernel/prom.h index eeb04a782ec8..cf5fe1c0b024 100644 --- a/arch/sparc/kernel/prom.h +++ b/arch/sparc/kernel/prom.h | |||
@@ -4,12 +4,6 @@ | |||
4 | #include <linux/spinlock.h> | 4 | #include <linux/spinlock.h> |
5 | #include <asm/prom.h> | 5 | #include <asm/prom.h> |
6 | 6 | ||
7 | extern void * prom_early_alloc(unsigned long size); | ||
8 | extern void irq_trans_init(struct device_node *dp); | ||
9 | |||
10 | extern unsigned int prom_unique_id; | ||
11 | |||
12 | extern char *build_path_component(struct device_node *dp); | ||
13 | extern void of_console_init(void); | 7 | extern void of_console_init(void); |
14 | 8 | ||
15 | extern unsigned int prom_early_allocated; | 9 | extern unsigned int prom_early_allocated; |
diff --git a/arch/sparc/kernel/prom_common.c b/arch/sparc/kernel/prom_common.c index 1f830da2ddf2..ed25834328f4 100644 --- a/arch/sparc/kernel/prom_common.c +++ b/arch/sparc/kernel/prom_common.c | |||
@@ -20,14 +20,13 @@ | |||
20 | #include <linux/mutex.h> | 20 | #include <linux/mutex.h> |
21 | #include <linux/slab.h> | 21 | #include <linux/slab.h> |
22 | #include <linux/of.h> | 22 | #include <linux/of.h> |
23 | #include <linux/of_pdt.h> | ||
23 | #include <asm/prom.h> | 24 | #include <asm/prom.h> |
24 | #include <asm/oplib.h> | 25 | #include <asm/oplib.h> |
25 | #include <asm/leon.h> | 26 | #include <asm/leon.h> |
26 | 27 | ||
27 | #include "prom.h" | 28 | #include "prom.h" |
28 | 29 | ||
29 | void (*prom_build_more)(struct device_node *dp, struct device_node ***nextp); | ||
30 | |||
31 | struct device_node *of_console_device; | 30 | struct device_node *of_console_device; |
32 | EXPORT_SYMBOL(of_console_device); | 31 | EXPORT_SYMBOL(of_console_device); |
33 | 32 | ||
@@ -119,192 +118,47 @@ int of_find_in_proplist(const char *list, const char *match, int len) | |||
119 | } | 118 | } |
120 | EXPORT_SYMBOL(of_find_in_proplist); | 119 | EXPORT_SYMBOL(of_find_in_proplist); |
121 | 120 | ||
122 | unsigned int prom_unique_id; | 121 | /* |
123 | 122 | * SPARC32 and SPARC64's prom_nextprop() do things differently | |
124 | static struct property * __init build_one_prop(phandle node, char *prev, | 123 | * here, despite sharing the same interface. SPARC32 doesn't fill in 'buf', |
125 | char *special_name, | 124 | * returning NULL on an error. SPARC64 fills in 'buf', but sets it to an |
126 | void *special_val, | 125 | * empty string upon error. |
127 | int special_len) | 126 | */ |
127 | static int __init handle_nextprop_quirks(char *buf, const char *name) | ||
128 | { | 128 | { |
129 | static struct property *tmp = NULL; | 129 | if (!name || strlen(name) == 0) |
130 | struct property *p; | 130 | return -1; |
131 | const char *name; | ||
132 | |||
133 | if (tmp) { | ||
134 | p = tmp; | ||
135 | memset(p, 0, sizeof(*p) + 32); | ||
136 | tmp = NULL; | ||
137 | } else { | ||
138 | p = prom_early_alloc(sizeof(struct property) + 32); | ||
139 | p->unique_id = prom_unique_id++; | ||
140 | } | ||
141 | |||
142 | p->name = (char *) (p + 1); | ||
143 | if (special_name) { | ||
144 | strcpy(p->name, special_name); | ||
145 | p->length = special_len; | ||
146 | p->value = prom_early_alloc(special_len); | ||
147 | memcpy(p->value, special_val, special_len); | ||
148 | } else { | ||
149 | if (prev == NULL) { | ||
150 | name = prom_firstprop(node, p->name); | ||
151 | } else { | ||
152 | name = prom_nextprop(node, prev, p->name); | ||
153 | } | ||
154 | 131 | ||
155 | if (!name || strlen(name) == 0) { | ||
156 | tmp = p; | ||
157 | return NULL; | ||
158 | } | ||
159 | #ifdef CONFIG_SPARC32 | 132 | #ifdef CONFIG_SPARC32 |
160 | strcpy(p->name, name); | 133 | strcpy(buf, name); |
161 | #endif | 134 | #endif |
162 | p->length = prom_getproplen(node, p->name); | 135 | return 0; |
163 | if (p->length <= 0) { | ||
164 | p->length = 0; | ||
165 | } else { | ||
166 | int len; | ||
167 | |||
168 | p->value = prom_early_alloc(p->length + 1); | ||
169 | len = prom_getproperty(node, p->name, p->value, | ||
170 | p->length); | ||
171 | if (len <= 0) | ||
172 | p->length = 0; | ||
173 | ((unsigned char *)p->value)[p->length] = '\0'; | ||
174 | } | ||
175 | } | ||
176 | return p; | ||
177 | } | ||
178 | |||
179 | static struct property * __init build_prop_list(phandle node) | ||
180 | { | ||
181 | struct property *head, *tail; | ||
182 | |||
183 | head = tail = build_one_prop(node, NULL, | ||
184 | ".node", &node, sizeof(node)); | ||
185 | |||
186 | tail->next = build_one_prop(node, NULL, NULL, NULL, 0); | ||
187 | tail = tail->next; | ||
188 | while(tail) { | ||
189 | tail->next = build_one_prop(node, tail->name, | ||
190 | NULL, NULL, 0); | ||
191 | tail = tail->next; | ||
192 | } | ||
193 | |||
194 | return head; | ||
195 | } | ||
196 | |||
197 | static char * __init get_one_property(phandle node, const char *name) | ||
198 | { | ||
199 | char *buf = "<NULL>"; | ||
200 | int len; | ||
201 | |||
202 | len = prom_getproplen(node, name); | ||
203 | if (len > 0) { | ||
204 | buf = prom_early_alloc(len); | ||
205 | len = prom_getproperty(node, name, buf, len); | ||
206 | } | ||
207 | |||
208 | return buf; | ||
209 | } | ||
210 | |||
211 | static struct device_node * __init prom_create_node(phandle node, | ||
212 | struct device_node *parent) | ||
213 | { | ||
214 | struct device_node *dp; | ||
215 | |||
216 | if (!node) | ||
217 | return NULL; | ||
218 | |||
219 | dp = prom_early_alloc(sizeof(*dp)); | ||
220 | dp->unique_id = prom_unique_id++; | ||
221 | dp->parent = parent; | ||
222 | |||
223 | kref_init(&dp->kref); | ||
224 | |||
225 | dp->name = get_one_property(node, "name"); | ||
226 | dp->type = get_one_property(node, "device_type"); | ||
227 | dp->phandle = node; | ||
228 | |||
229 | dp->properties = build_prop_list(node); | ||
230 | |||
231 | irq_trans_init(dp); | ||
232 | |||
233 | return dp; | ||
234 | } | ||
235 | |||
236 | char * __init build_full_name(struct device_node *dp) | ||
237 | { | ||
238 | int len, ourlen, plen; | ||
239 | char *n; | ||
240 | |||
241 | plen = strlen(dp->parent->full_name); | ||
242 | ourlen = strlen(dp->path_component_name); | ||
243 | len = ourlen + plen + 2; | ||
244 | |||
245 | n = prom_early_alloc(len); | ||
246 | strcpy(n, dp->parent->full_name); | ||
247 | if (!of_node_is_root(dp->parent)) { | ||
248 | strcpy(n + plen, "/"); | ||
249 | plen++; | ||
250 | } | ||
251 | strcpy(n + plen, dp->path_component_name); | ||
252 | |||
253 | return n; | ||
254 | } | 136 | } |
255 | 137 | ||
256 | static struct device_node * __init prom_build_tree(struct device_node *parent, | 138 | static int __init prom_common_nextprop(phandle node, char *prev, char *buf) |
257 | phandle node, | ||
258 | struct device_node ***nextp) | ||
259 | { | 139 | { |
260 | struct device_node *ret = NULL, *prev_sibling = NULL; | 140 | const char *name; |
261 | struct device_node *dp; | ||
262 | |||
263 | while (1) { | ||
264 | dp = prom_create_node(node, parent); | ||
265 | if (!dp) | ||
266 | break; | ||
267 | |||
268 | if (prev_sibling) | ||
269 | prev_sibling->sibling = dp; | ||
270 | |||
271 | if (!ret) | ||
272 | ret = dp; | ||
273 | prev_sibling = dp; | ||
274 | |||
275 | *(*nextp) = dp; | ||
276 | *nextp = &dp->allnext; | ||
277 | |||
278 | dp->path_component_name = build_path_component(dp); | ||
279 | dp->full_name = build_full_name(dp); | ||
280 | |||
281 | dp->child = prom_build_tree(dp, prom_getchild(node), nextp); | ||
282 | |||
283 | if (prom_build_more) | ||
284 | prom_build_more(dp, nextp); | ||
285 | |||
286 | node = prom_getsibling(node); | ||
287 | } | ||
288 | 141 | ||
289 | return ret; | 142 | buf[0] = '\0'; |
143 | name = prom_nextprop(node, prev, buf); | ||
144 | return handle_nextprop_quirks(buf, name); | ||
290 | } | 145 | } |
291 | 146 | ||
292 | unsigned int prom_early_allocated __initdata; | 147 | unsigned int prom_early_allocated __initdata; |
293 | 148 | ||
149 | static struct of_pdt_ops prom_sparc_ops __initdata = { | ||
150 | .nextprop = prom_common_nextprop, | ||
151 | .getproplen = prom_getproplen, | ||
152 | .getproperty = prom_getproperty, | ||
153 | .getchild = prom_getchild, | ||
154 | .getsibling = prom_getsibling, | ||
155 | }; | ||
156 | |||
294 | void __init prom_build_devicetree(void) | 157 | void __init prom_build_devicetree(void) |
295 | { | 158 | { |
296 | struct device_node **nextp; | 159 | of_pdt_build_devicetree(prom_root_node, &prom_sparc_ops); |
297 | |||
298 | allnodes = prom_create_node(prom_root_node, NULL); | ||
299 | allnodes->path_component_name = ""; | ||
300 | allnodes->full_name = "/"; | ||
301 | |||
302 | nextp = &allnodes->allnext; | ||
303 | allnodes->child = prom_build_tree(allnodes, | ||
304 | prom_getchild(allnodes->phandle), | ||
305 | &nextp); | ||
306 | of_console_init(); | 160 | of_console_init(); |
307 | 161 | ||
308 | printk("PROM: Built device tree with %u bytes of memory.\n", | 162 | pr_info("PROM: Built device tree with %u bytes of memory.\n", |
309 | prom_early_allocated); | 163 | prom_early_allocated); |
310 | } | 164 | } |
diff --git a/arch/sparc/kernel/ptrace_32.c b/arch/sparc/kernel/ptrace_32.c index e608f397e11f..27b9e93d0121 100644 --- a/arch/sparc/kernel/ptrace_32.c +++ b/arch/sparc/kernel/ptrace_32.c | |||
@@ -323,18 +323,35 @@ const struct user_regset_view *task_user_regset_view(struct task_struct *task) | |||
323 | return &user_sparc32_view; | 323 | return &user_sparc32_view; |
324 | } | 324 | } |
325 | 325 | ||
326 | long arch_ptrace(struct task_struct *child, long request, long addr, long data) | 326 | struct fps { |
327 | unsigned long regs[32]; | ||
328 | unsigned long fsr; | ||
329 | unsigned long flags; | ||
330 | unsigned long extra; | ||
331 | unsigned long fpqd; | ||
332 | struct fq { | ||
333 | unsigned long *insnaddr; | ||
334 | unsigned long insn; | ||
335 | } fpq[16]; | ||
336 | }; | ||
337 | |||
338 | long arch_ptrace(struct task_struct *child, long request, | ||
339 | unsigned long addr, unsigned long data) | ||
327 | { | 340 | { |
328 | unsigned long addr2 = current->thread.kregs->u_regs[UREG_I4]; | 341 | unsigned long addr2 = current->thread.kregs->u_regs[UREG_I4]; |
342 | void __user *addr2p; | ||
329 | const struct user_regset_view *view; | 343 | const struct user_regset_view *view; |
344 | struct pt_regs __user *pregs; | ||
345 | struct fps __user *fps; | ||
330 | int ret; | 346 | int ret; |
331 | 347 | ||
332 | view = task_user_regset_view(current); | 348 | view = task_user_regset_view(current); |
349 | addr2p = (void __user *) addr2; | ||
350 | pregs = (struct pt_regs __user *) addr; | ||
351 | fps = (struct fps __user *) addr; | ||
333 | 352 | ||
334 | switch(request) { | 353 | switch(request) { |
335 | case PTRACE_GETREGS: { | 354 | case PTRACE_GETREGS: { |
336 | struct pt_regs __user *pregs = (struct pt_regs __user *) addr; | ||
337 | |||
338 | ret = copy_regset_to_user(child, view, REGSET_GENERAL, | 355 | ret = copy_regset_to_user(child, view, REGSET_GENERAL, |
339 | 32 * sizeof(u32), | 356 | 32 * sizeof(u32), |
340 | 4 * sizeof(u32), | 357 | 4 * sizeof(u32), |
@@ -348,8 +365,6 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
348 | } | 365 | } |
349 | 366 | ||
350 | case PTRACE_SETREGS: { | 367 | case PTRACE_SETREGS: { |
351 | struct pt_regs __user *pregs = (struct pt_regs __user *) addr; | ||
352 | |||
353 | ret = copy_regset_from_user(child, view, REGSET_GENERAL, | 368 | ret = copy_regset_from_user(child, view, REGSET_GENERAL, |
354 | 32 * sizeof(u32), | 369 | 32 * sizeof(u32), |
355 | 4 * sizeof(u32), | 370 | 4 * sizeof(u32), |
@@ -363,19 +378,6 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
363 | } | 378 | } |
364 | 379 | ||
365 | case PTRACE_GETFPREGS: { | 380 | case PTRACE_GETFPREGS: { |
366 | struct fps { | ||
367 | unsigned long regs[32]; | ||
368 | unsigned long fsr; | ||
369 | unsigned long flags; | ||
370 | unsigned long extra; | ||
371 | unsigned long fpqd; | ||
372 | struct fq { | ||
373 | unsigned long *insnaddr; | ||
374 | unsigned long insn; | ||
375 | } fpq[16]; | ||
376 | }; | ||
377 | struct fps __user *fps = (struct fps __user *) addr; | ||
378 | |||
379 | ret = copy_regset_to_user(child, view, REGSET_FP, | 381 | ret = copy_regset_to_user(child, view, REGSET_FP, |
380 | 0 * sizeof(u32), | 382 | 0 * sizeof(u32), |
381 | 32 * sizeof(u32), | 383 | 32 * sizeof(u32), |
@@ -397,19 +399,6 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
397 | } | 399 | } |
398 | 400 | ||
399 | case PTRACE_SETFPREGS: { | 401 | case PTRACE_SETFPREGS: { |
400 | struct fps { | ||
401 | unsigned long regs[32]; | ||
402 | unsigned long fsr; | ||
403 | unsigned long flags; | ||
404 | unsigned long extra; | ||
405 | unsigned long fpqd; | ||
406 | struct fq { | ||
407 | unsigned long *insnaddr; | ||
408 | unsigned long insn; | ||
409 | } fpq[16]; | ||
410 | }; | ||
411 | struct fps __user *fps = (struct fps __user *) addr; | ||
412 | |||
413 | ret = copy_regset_from_user(child, view, REGSET_FP, | 402 | ret = copy_regset_from_user(child, view, REGSET_FP, |
414 | 0 * sizeof(u32), | 403 | 0 * sizeof(u32), |
415 | 32 * sizeof(u32), | 404 | 32 * sizeof(u32), |
@@ -424,8 +413,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
424 | 413 | ||
425 | case PTRACE_READTEXT: | 414 | case PTRACE_READTEXT: |
426 | case PTRACE_READDATA: | 415 | case PTRACE_READDATA: |
427 | ret = ptrace_readdata(child, addr, | 416 | ret = ptrace_readdata(child, addr, addr2p, data); |
428 | (void __user *) addr2, data); | ||
429 | 417 | ||
430 | if (ret == data) | 418 | if (ret == data) |
431 | ret = 0; | 419 | ret = 0; |
@@ -435,8 +423,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
435 | 423 | ||
436 | case PTRACE_WRITETEXT: | 424 | case PTRACE_WRITETEXT: |
437 | case PTRACE_WRITEDATA: | 425 | case PTRACE_WRITEDATA: |
438 | ret = ptrace_writedata(child, (void __user *) addr2, | 426 | ret = ptrace_writedata(child, addr2p, addr, data); |
439 | addr, data); | ||
440 | 427 | ||
441 | if (ret == data) | 428 | if (ret == data) |
442 | ret = 0; | 429 | ret = 0; |
diff --git a/arch/sparc/kernel/ptrace_64.c b/arch/sparc/kernel/ptrace_64.c index aa90da08bf61..9ccc812bc09e 100644 --- a/arch/sparc/kernel/ptrace_64.c +++ b/arch/sparc/kernel/ptrace_64.c | |||
@@ -969,16 +969,19 @@ struct fps { | |||
969 | unsigned long fsr; | 969 | unsigned long fsr; |
970 | }; | 970 | }; |
971 | 971 | ||
972 | long arch_ptrace(struct task_struct *child, long request, long addr, long data) | 972 | long arch_ptrace(struct task_struct *child, long request, |
973 | unsigned long addr, unsigned long data) | ||
973 | { | 974 | { |
974 | const struct user_regset_view *view = task_user_regset_view(current); | 975 | const struct user_regset_view *view = task_user_regset_view(current); |
975 | unsigned long addr2 = task_pt_regs(current)->u_regs[UREG_I4]; | 976 | unsigned long addr2 = task_pt_regs(current)->u_regs[UREG_I4]; |
976 | struct pt_regs __user *pregs; | 977 | struct pt_regs __user *pregs; |
977 | struct fps __user *fps; | 978 | struct fps __user *fps; |
979 | void __user *addr2p; | ||
978 | int ret; | 980 | int ret; |
979 | 981 | ||
980 | pregs = (struct pt_regs __user *) (unsigned long) addr; | 982 | pregs = (struct pt_regs __user *) addr; |
981 | fps = (struct fps __user *) (unsigned long) addr; | 983 | fps = (struct fps __user *) addr; |
984 | addr2p = (void __user *) addr2; | ||
982 | 985 | ||
983 | switch (request) { | 986 | switch (request) { |
984 | case PTRACE_PEEKUSR: | 987 | case PTRACE_PEEKUSR: |
@@ -1029,8 +1032,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
1029 | 1032 | ||
1030 | case PTRACE_READTEXT: | 1033 | case PTRACE_READTEXT: |
1031 | case PTRACE_READDATA: | 1034 | case PTRACE_READDATA: |
1032 | ret = ptrace_readdata(child, addr, | 1035 | ret = ptrace_readdata(child, addr, addr2p, data); |
1033 | (char __user *)addr2, data); | ||
1034 | if (ret == data) | 1036 | if (ret == data) |
1035 | ret = 0; | 1037 | ret = 0; |
1036 | else if (ret >= 0) | 1038 | else if (ret >= 0) |
@@ -1039,8 +1041,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
1039 | 1041 | ||
1040 | case PTRACE_WRITETEXT: | 1042 | case PTRACE_WRITETEXT: |
1041 | case PTRACE_WRITEDATA: | 1043 | case PTRACE_WRITEDATA: |
1042 | ret = ptrace_writedata(child, (char __user *) addr2, | 1044 | ret = ptrace_writedata(child, addr2p, addr, data); |
1043 | addr, data); | ||
1044 | if (ret == data) | 1045 | if (ret == data) |
1045 | ret = 0; | 1046 | ret = 0; |
1046 | else if (ret >= 0) | 1047 | else if (ret >= 0) |
diff --git a/arch/sparc/kernel/rtrap_32.S b/arch/sparc/kernel/rtrap_32.S index 4da2e1f66290..5f5f74c2c2ca 100644 --- a/arch/sparc/kernel/rtrap_32.S +++ b/arch/sparc/kernel/rtrap_32.S | |||
@@ -78,9 +78,9 @@ signal_p: | |||
78 | call do_notify_resume | 78 | call do_notify_resume |
79 | add %sp, STACKFRAME_SZ, %o0 ! pt_regs ptr | 79 | add %sp, STACKFRAME_SZ, %o0 ! pt_regs ptr |
80 | 80 | ||
81 | /* Fall through. */ | 81 | b signal_p |
82 | ld [%sp + STACKFRAME_SZ + PT_PSR], %t_psr | 82 | ld [%curptr + TI_FLAGS], %g2 |
83 | clr %l6 | 83 | |
84 | ret_trap_continue: | 84 | ret_trap_continue: |
85 | sethi %hi(PSR_SYSCALL), %g1 | 85 | sethi %hi(PSR_SYSCALL), %g1 |
86 | andn %t_psr, %g1, %t_psr | 86 | andn %t_psr, %g1, %t_psr |
diff --git a/arch/sparc/kernel/rtrap_64.S b/arch/sparc/kernel/rtrap_64.S index 090b9e9ad5e3..77f1b95e0806 100644 --- a/arch/sparc/kernel/rtrap_64.S +++ b/arch/sparc/kernel/rtrap_64.S | |||
@@ -34,37 +34,9 @@ __handle_preemption: | |||
34 | __handle_user_windows: | 34 | __handle_user_windows: |
35 | call fault_in_user_windows | 35 | call fault_in_user_windows |
36 | wrpr %g0, RTRAP_PSTATE, %pstate | 36 | wrpr %g0, RTRAP_PSTATE, %pstate |
37 | wrpr %g0, RTRAP_PSTATE_IRQOFF, %pstate | 37 | ba,pt %xcc, __handle_preemption_continue |
38 | /* Redo sched+sig checks */ | 38 | wrpr %g0, RTRAP_PSTATE_IRQOFF, %pstate |
39 | ldx [%g6 + TI_FLAGS], %l0 | ||
40 | andcc %l0, _TIF_NEED_RESCHED, %g0 | ||
41 | |||
42 | be,pt %xcc, 1f | ||
43 | nop | ||
44 | call schedule | ||
45 | wrpr %g0, RTRAP_PSTATE, %pstate | ||
46 | wrpr %g0, RTRAP_PSTATE_IRQOFF, %pstate | ||
47 | ldx [%g6 + TI_FLAGS], %l0 | ||
48 | |||
49 | 1: andcc %l0, _TIF_DO_NOTIFY_RESUME_MASK, %g0 | ||
50 | be,pt %xcc, __handle_user_windows_continue | ||
51 | nop | ||
52 | mov %l5, %o1 | ||
53 | add %sp, PTREGS_OFF, %o0 | ||
54 | mov %l0, %o2 | ||
55 | |||
56 | call do_notify_resume | ||
57 | wrpr %g0, RTRAP_PSTATE, %pstate | ||
58 | wrpr %g0, RTRAP_PSTATE_IRQOFF, %pstate | ||
59 | /* Signal delivery can modify pt_regs tstate, so we must | ||
60 | * reload it. | ||
61 | */ | ||
62 | ldx [%sp + PTREGS_OFF + PT_V9_TSTATE], %l1 | ||
63 | sethi %hi(0xf << 20), %l4 | ||
64 | and %l1, %l4, %l4 | ||
65 | ba,pt %xcc, __handle_user_windows_continue | ||
66 | 39 | ||
67 | andn %l1, %l4, %l1 | ||
68 | __handle_userfpu: | 40 | __handle_userfpu: |
69 | rd %fprs, %l5 | 41 | rd %fprs, %l5 |
70 | andcc %l5, FPRS_FEF, %g0 | 42 | andcc %l5, FPRS_FEF, %g0 |
@@ -87,7 +59,7 @@ __handle_signal: | |||
87 | ldx [%sp + PTREGS_OFF + PT_V9_TSTATE], %l1 | 59 | ldx [%sp + PTREGS_OFF + PT_V9_TSTATE], %l1 |
88 | sethi %hi(0xf << 20), %l4 | 60 | sethi %hi(0xf << 20), %l4 |
89 | and %l1, %l4, %l4 | 61 | and %l1, %l4, %l4 |
90 | ba,pt %xcc, __handle_signal_continue | 62 | ba,pt %xcc, __handle_preemption_continue |
91 | andn %l1, %l4, %l1 | 63 | andn %l1, %l4, %l1 |
92 | 64 | ||
93 | /* When returning from a NMI (%pil==15) interrupt we want to | 65 | /* When returning from a NMI (%pil==15) interrupt we want to |
@@ -177,11 +149,9 @@ __handle_preemption_continue: | |||
177 | bne,pn %xcc, __handle_preemption | 149 | bne,pn %xcc, __handle_preemption |
178 | andcc %l0, _TIF_DO_NOTIFY_RESUME_MASK, %g0 | 150 | andcc %l0, _TIF_DO_NOTIFY_RESUME_MASK, %g0 |
179 | bne,pn %xcc, __handle_signal | 151 | bne,pn %xcc, __handle_signal |
180 | __handle_signal_continue: | ||
181 | ldub [%g6 + TI_WSAVED], %o2 | 152 | ldub [%g6 + TI_WSAVED], %o2 |
182 | brnz,pn %o2, __handle_user_windows | 153 | brnz,pn %o2, __handle_user_windows |
183 | nop | 154 | nop |
184 | __handle_user_windows_continue: | ||
185 | sethi %hi(TSTATE_PEF), %o0 | 155 | sethi %hi(TSTATE_PEF), %o0 |
186 | andcc %l1, %o0, %g0 | 156 | andcc %l1, %o0, %g0 |
187 | 157 | ||
diff --git a/arch/sparc/kernel/setup_64.c b/arch/sparc/kernel/setup_64.c index 5f72de67588b..29bafe051bb1 100644 --- a/arch/sparc/kernel/setup_64.c +++ b/arch/sparc/kernel/setup_64.c | |||
@@ -315,7 +315,7 @@ void __init setup_arch(char **cmdline_p) | |||
315 | 315 | ||
316 | #ifdef CONFIG_IP_PNP | 316 | #ifdef CONFIG_IP_PNP |
317 | if (!ic_set_manually) { | 317 | if (!ic_set_manually) { |
318 | int chosen = prom_finddevice ("/chosen"); | 318 | phandle chosen = prom_finddevice("/chosen"); |
319 | u32 cl, sv, gw; | 319 | u32 cl, sv, gw; |
320 | 320 | ||
321 | cl = prom_getintdefault (chosen, "client-ip", 0); | 321 | cl = prom_getintdefault (chosen, "client-ip", 0); |
diff --git a/arch/sparc/kernel/starfire.c b/arch/sparc/kernel/starfire.c index 060d0f3a6151..a4446c0fb7a1 100644 --- a/arch/sparc/kernel/starfire.c +++ b/arch/sparc/kernel/starfire.c | |||
@@ -23,7 +23,7 @@ int this_is_starfire = 0; | |||
23 | 23 | ||
24 | void check_if_starfire(void) | 24 | void check_if_starfire(void) |
25 | { | 25 | { |
26 | int ssnode = prom_finddevice("/ssp-serial"); | 26 | phandle ssnode = prom_finddevice("/ssp-serial"); |
27 | if (ssnode != 0 && ssnode != -1) | 27 | if (ssnode != 0 && ssnode != -1) |
28 | this_is_starfire = 1; | 28 | this_is_starfire = 1; |
29 | } | 29 | } |
diff --git a/arch/sparc/kernel/tadpole.c b/arch/sparc/kernel/tadpole.c index f476a5f4af6a..9aba8bd5a78b 100644 --- a/arch/sparc/kernel/tadpole.c +++ b/arch/sparc/kernel/tadpole.c | |||
@@ -100,7 +100,7 @@ static void swift_clockstop(void) | |||
100 | 100 | ||
101 | void __init clock_stop_probe(void) | 101 | void __init clock_stop_probe(void) |
102 | { | 102 | { |
103 | unsigned int node, clk_nd; | 103 | phandle node, clk_nd; |
104 | char name[20]; | 104 | char name[20]; |
105 | 105 | ||
106 | prom_getstring(prom_root_node, "name", name, sizeof(name)); | 106 | prom_getstring(prom_root_node, "name", name, sizeof(name)); |
diff --git a/arch/sparc/mm/fault_32.c b/arch/sparc/mm/fault_32.c index bd8601601afa..5b836f5aea90 100644 --- a/arch/sparc/mm/fault_32.c +++ b/arch/sparc/mm/fault_32.c | |||
@@ -539,6 +539,12 @@ do_sigbus: | |||
539 | __do_fault_siginfo(BUS_ADRERR, SIGBUS, tsk->thread.kregs, address); | 539 | __do_fault_siginfo(BUS_ADRERR, SIGBUS, tsk->thread.kregs, address); |
540 | } | 540 | } |
541 | 541 | ||
542 | static void check_stack_aligned(unsigned long sp) | ||
543 | { | ||
544 | if (sp & 0x7UL) | ||
545 | force_sig(SIGILL, current); | ||
546 | } | ||
547 | |||
542 | void window_overflow_fault(void) | 548 | void window_overflow_fault(void) |
543 | { | 549 | { |
544 | unsigned long sp; | 550 | unsigned long sp; |
@@ -547,6 +553,8 @@ void window_overflow_fault(void) | |||
547 | if(((sp + 0x38) & PAGE_MASK) != (sp & PAGE_MASK)) | 553 | if(((sp + 0x38) & PAGE_MASK) != (sp & PAGE_MASK)) |
548 | force_user_fault(sp + 0x38, 1); | 554 | force_user_fault(sp + 0x38, 1); |
549 | force_user_fault(sp, 1); | 555 | force_user_fault(sp, 1); |
556 | |||
557 | check_stack_aligned(sp); | ||
550 | } | 558 | } |
551 | 559 | ||
552 | void window_underflow_fault(unsigned long sp) | 560 | void window_underflow_fault(unsigned long sp) |
@@ -554,6 +562,8 @@ void window_underflow_fault(unsigned long sp) | |||
554 | if(((sp + 0x38) & PAGE_MASK) != (sp & PAGE_MASK)) | 562 | if(((sp + 0x38) & PAGE_MASK) != (sp & PAGE_MASK)) |
555 | force_user_fault(sp + 0x38, 0); | 563 | force_user_fault(sp + 0x38, 0); |
556 | force_user_fault(sp, 0); | 564 | force_user_fault(sp, 0); |
565 | |||
566 | check_stack_aligned(sp); | ||
557 | } | 567 | } |
558 | 568 | ||
559 | void window_ret_fault(struct pt_regs *regs) | 569 | void window_ret_fault(struct pt_regs *regs) |
@@ -564,4 +574,6 @@ void window_ret_fault(struct pt_regs *regs) | |||
564 | if(((sp + 0x38) & PAGE_MASK) != (sp & PAGE_MASK)) | 574 | if(((sp + 0x38) & PAGE_MASK) != (sp & PAGE_MASK)) |
565 | force_user_fault(sp + 0x38, 0); | 575 | force_user_fault(sp + 0x38, 0); |
566 | force_user_fault(sp, 0); | 576 | force_user_fault(sp, 0); |
577 | |||
578 | check_stack_aligned(sp); | ||
567 | } | 579 | } |
diff --git a/arch/sparc/mm/highmem.c b/arch/sparc/mm/highmem.c index e139e9cbf5f7..4730eac0747b 100644 --- a/arch/sparc/mm/highmem.c +++ b/arch/sparc/mm/highmem.c | |||
@@ -29,17 +29,17 @@ | |||
29 | #include <asm/tlbflush.h> | 29 | #include <asm/tlbflush.h> |
30 | #include <asm/fixmap.h> | 30 | #include <asm/fixmap.h> |
31 | 31 | ||
32 | void *kmap_atomic(struct page *page, enum km_type type) | 32 | void *__kmap_atomic(struct page *page) |
33 | { | 33 | { |
34 | unsigned long idx; | ||
35 | unsigned long vaddr; | 34 | unsigned long vaddr; |
35 | long idx, type; | ||
36 | 36 | ||
37 | /* even !CONFIG_PREEMPT needs this, for in_atomic in do_page_fault */ | 37 | /* even !CONFIG_PREEMPT needs this, for in_atomic in do_page_fault */ |
38 | pagefault_disable(); | 38 | pagefault_disable(); |
39 | if (!PageHighMem(page)) | 39 | if (!PageHighMem(page)) |
40 | return page_address(page); | 40 | return page_address(page); |
41 | 41 | ||
42 | debug_kmap_atomic(type); | 42 | type = kmap_atomic_idx_push(); |
43 | idx = type + KM_TYPE_NR*smp_processor_id(); | 43 | idx = type + KM_TYPE_NR*smp_processor_id(); |
44 | vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx); | 44 | vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx); |
45 | 45 | ||
@@ -63,44 +63,52 @@ void *kmap_atomic(struct page *page, enum km_type type) | |||
63 | 63 | ||
64 | return (void*) vaddr; | 64 | return (void*) vaddr; |
65 | } | 65 | } |
66 | EXPORT_SYMBOL(kmap_atomic); | 66 | EXPORT_SYMBOL(__kmap_atomic); |
67 | 67 | ||
68 | void kunmap_atomic_notypecheck(void *kvaddr, enum km_type type) | 68 | void __kunmap_atomic(void *kvaddr) |
69 | { | 69 | { |
70 | #ifdef CONFIG_DEBUG_HIGHMEM | ||
71 | unsigned long vaddr = (unsigned long) kvaddr & PAGE_MASK; | 70 | unsigned long vaddr = (unsigned long) kvaddr & PAGE_MASK; |
72 | unsigned long idx = type + KM_TYPE_NR*smp_processor_id(); | 71 | int type; |
73 | 72 | ||
74 | if (vaddr < FIXADDR_START) { // FIXME | 73 | if (vaddr < FIXADDR_START) { // FIXME |
75 | pagefault_enable(); | 74 | pagefault_enable(); |
76 | return; | 75 | return; |
77 | } | 76 | } |
78 | 77 | ||
79 | BUG_ON(vaddr != __fix_to_virt(FIX_KMAP_BEGIN+idx)); | 78 | type = kmap_atomic_idx(); |
80 | 79 | ||
81 | /* XXX Fix - Anton */ | 80 | #ifdef CONFIG_DEBUG_HIGHMEM |
81 | { | ||
82 | unsigned long idx; | ||
83 | |||
84 | idx = type + KM_TYPE_NR * smp_processor_id(); | ||
85 | BUG_ON(vaddr != __fix_to_virt(FIX_KMAP_BEGIN+idx)); | ||
86 | |||
87 | /* XXX Fix - Anton */ | ||
82 | #if 0 | 88 | #if 0 |
83 | __flush_cache_one(vaddr); | 89 | __flush_cache_one(vaddr); |
84 | #else | 90 | #else |
85 | flush_cache_all(); | 91 | flush_cache_all(); |
86 | #endif | 92 | #endif |
87 | 93 | ||
88 | /* | 94 | /* |
89 | * force other mappings to Oops if they'll try to access | 95 | * force other mappings to Oops if they'll try to access |
90 | * this pte without first remap it | 96 | * this pte without first remap it |
91 | */ | 97 | */ |
92 | pte_clear(&init_mm, vaddr, kmap_pte-idx); | 98 | pte_clear(&init_mm, vaddr, kmap_pte-idx); |
93 | /* XXX Fix - Anton */ | 99 | /* XXX Fix - Anton */ |
94 | #if 0 | 100 | #if 0 |
95 | __flush_tlb_one(vaddr); | 101 | __flush_tlb_one(vaddr); |
96 | #else | 102 | #else |
97 | flush_tlb_all(); | 103 | flush_tlb_all(); |
98 | #endif | 104 | #endif |
105 | } | ||
99 | #endif | 106 | #endif |
100 | 107 | ||
108 | kmap_atomic_idx_pop(); | ||
101 | pagefault_enable(); | 109 | pagefault_enable(); |
102 | } | 110 | } |
103 | EXPORT_SYMBOL(kunmap_atomic_notypecheck); | 111 | EXPORT_SYMBOL(__kunmap_atomic); |
104 | 112 | ||
105 | /* We may be fed a pagetable here by ptep_to_xxx and others. */ | 113 | /* We may be fed a pagetable here by ptep_to_xxx and others. */ |
106 | struct page *kmap_atomic_to_page(void *ptr) | 114 | struct page *kmap_atomic_to_page(void *ptr) |
diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c index 4c2572773b55..2f6ae1d1fb6b 100644 --- a/arch/sparc/mm/init_64.c +++ b/arch/sparc/mm/init_64.c | |||
@@ -88,7 +88,7 @@ static void __init read_obp_memory(const char *property, | |||
88 | struct linux_prom64_registers *regs, | 88 | struct linux_prom64_registers *regs, |
89 | int *num_ents) | 89 | int *num_ents) |
90 | { | 90 | { |
91 | int node = prom_finddevice("/memory"); | 91 | phandle node = prom_finddevice("/memory"); |
92 | int prop_size = prom_getproplen(node, property); | 92 | int prop_size = prom_getproplen(node, property); |
93 | int ents, ret, i; | 93 | int ents, ret, i; |
94 | 94 | ||
diff --git a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c index b0b43aa5e45a..92319aa8b662 100644 --- a/arch/sparc/mm/srmmu.c +++ b/arch/sparc/mm/srmmu.c | |||
@@ -1262,7 +1262,8 @@ extern unsigned long bootmem_init(unsigned long *pages_avail); | |||
1262 | 1262 | ||
1263 | void __init srmmu_paging_init(void) | 1263 | void __init srmmu_paging_init(void) |
1264 | { | 1264 | { |
1265 | int i, cpunode; | 1265 | int i; |
1266 | phandle cpunode; | ||
1266 | char node_str[128]; | 1267 | char node_str[128]; |
1267 | pgd_t *pgd; | 1268 | pgd_t *pgd; |
1268 | pmd_t *pmd; | 1269 | pmd_t *pmd; |
@@ -1398,7 +1399,8 @@ static void __init srmmu_is_bad(void) | |||
1398 | 1399 | ||
1399 | static void __init init_vac_layout(void) | 1400 | static void __init init_vac_layout(void) |
1400 | { | 1401 | { |
1401 | int nd, cache_lines; | 1402 | phandle nd; |
1403 | int cache_lines; | ||
1402 | char node_str[128]; | 1404 | char node_str[128]; |
1403 | #ifdef CONFIG_SMP | 1405 | #ifdef CONFIG_SMP |
1404 | int cpu = 0; | 1406 | int cpu = 0; |
@@ -2082,7 +2084,7 @@ static void __init get_srmmu_type(void) | |||
2082 | 2084 | ||
2083 | /* Next check for Fujitsu Swift. */ | 2085 | /* Next check for Fujitsu Swift. */ |
2084 | if(psr_typ == 0 && psr_vers == 4) { | 2086 | if(psr_typ == 0 && psr_vers == 4) { |
2085 | int cpunode; | 2087 | phandle cpunode; |
2086 | char node_str[128]; | 2088 | char node_str[128]; |
2087 | 2089 | ||
2088 | /* Look if it is not a TurboSparc emulating Swift... */ | 2090 | /* Look if it is not a TurboSparc emulating Swift... */ |
diff --git a/arch/sparc/mm/sun4c.c b/arch/sparc/mm/sun4c.c index 4289f90f8697..ddd0d86e508e 100644 --- a/arch/sparc/mm/sun4c.c +++ b/arch/sparc/mm/sun4c.c | |||
@@ -420,7 +420,7 @@ volatile unsigned long __iomem *sun4c_memerr_reg = NULL; | |||
420 | 420 | ||
421 | void __init sun4c_probe_memerr_reg(void) | 421 | void __init sun4c_probe_memerr_reg(void) |
422 | { | 422 | { |
423 | int node; | 423 | phandle node; |
424 | struct linux_prom_registers regs[1]; | 424 | struct linux_prom_registers regs[1]; |
425 | 425 | ||
426 | node = prom_getchild(prom_root_node); | 426 | node = prom_getchild(prom_root_node); |
diff --git a/arch/sparc/prom/init_32.c b/arch/sparc/prom/init_32.c index ccb36c7f9b8c..d342dba4dd54 100644 --- a/arch/sparc/prom/init_32.c +++ b/arch/sparc/prom/init_32.c | |||
@@ -20,7 +20,7 @@ enum prom_major_version prom_vers; | |||
20 | unsigned int prom_rev, prom_prev; | 20 | unsigned int prom_rev, prom_prev; |
21 | 21 | ||
22 | /* The root node of the prom device tree. */ | 22 | /* The root node of the prom device tree. */ |
23 | int prom_root_node; | 23 | phandle prom_root_node; |
24 | EXPORT_SYMBOL(prom_root_node); | 24 | EXPORT_SYMBOL(prom_root_node); |
25 | 25 | ||
26 | /* Pointer to the device tree operations structure. */ | 26 | /* Pointer to the device tree operations structure. */ |
diff --git a/arch/sparc/prom/init_64.c b/arch/sparc/prom/init_64.c index 7b00f89490a4..3ff911e7d25b 100644 --- a/arch/sparc/prom/init_64.c +++ b/arch/sparc/prom/init_64.c | |||
@@ -19,7 +19,7 @@ char prom_version[80]; | |||
19 | 19 | ||
20 | /* The root node of the prom device tree. */ | 20 | /* The root node of the prom device tree. */ |
21 | int prom_stdin, prom_stdout; | 21 | int prom_stdin, prom_stdout; |
22 | int prom_chosen_node; | 22 | phandle prom_chosen_node; |
23 | 23 | ||
24 | /* You must call prom_init() before you attempt to use any of the | 24 | /* You must call prom_init() before you attempt to use any of the |
25 | * routines in the prom library. It returns 0 on success, 1 on | 25 | * routines in the prom library. It returns 0 on success, 1 on |
@@ -30,7 +30,7 @@ extern void prom_cif_init(void *, void *); | |||
30 | 30 | ||
31 | void __init prom_init(void *cif_handler, void *cif_stack) | 31 | void __init prom_init(void *cif_handler, void *cif_stack) |
32 | { | 32 | { |
33 | int node; | 33 | phandle node; |
34 | 34 | ||
35 | prom_cif_init(cif_handler, cif_stack); | 35 | prom_cif_init(cif_handler, cif_stack); |
36 | 36 | ||
diff --git a/arch/sparc/prom/memory.c b/arch/sparc/prom/memory.c index fac7899a29c3..3f263a64857d 100644 --- a/arch/sparc/prom/memory.c +++ b/arch/sparc/prom/memory.c | |||
@@ -31,7 +31,8 @@ static int __init prom_meminit_v0(void) | |||
31 | static int __init prom_meminit_v2(void) | 31 | static int __init prom_meminit_v2(void) |
32 | { | 32 | { |
33 | struct linux_prom_registers reg[64]; | 33 | struct linux_prom_registers reg[64]; |
34 | int node, size, num_ents, i; | 34 | phandle node; |
35 | int size, num_ents, i; | ||
35 | 36 | ||
36 | node = prom_searchsiblings(prom_getchild(prom_root_node), "memory"); | 37 | node = prom_searchsiblings(prom_getchild(prom_root_node), "memory"); |
37 | size = prom_getproperty(node, "available", (char *) reg, sizeof(reg)); | 38 | size = prom_getproperty(node, "available", (char *) reg, sizeof(reg)); |
diff --git a/arch/sparc/prom/misc_64.c b/arch/sparc/prom/misc_64.c index 6cb1581d6aef..d24bc44e361e 100644 --- a/arch/sparc/prom/misc_64.c +++ b/arch/sparc/prom/misc_64.c | |||
@@ -183,7 +183,8 @@ unsigned char prom_get_idprom(char *idbuf, int num_bytes) | |||
183 | 183 | ||
184 | int prom_get_mmu_ihandle(void) | 184 | int prom_get_mmu_ihandle(void) |
185 | { | 185 | { |
186 | int node, ret; | 186 | phandle node; |
187 | int ret; | ||
187 | 188 | ||
188 | if (prom_mmu_ihandle_cache != 0) | 189 | if (prom_mmu_ihandle_cache != 0) |
189 | return prom_mmu_ihandle_cache; | 190 | return prom_mmu_ihandle_cache; |
@@ -201,7 +202,8 @@ int prom_get_mmu_ihandle(void) | |||
201 | static int prom_get_memory_ihandle(void) | 202 | static int prom_get_memory_ihandle(void) |
202 | { | 203 | { |
203 | static int memory_ihandle_cache; | 204 | static int memory_ihandle_cache; |
204 | int node, ret; | 205 | phandle node; |
206 | int ret; | ||
205 | 207 | ||
206 | if (memory_ihandle_cache != 0) | 208 | if (memory_ihandle_cache != 0) |
207 | return memory_ihandle_cache; | 209 | return memory_ihandle_cache; |
diff --git a/arch/sparc/prom/ranges.c b/arch/sparc/prom/ranges.c index aeff43e44e45..541fc829c207 100644 --- a/arch/sparc/prom/ranges.c +++ b/arch/sparc/prom/ranges.c | |||
@@ -68,7 +68,7 @@ EXPORT_SYMBOL(prom_apply_obio_ranges); | |||
68 | 68 | ||
69 | void __init prom_ranges_init(void) | 69 | void __init prom_ranges_init(void) |
70 | { | 70 | { |
71 | int node, obio_node; | 71 | phandle node, obio_node; |
72 | int success; | 72 | int success; |
73 | 73 | ||
74 | num_obio_ranges = 0; | 74 | num_obio_ranges = 0; |
@@ -89,8 +89,8 @@ void __init prom_ranges_init(void) | |||
89 | prom_printf("PROMLIB: obio_ranges %d\n", num_obio_ranges); | 89 | prom_printf("PROMLIB: obio_ranges %d\n", num_obio_ranges); |
90 | } | 90 | } |
91 | 91 | ||
92 | void | 92 | void prom_apply_generic_ranges(phandle node, phandle parent, |
93 | prom_apply_generic_ranges (int node, int parent, struct linux_prom_registers *regs, int nregs) | 93 | struct linux_prom_registers *regs, int nregs) |
94 | { | 94 | { |
95 | int success; | 95 | int success; |
96 | int num_ranges; | 96 | int num_ranges; |
diff --git a/arch/sparc/prom/tree_32.c b/arch/sparc/prom/tree_32.c index b21592f8e3fe..63e08e149774 100644 --- a/arch/sparc/prom/tree_32.c +++ b/arch/sparc/prom/tree_32.c | |||
@@ -20,10 +20,10 @@ extern void restore_current(void); | |||
20 | static char promlib_buf[128]; | 20 | static char promlib_buf[128]; |
21 | 21 | ||
22 | /* Internal version of prom_getchild that does not alter return values. */ | 22 | /* Internal version of prom_getchild that does not alter return values. */ |
23 | int __prom_getchild(int node) | 23 | phandle __prom_getchild(phandle node) |
24 | { | 24 | { |
25 | unsigned long flags; | 25 | unsigned long flags; |
26 | int cnode; | 26 | phandle cnode; |
27 | 27 | ||
28 | spin_lock_irqsave(&prom_lock, flags); | 28 | spin_lock_irqsave(&prom_lock, flags); |
29 | cnode = prom_nodeops->no_child(node); | 29 | cnode = prom_nodeops->no_child(node); |
@@ -36,9 +36,9 @@ int __prom_getchild(int node) | |||
36 | /* Return the child of node 'node' or zero if no this node has no | 36 | /* Return the child of node 'node' or zero if no this node has no |
37 | * direct descendent. | 37 | * direct descendent. |
38 | */ | 38 | */ |
39 | int prom_getchild(int node) | 39 | phandle prom_getchild(phandle node) |
40 | { | 40 | { |
41 | int cnode; | 41 | phandle cnode; |
42 | 42 | ||
43 | if (node == -1) | 43 | if (node == -1) |
44 | return 0; | 44 | return 0; |
@@ -52,10 +52,10 @@ int prom_getchild(int node) | |||
52 | EXPORT_SYMBOL(prom_getchild); | 52 | EXPORT_SYMBOL(prom_getchild); |
53 | 53 | ||
54 | /* Internal version of prom_getsibling that does not alter return values. */ | 54 | /* Internal version of prom_getsibling that does not alter return values. */ |
55 | int __prom_getsibling(int node) | 55 | phandle __prom_getsibling(phandle node) |
56 | { | 56 | { |
57 | unsigned long flags; | 57 | unsigned long flags; |
58 | int cnode; | 58 | phandle cnode; |
59 | 59 | ||
60 | spin_lock_irqsave(&prom_lock, flags); | 60 | spin_lock_irqsave(&prom_lock, flags); |
61 | cnode = prom_nodeops->no_nextnode(node); | 61 | cnode = prom_nodeops->no_nextnode(node); |
@@ -68,9 +68,9 @@ int __prom_getsibling(int node) | |||
68 | /* Return the next sibling of node 'node' or zero if no more siblings | 68 | /* Return the next sibling of node 'node' or zero if no more siblings |
69 | * at this level of depth in the tree. | 69 | * at this level of depth in the tree. |
70 | */ | 70 | */ |
71 | int prom_getsibling(int node) | 71 | phandle prom_getsibling(phandle node) |
72 | { | 72 | { |
73 | int sibnode; | 73 | phandle sibnode; |
74 | 74 | ||
75 | if (node == -1) | 75 | if (node == -1) |
76 | return 0; | 76 | return 0; |
@@ -86,7 +86,7 @@ EXPORT_SYMBOL(prom_getsibling); | |||
86 | /* Return the length in bytes of property 'prop' at node 'node'. | 86 | /* Return the length in bytes of property 'prop' at node 'node'. |
87 | * Return -1 on error. | 87 | * Return -1 on error. |
88 | */ | 88 | */ |
89 | int prom_getproplen(int node, const char *prop) | 89 | int prom_getproplen(phandle node, const char *prop) |
90 | { | 90 | { |
91 | int ret; | 91 | int ret; |
92 | unsigned long flags; | 92 | unsigned long flags; |
@@ -106,7 +106,7 @@ EXPORT_SYMBOL(prom_getproplen); | |||
106 | * 'buffer' which has a size of 'bufsize'. If the acquisition | 106 | * 'buffer' which has a size of 'bufsize'. If the acquisition |
107 | * was successful the length will be returned, else -1 is returned. | 107 | * was successful the length will be returned, else -1 is returned. |
108 | */ | 108 | */ |
109 | int prom_getproperty(int node, const char *prop, char *buffer, int bufsize) | 109 | int prom_getproperty(phandle node, const char *prop, char *buffer, int bufsize) |
110 | { | 110 | { |
111 | int plen, ret; | 111 | int plen, ret; |
112 | unsigned long flags; | 112 | unsigned long flags; |
@@ -126,7 +126,7 @@ EXPORT_SYMBOL(prom_getproperty); | |||
126 | /* Acquire an integer property and return its value. Returns -1 | 126 | /* Acquire an integer property and return its value. Returns -1 |
127 | * on failure. | 127 | * on failure. |
128 | */ | 128 | */ |
129 | int prom_getint(int node, char *prop) | 129 | int prom_getint(phandle node, char *prop) |
130 | { | 130 | { |
131 | static int intprop; | 131 | static int intprop; |
132 | 132 | ||
@@ -140,7 +140,7 @@ EXPORT_SYMBOL(prom_getint); | |||
140 | /* Acquire an integer property, upon error return the passed default | 140 | /* Acquire an integer property, upon error return the passed default |
141 | * integer. | 141 | * integer. |
142 | */ | 142 | */ |
143 | int prom_getintdefault(int node, char *property, int deflt) | 143 | int prom_getintdefault(phandle node, char *property, int deflt) |
144 | { | 144 | { |
145 | int retval; | 145 | int retval; |
146 | 146 | ||
@@ -152,7 +152,7 @@ int prom_getintdefault(int node, char *property, int deflt) | |||
152 | EXPORT_SYMBOL(prom_getintdefault); | 152 | EXPORT_SYMBOL(prom_getintdefault); |
153 | 153 | ||
154 | /* Acquire a boolean property, 1=TRUE 0=FALSE. */ | 154 | /* Acquire a boolean property, 1=TRUE 0=FALSE. */ |
155 | int prom_getbool(int node, char *prop) | 155 | int prom_getbool(phandle node, char *prop) |
156 | { | 156 | { |
157 | int retval; | 157 | int retval; |
158 | 158 | ||
@@ -166,7 +166,7 @@ EXPORT_SYMBOL(prom_getbool); | |||
166 | * string on error. The char pointer is the user supplied string | 166 | * string on error. The char pointer is the user supplied string |
167 | * buffer. | 167 | * buffer. |
168 | */ | 168 | */ |
169 | void prom_getstring(int node, char *prop, char *user_buf, int ubuf_size) | 169 | void prom_getstring(phandle node, char *prop, char *user_buf, int ubuf_size) |
170 | { | 170 | { |
171 | int len; | 171 | int len; |
172 | 172 | ||
@@ -180,7 +180,7 @@ EXPORT_SYMBOL(prom_getstring); | |||
180 | /* Does the device at node 'node' have name 'name'? | 180 | /* Does the device at node 'node' have name 'name'? |
181 | * YES = 1 NO = 0 | 181 | * YES = 1 NO = 0 |
182 | */ | 182 | */ |
183 | int prom_nodematch(int node, char *name) | 183 | int prom_nodematch(phandle node, char *name) |
184 | { | 184 | { |
185 | int error; | 185 | int error; |
186 | 186 | ||
@@ -194,10 +194,11 @@ int prom_nodematch(int node, char *name) | |||
194 | /* Search siblings at 'node_start' for a node with name | 194 | /* Search siblings at 'node_start' for a node with name |
195 | * 'nodename'. Return node if successful, zero if not. | 195 | * 'nodename'. Return node if successful, zero if not. |
196 | */ | 196 | */ |
197 | int prom_searchsiblings(int node_start, char *nodename) | 197 | phandle prom_searchsiblings(phandle node_start, char *nodename) |
198 | { | 198 | { |
199 | 199 | ||
200 | int thisnode, error; | 200 | phandle thisnode; |
201 | int error; | ||
201 | 202 | ||
202 | for(thisnode = node_start; thisnode; | 203 | for(thisnode = node_start; thisnode; |
203 | thisnode=prom_getsibling(thisnode)) { | 204 | thisnode=prom_getsibling(thisnode)) { |
@@ -213,7 +214,7 @@ int prom_searchsiblings(int node_start, char *nodename) | |||
213 | EXPORT_SYMBOL(prom_searchsiblings); | 214 | EXPORT_SYMBOL(prom_searchsiblings); |
214 | 215 | ||
215 | /* Interal version of nextprop that does not alter return values. */ | 216 | /* Interal version of nextprop that does not alter return values. */ |
216 | char * __prom_nextprop(int node, char * oprop) | 217 | char *__prom_nextprop(phandle node, char * oprop) |
217 | { | 218 | { |
218 | unsigned long flags; | 219 | unsigned long flags; |
219 | char *prop; | 220 | char *prop; |
@@ -228,7 +229,7 @@ char * __prom_nextprop(int node, char * oprop) | |||
228 | 229 | ||
229 | /* Return the first property name for node 'node'. */ | 230 | /* Return the first property name for node 'node'. */ |
230 | /* buffer is unused argument, but as v9 uses it, we need to have the same interface */ | 231 | /* buffer is unused argument, but as v9 uses it, we need to have the same interface */ |
231 | char * prom_firstprop(int node, char *bufer) | 232 | char *prom_firstprop(phandle node, char *bufer) |
232 | { | 233 | { |
233 | if (node == 0 || node == -1) | 234 | if (node == 0 || node == -1) |
234 | return ""; | 235 | return ""; |
@@ -241,7 +242,7 @@ EXPORT_SYMBOL(prom_firstprop); | |||
241 | * at node 'node' . Returns empty string if no more | 242 | * at node 'node' . Returns empty string if no more |
242 | * property types for this node. | 243 | * property types for this node. |
243 | */ | 244 | */ |
244 | char * prom_nextprop(int node, char *oprop, char *buffer) | 245 | char *prom_nextprop(phandle node, char *oprop, char *buffer) |
245 | { | 246 | { |
246 | if (node == 0 || node == -1) | 247 | if (node == 0 || node == -1) |
247 | return ""; | 248 | return ""; |
@@ -250,11 +251,11 @@ char * prom_nextprop(int node, char *oprop, char *buffer) | |||
250 | } | 251 | } |
251 | EXPORT_SYMBOL(prom_nextprop); | 252 | EXPORT_SYMBOL(prom_nextprop); |
252 | 253 | ||
253 | int prom_finddevice(char *name) | 254 | phandle prom_finddevice(char *name) |
254 | { | 255 | { |
255 | char nbuf[128]; | 256 | char nbuf[128]; |
256 | char *s = name, *d; | 257 | char *s = name, *d; |
257 | int node = prom_root_node, node2; | 258 | phandle node = prom_root_node, node2; |
258 | unsigned int which_io, phys_addr; | 259 | unsigned int which_io, phys_addr; |
259 | struct linux_prom_registers reg[PROMREG_MAX]; | 260 | struct linux_prom_registers reg[PROMREG_MAX]; |
260 | 261 | ||
@@ -298,7 +299,7 @@ int prom_finddevice(char *name) | |||
298 | } | 299 | } |
299 | EXPORT_SYMBOL(prom_finddevice); | 300 | EXPORT_SYMBOL(prom_finddevice); |
300 | 301 | ||
301 | int prom_node_has_property(int node, char *prop) | 302 | int prom_node_has_property(phandle node, char *prop) |
302 | { | 303 | { |
303 | char *current_property = ""; | 304 | char *current_property = ""; |
304 | 305 | ||
@@ -314,7 +315,7 @@ EXPORT_SYMBOL(prom_node_has_property); | |||
314 | /* Set property 'pname' at node 'node' to value 'value' which has a length | 315 | /* Set property 'pname' at node 'node' to value 'value' which has a length |
315 | * of 'size' bytes. Return the number of bytes the prom accepted. | 316 | * of 'size' bytes. Return the number of bytes the prom accepted. |
316 | */ | 317 | */ |
317 | int prom_setprop(int node, const char *pname, char *value, int size) | 318 | int prom_setprop(phandle node, const char *pname, char *value, int size) |
318 | { | 319 | { |
319 | unsigned long flags; | 320 | unsigned long flags; |
320 | int ret; | 321 | int ret; |
@@ -329,9 +330,9 @@ int prom_setprop(int node, const char *pname, char *value, int size) | |||
329 | } | 330 | } |
330 | EXPORT_SYMBOL(prom_setprop); | 331 | EXPORT_SYMBOL(prom_setprop); |
331 | 332 | ||
332 | int prom_inst2pkg(int inst) | 333 | phandle prom_inst2pkg(int inst) |
333 | { | 334 | { |
334 | int node; | 335 | phandle node; |
335 | unsigned long flags; | 336 | unsigned long flags; |
336 | 337 | ||
337 | spin_lock_irqsave(&prom_lock, flags); | 338 | spin_lock_irqsave(&prom_lock, flags); |
@@ -345,9 +346,10 @@ int prom_inst2pkg(int inst) | |||
345 | /* Return 'node' assigned to a particular prom 'path' | 346 | /* Return 'node' assigned to a particular prom 'path' |
346 | * FIXME: Should work for v0 as well | 347 | * FIXME: Should work for v0 as well |
347 | */ | 348 | */ |
348 | int prom_pathtoinode(char *path) | 349 | phandle prom_pathtoinode(char *path) |
349 | { | 350 | { |
350 | int node, inst; | 351 | phandle node; |
352 | int inst; | ||
351 | 353 | ||
352 | inst = prom_devopen (path); | 354 | inst = prom_devopen (path); |
353 | if (inst == -1) return 0; | 355 | if (inst == -1) return 0; |
diff --git a/arch/sparc/prom/tree_64.c b/arch/sparc/prom/tree_64.c index 9d3f9137a43a..691be68932f8 100644 --- a/arch/sparc/prom/tree_64.c +++ b/arch/sparc/prom/tree_64.c | |||
@@ -16,7 +16,7 @@ | |||
16 | #include <asm/oplib.h> | 16 | #include <asm/oplib.h> |
17 | #include <asm/ldc.h> | 17 | #include <asm/ldc.h> |
18 | 18 | ||
19 | static int prom_node_to_node(const char *type, int node) | 19 | static phandle prom_node_to_node(const char *type, phandle node) |
20 | { | 20 | { |
21 | unsigned long args[5]; | 21 | unsigned long args[5]; |
22 | 22 | ||
@@ -28,20 +28,20 @@ static int prom_node_to_node(const char *type, int node) | |||
28 | 28 | ||
29 | p1275_cmd_direct(args); | 29 | p1275_cmd_direct(args); |
30 | 30 | ||
31 | return (int) args[4]; | 31 | return (phandle) args[4]; |
32 | } | 32 | } |
33 | 33 | ||
34 | /* Return the child of node 'node' or zero if no this node has no | 34 | /* Return the child of node 'node' or zero if no this node has no |
35 | * direct descendent. | 35 | * direct descendent. |
36 | */ | 36 | */ |
37 | inline int __prom_getchild(int node) | 37 | inline phandle __prom_getchild(phandle node) |
38 | { | 38 | { |
39 | return prom_node_to_node("child", node); | 39 | return prom_node_to_node("child", node); |
40 | } | 40 | } |
41 | 41 | ||
42 | inline int prom_getchild(int node) | 42 | inline phandle prom_getchild(phandle node) |
43 | { | 43 | { |
44 | int cnode; | 44 | phandle cnode; |
45 | 45 | ||
46 | if (node == -1) | 46 | if (node == -1) |
47 | return 0; | 47 | return 0; |
@@ -52,9 +52,9 @@ inline int prom_getchild(int node) | |||
52 | } | 52 | } |
53 | EXPORT_SYMBOL(prom_getchild); | 53 | EXPORT_SYMBOL(prom_getchild); |
54 | 54 | ||
55 | inline int prom_getparent(int node) | 55 | inline phandle prom_getparent(phandle node) |
56 | { | 56 | { |
57 | int cnode; | 57 | phandle cnode; |
58 | 58 | ||
59 | if (node == -1) | 59 | if (node == -1) |
60 | return 0; | 60 | return 0; |
@@ -67,14 +67,14 @@ inline int prom_getparent(int node) | |||
67 | /* Return the next sibling of node 'node' or zero if no more siblings | 67 | /* Return the next sibling of node 'node' or zero if no more siblings |
68 | * at this level of depth in the tree. | 68 | * at this level of depth in the tree. |
69 | */ | 69 | */ |
70 | inline int __prom_getsibling(int node) | 70 | inline phandle __prom_getsibling(phandle node) |
71 | { | 71 | { |
72 | return prom_node_to_node(prom_peer_name, node); | 72 | return prom_node_to_node(prom_peer_name, node); |
73 | } | 73 | } |
74 | 74 | ||
75 | inline int prom_getsibling(int node) | 75 | inline phandle prom_getsibling(phandle node) |
76 | { | 76 | { |
77 | int sibnode; | 77 | phandle sibnode; |
78 | 78 | ||
79 | if (node == -1) | 79 | if (node == -1) |
80 | return 0; | 80 | return 0; |
@@ -89,7 +89,7 @@ EXPORT_SYMBOL(prom_getsibling); | |||
89 | /* Return the length in bytes of property 'prop' at node 'node'. | 89 | /* Return the length in bytes of property 'prop' at node 'node'. |
90 | * Return -1 on error. | 90 | * Return -1 on error. |
91 | */ | 91 | */ |
92 | inline int prom_getproplen(int node, const char *prop) | 92 | inline int prom_getproplen(phandle node, const char *prop) |
93 | { | 93 | { |
94 | unsigned long args[6]; | 94 | unsigned long args[6]; |
95 | 95 | ||
@@ -113,7 +113,7 @@ EXPORT_SYMBOL(prom_getproplen); | |||
113 | * 'buffer' which has a size of 'bufsize'. If the acquisition | 113 | * 'buffer' which has a size of 'bufsize'. If the acquisition |
114 | * was successful the length will be returned, else -1 is returned. | 114 | * was successful the length will be returned, else -1 is returned. |
115 | */ | 115 | */ |
116 | inline int prom_getproperty(int node, const char *prop, | 116 | inline int prom_getproperty(phandle node, const char *prop, |
117 | char *buffer, int bufsize) | 117 | char *buffer, int bufsize) |
118 | { | 118 | { |
119 | unsigned long args[8]; | 119 | unsigned long args[8]; |
@@ -141,7 +141,7 @@ EXPORT_SYMBOL(prom_getproperty); | |||
141 | /* Acquire an integer property and return its value. Returns -1 | 141 | /* Acquire an integer property and return its value. Returns -1 |
142 | * on failure. | 142 | * on failure. |
143 | */ | 143 | */ |
144 | inline int prom_getint(int node, const char *prop) | 144 | inline int prom_getint(phandle node, const char *prop) |
145 | { | 145 | { |
146 | int intprop; | 146 | int intprop; |
147 | 147 | ||
@@ -156,7 +156,7 @@ EXPORT_SYMBOL(prom_getint); | |||
156 | * integer. | 156 | * integer. |
157 | */ | 157 | */ |
158 | 158 | ||
159 | int prom_getintdefault(int node, const char *property, int deflt) | 159 | int prom_getintdefault(phandle node, const char *property, int deflt) |
160 | { | 160 | { |
161 | int retval; | 161 | int retval; |
162 | 162 | ||
@@ -169,7 +169,7 @@ int prom_getintdefault(int node, const char *property, int deflt) | |||
169 | EXPORT_SYMBOL(prom_getintdefault); | 169 | EXPORT_SYMBOL(prom_getintdefault); |
170 | 170 | ||
171 | /* Acquire a boolean property, 1=TRUE 0=FALSE. */ | 171 | /* Acquire a boolean property, 1=TRUE 0=FALSE. */ |
172 | int prom_getbool(int node, const char *prop) | 172 | int prom_getbool(phandle node, const char *prop) |
173 | { | 173 | { |
174 | int retval; | 174 | int retval; |
175 | 175 | ||
@@ -184,7 +184,8 @@ EXPORT_SYMBOL(prom_getbool); | |||
184 | * string on error. The char pointer is the user supplied string | 184 | * string on error. The char pointer is the user supplied string |
185 | * buffer. | 185 | * buffer. |
186 | */ | 186 | */ |
187 | void prom_getstring(int node, const char *prop, char *user_buf, int ubuf_size) | 187 | void prom_getstring(phandle node, const char *prop, char *user_buf, |
188 | int ubuf_size) | ||
188 | { | 189 | { |
189 | int len; | 190 | int len; |
190 | 191 | ||
@@ -198,7 +199,7 @@ EXPORT_SYMBOL(prom_getstring); | |||
198 | /* Does the device at node 'node' have name 'name'? | 199 | /* Does the device at node 'node' have name 'name'? |
199 | * YES = 1 NO = 0 | 200 | * YES = 1 NO = 0 |
200 | */ | 201 | */ |
201 | int prom_nodematch(int node, const char *name) | 202 | int prom_nodematch(phandle node, const char *name) |
202 | { | 203 | { |
203 | char namebuf[128]; | 204 | char namebuf[128]; |
204 | prom_getproperty(node, "name", namebuf, sizeof(namebuf)); | 205 | prom_getproperty(node, "name", namebuf, sizeof(namebuf)); |
@@ -210,10 +211,10 @@ int prom_nodematch(int node, const char *name) | |||
210 | /* Search siblings at 'node_start' for a node with name | 211 | /* Search siblings at 'node_start' for a node with name |
211 | * 'nodename'. Return node if successful, zero if not. | 212 | * 'nodename'. Return node if successful, zero if not. |
212 | */ | 213 | */ |
213 | int prom_searchsiblings(int node_start, const char *nodename) | 214 | phandle prom_searchsiblings(phandle node_start, const char *nodename) |
214 | { | 215 | { |
215 | 216 | phandle thisnode; | |
216 | int thisnode, error; | 217 | int error; |
217 | char promlib_buf[128]; | 218 | char promlib_buf[128]; |
218 | 219 | ||
219 | for(thisnode = node_start; thisnode; | 220 | for(thisnode = node_start; thisnode; |
@@ -234,7 +235,7 @@ static const char *prom_nextprop_name = "nextprop"; | |||
234 | /* Return the first property type for node 'node'. | 235 | /* Return the first property type for node 'node'. |
235 | * buffer should be at least 32B in length | 236 | * buffer should be at least 32B in length |
236 | */ | 237 | */ |
237 | inline char *prom_firstprop(int node, char *buffer) | 238 | inline char *prom_firstprop(phandle node, char *buffer) |
238 | { | 239 | { |
239 | unsigned long args[7]; | 240 | unsigned long args[7]; |
240 | 241 | ||
@@ -260,7 +261,7 @@ EXPORT_SYMBOL(prom_firstprop); | |||
260 | * at node 'node' . Returns NULL string if no more | 261 | * at node 'node' . Returns NULL string if no more |
261 | * property types for this node. | 262 | * property types for this node. |
262 | */ | 263 | */ |
263 | inline char *prom_nextprop(int node, const char *oprop, char *buffer) | 264 | inline char *prom_nextprop(phandle node, const char *oprop, char *buffer) |
264 | { | 265 | { |
265 | unsigned long args[7]; | 266 | unsigned long args[7]; |
266 | char buf[32]; | 267 | char buf[32]; |
@@ -288,8 +289,7 @@ inline char *prom_nextprop(int node, const char *oprop, char *buffer) | |||
288 | } | 289 | } |
289 | EXPORT_SYMBOL(prom_nextprop); | 290 | EXPORT_SYMBOL(prom_nextprop); |
290 | 291 | ||
291 | int | 292 | phandle prom_finddevice(const char *name) |
292 | prom_finddevice(const char *name) | ||
293 | { | 293 | { |
294 | unsigned long args[5]; | 294 | unsigned long args[5]; |
295 | 295 | ||
@@ -307,7 +307,7 @@ prom_finddevice(const char *name) | |||
307 | } | 307 | } |
308 | EXPORT_SYMBOL(prom_finddevice); | 308 | EXPORT_SYMBOL(prom_finddevice); |
309 | 309 | ||
310 | int prom_node_has_property(int node, const char *prop) | 310 | int prom_node_has_property(phandle node, const char *prop) |
311 | { | 311 | { |
312 | char buf [32]; | 312 | char buf [32]; |
313 | 313 | ||
@@ -325,7 +325,7 @@ EXPORT_SYMBOL(prom_node_has_property); | |||
325 | * of 'size' bytes. Return the number of bytes the prom accepted. | 325 | * of 'size' bytes. Return the number of bytes the prom accepted. |
326 | */ | 326 | */ |
327 | int | 327 | int |
328 | prom_setprop(int node, const char *pname, char *value, int size) | 328 | prom_setprop(phandle node, const char *pname, char *value, int size) |
329 | { | 329 | { |
330 | unsigned long args[8]; | 330 | unsigned long args[8]; |
331 | 331 | ||
@@ -355,10 +355,10 @@ prom_setprop(int node, const char *pname, char *value, int size) | |||
355 | } | 355 | } |
356 | EXPORT_SYMBOL(prom_setprop); | 356 | EXPORT_SYMBOL(prom_setprop); |
357 | 357 | ||
358 | inline int prom_inst2pkg(int inst) | 358 | inline phandle prom_inst2pkg(int inst) |
359 | { | 359 | { |
360 | unsigned long args[5]; | 360 | unsigned long args[5]; |
361 | int node; | 361 | phandle node; |
362 | 362 | ||
363 | args[0] = (unsigned long) "instance-to-package"; | 363 | args[0] = (unsigned long) "instance-to-package"; |
364 | args[1] = 1; | 364 | args[1] = 1; |
@@ -377,10 +377,10 @@ inline int prom_inst2pkg(int inst) | |||
377 | /* Return 'node' assigned to a particular prom 'path' | 377 | /* Return 'node' assigned to a particular prom 'path' |
378 | * FIXME: Should work for v0 as well | 378 | * FIXME: Should work for v0 as well |
379 | */ | 379 | */ |
380 | int | 380 | phandle prom_pathtoinode(const char *path) |
381 | prom_pathtoinode(const char *path) | ||
382 | { | 381 | { |
383 | int node, inst; | 382 | phandle node; |
383 | int inst; | ||
384 | 384 | ||
385 | inst = prom_devopen (path); | 385 | inst = prom_devopen (path); |
386 | if (inst == 0) | 386 | if (inst == 0) |