aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/s390/kernel/head31.S4
-rw-r--r--arch/s390/kernel/head64.S4
-rw-r--r--arch/s390/kernel/setup.c46
-rw-r--r--arch/sparc/kernel/devices.c25
-rw-r--r--arch/sparc/kernel/irq.c2
-rw-r--r--arch/sparc/kernel/of_device.c34
-rw-r--r--arch/sparc/kernel/prom.c9
-rw-r--r--arch/sparc/kernel/smp.c96
-rw-r--r--arch/sparc/kernel/sparc_ksyms.c1
-rw-r--r--arch/sparc/kernel/sun4d_smp.c103
-rw-r--r--arch/sparc/kernel/sys_sparc.c18
-rw-r--r--arch/sparc/mm/io-unit.c1
-rw-r--r--arch/sparc/prom/tree.c18
-rw-r--r--arch/sparc64/defconfig8
-rw-r--r--arch/sparc64/kernel/devices.c3
-rw-r--r--arch/sparc64/kernel/of_device.c34
-rw-r--r--arch/sparc64/kernel/prom.c12
-rw-r--r--arch/sparc64/kernel/sparc64_ksyms.c1
-rw-r--r--arch/sparc64/kernel/sys_sparc.c18
-rw-r--r--arch/sparc64/prom/tree.c85
20 files changed, 271 insertions, 251 deletions
diff --git a/arch/s390/kernel/head31.S b/arch/s390/kernel/head31.S
index d00de17b3778..a4dc61f3285e 100644
--- a/arch/s390/kernel/head31.S
+++ b/arch/s390/kernel/head31.S
@@ -273,7 +273,7 @@ startup_continue:
273.Lbss_end: .long _end 273.Lbss_end: .long _end
274.Lparmaddr: .long PARMAREA 274.Lparmaddr: .long PARMAREA
275.Lsccbaddr: .long .Lsccb 275.Lsccbaddr: .long .Lsccb
276 .align 4096 276 .org 0x12000
277.Lsccb: 277.Lsccb:
278 .hword 0x1000 # length, one page 278 .hword 0x1000 # length, one page
279 .byte 0x00,0x00,0x00 279 .byte 0x00,0x00,0x00
@@ -290,7 +290,7 @@ startup_continue:
290.Lscpincr2: 290.Lscpincr2:
291 .quad 0x00 291 .quad 0x00
292 .fill 3984,1,0 292 .fill 3984,1,0
293 .align 4096 293 .org 0x13000
294 294
295#ifdef CONFIG_SHARED_KERNEL 295#ifdef CONFIG_SHARED_KERNEL
296 .org 0x100000 296 .org 0x100000
diff --git a/arch/s390/kernel/head64.S b/arch/s390/kernel/head64.S
index 47744fcca930..9d80c5b1ef95 100644
--- a/arch/s390/kernel/head64.S
+++ b/arch/s390/kernel/head64.S
@@ -268,7 +268,7 @@ startup_continue:
268.Lparmaddr: 268.Lparmaddr:
269 .quad PARMAREA 269 .quad PARMAREA
270 270
271 .align 4096 271 .org 0x12000
272.Lsccb: 272.Lsccb:
273 .hword 0x1000 # length, one page 273 .hword 0x1000 # length, one page
274 .byte 0x00,0x00,0x00 274 .byte 0x00,0x00,0x00
@@ -285,7 +285,7 @@ startup_continue:
285.Lscpincr2: 285.Lscpincr2:
286 .quad 0x00 286 .quad 0x00
287 .fill 3984,1,0 287 .fill 3984,1,0
288 .align 4096 288 .org 0x13000
289 289
290#ifdef CONFIG_SHARED_KERNEL 290#ifdef CONFIG_SHARED_KERNEL
291 .org 0x100000 291 .org 0x100000
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c
index 1ca34f54ea8a..c902f059c7aa 100644
--- a/arch/s390/kernel/setup.c
+++ b/arch/s390/kernel/setup.c
@@ -877,31 +877,57 @@ static struct bin_attribute ipl_scp_data_attr = {
877 877
878static decl_subsys(ipl, NULL, NULL); 878static decl_subsys(ipl, NULL, NULL);
879 879
880static int ipl_register_fcp_files(void)
881{
882 int rc;
883
884 rc = sysfs_create_group(&ipl_subsys.kset.kobj,
885 &ipl_fcp_attr_group);
886 if (rc)
887 goto out;
888 rc = sysfs_create_bin_file(&ipl_subsys.kset.kobj,
889 &ipl_parameter_attr);
890 if (rc)
891 goto out_ipl_parm;
892 rc = sysfs_create_bin_file(&ipl_subsys.kset.kobj,
893 &ipl_scp_data_attr);
894 if (!rc)
895 goto out;
896
897 sysfs_remove_bin_file(&ipl_subsys.kset.kobj, &ipl_parameter_attr);
898
899out_ipl_parm:
900 sysfs_remove_group(&ipl_subsys.kset.kobj, &ipl_fcp_attr_group);
901out:
902 return rc;
903}
904
880static int __init 905static int __init
881ipl_device_sysfs_register(void) { 906ipl_device_sysfs_register(void) {
882 int rc; 907 int rc;
883 908
884 rc = firmware_register(&ipl_subsys); 909 rc = firmware_register(&ipl_subsys);
885 if (rc) 910 if (rc)
886 return rc; 911 goto out;
887 912
888 switch (get_ipl_type()) { 913 switch (get_ipl_type()) {
889 case ipl_type_ccw: 914 case ipl_type_ccw:
890 sysfs_create_group(&ipl_subsys.kset.kobj, &ipl_ccw_attr_group); 915 rc = sysfs_create_group(&ipl_subsys.kset.kobj,
916 &ipl_ccw_attr_group);
891 break; 917 break;
892 case ipl_type_fcp: 918 case ipl_type_fcp:
893 sysfs_create_group(&ipl_subsys.kset.kobj, &ipl_fcp_attr_group); 919 rc = ipl_register_fcp_files();
894 sysfs_create_bin_file(&ipl_subsys.kset.kobj,
895 &ipl_parameter_attr);
896 sysfs_create_bin_file(&ipl_subsys.kset.kobj,
897 &ipl_scp_data_attr);
898 break; 920 break;
899 default: 921 default:
900 sysfs_create_group(&ipl_subsys.kset.kobj, 922 rc = sysfs_create_group(&ipl_subsys.kset.kobj,
901 &ipl_unknown_attr_group); 923 &ipl_unknown_attr_group);
902 break; 924 break;
903 } 925 }
904 return 0; 926
927 if (rc)
928 firmware_unregister(&ipl_subsys);
929out:
930 return rc;
905} 931}
906 932
907__initcall(ipl_device_sysfs_register); 933__initcall(ipl_device_sysfs_register);
diff --git a/arch/sparc/kernel/devices.c b/arch/sparc/kernel/devices.c
index adba9dfee35e..af90a5f9ab57 100644
--- a/arch/sparc/kernel/devices.c
+++ b/arch/sparc/kernel/devices.c
@@ -15,6 +15,7 @@
15 15
16#include <asm/page.h> 16#include <asm/page.h>
17#include <asm/oplib.h> 17#include <asm/oplib.h>
18#include <asm/prom.h>
18#include <asm/smp.h> 19#include <asm/smp.h>
19#include <asm/system.h> 20#include <asm/system.h>
20#include <asm/cpudata.h> 21#include <asm/cpudata.h>
@@ -34,12 +35,6 @@ static int check_cpu_node(int nd, int *cur_inst,
34 int (*compare)(int, int, void *), void *compare_arg, 35 int (*compare)(int, int, void *), void *compare_arg,
35 int *prom_node, int *mid) 36 int *prom_node, int *mid)
36{ 37{
37 char node_str[128];
38
39 prom_getstring(nd, "device_type", node_str, sizeof(node_str));
40 if (strcmp(node_str, "cpu"))
41 return -ENODEV;
42
43 if (!compare(nd, *cur_inst, compare_arg)) { 38 if (!compare(nd, *cur_inst, compare_arg)) {
44 if (prom_node) 39 if (prom_node)
45 *prom_node = nd; 40 *prom_node = nd;
@@ -59,20 +54,14 @@ static int check_cpu_node(int nd, int *cur_inst,
59static int __cpu_find_by(int (*compare)(int, int, void *), void *compare_arg, 54static int __cpu_find_by(int (*compare)(int, int, void *), void *compare_arg,
60 int *prom_node, int *mid) 55 int *prom_node, int *mid)
61{ 56{
62 int nd, cur_inst, err; 57 struct device_node *dp;
58 int cur_inst;
63 59
64 nd = prom_root_node;
65 cur_inst = 0; 60 cur_inst = 0;
66 61 for_each_node_by_type(dp, "cpu") {
67 err = check_cpu_node(nd, &cur_inst, compare, compare_arg, 62 int err = check_cpu_node(dp->node, &cur_inst,
68 prom_node, mid); 63 compare, compare_arg,
69 if (!err) 64 prom_node, mid);
70 return 0;
71
72 nd = prom_getchild(nd);
73 while ((nd = prom_getsibling(nd)) != 0) {
74 err = check_cpu_node(nd, &cur_inst, compare, compare_arg,
75 prom_node, mid);
76 if (!err) 65 if (!err)
77 return 0; 66 return 0;
78 } 67 }
diff --git a/arch/sparc/kernel/irq.c b/arch/sparc/kernel/irq.c
index cde73327ca96..72f0201051a0 100644
--- a/arch/sparc/kernel/irq.c
+++ b/arch/sparc/kernel/irq.c
@@ -329,7 +329,7 @@ void handler_irq(int irq, struct pt_regs * regs)
329 disable_pil_irq(irq); 329 disable_pil_irq(irq);
330#ifdef CONFIG_SMP 330#ifdef CONFIG_SMP
331 /* Only rotate on lower priority IRQ's (scsi, ethernet, etc.). */ 331 /* Only rotate on lower priority IRQ's (scsi, ethernet, etc.). */
332 if(irq < 10) 332 if((sparc_cpu_model==sun4m) && (irq < 10))
333 smp4m_irq_rotate(cpu); 333 smp4m_irq_rotate(cpu);
334#endif 334#endif
335 action = sparc_irq[irq].action; 335 action = sparc_irq[irq].action;
diff --git a/arch/sparc/kernel/of_device.c b/arch/sparc/kernel/of_device.c
index 5a2faad5d043..97bf87e8cdde 100644
--- a/arch/sparc/kernel/of_device.c
+++ b/arch/sparc/kernel/of_device.c
@@ -596,14 +596,41 @@ static struct of_device * __init scan_one_device(struct device_node *dp,
596 static int pil_to_sbus[] = { 596 static int pil_to_sbus[] = {
597 0, 0, 1, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7, 0, 0, 597 0, 0, 1, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7, 0, 0,
598 }; 598 };
599 struct device_node *busp = dp->parent; 599 struct device_node *io_unit, *sbi = dp->parent;
600 struct linux_prom_registers *regs; 600 struct linux_prom_registers *regs;
601 int board = of_getintprop_default(busp, "board#", 0); 601 int board, slot;
602 int slot; 602
603 while (sbi) {
604 if (!strcmp(sbi->name, "sbi"))
605 break;
606
607 sbi = sbi->parent;
608 }
609 if (!sbi)
610 goto build_resources;
603 611
604 regs = of_get_property(dp, "reg", NULL); 612 regs = of_get_property(dp, "reg", NULL);
613 if (!regs)
614 goto build_resources;
615
605 slot = regs->which_io; 616 slot = regs->which_io;
606 617
618 /* If SBI's parent is not io-unit or the io-unit lacks
619 * a "board#" property, something is very wrong.
620 */
621 if (!sbi->parent || strcmp(sbi->parent->name, "io-unit")) {
622 printk("%s: Error, parent is not io-unit.\n",
623 sbi->full_name);
624 goto build_resources;
625 }
626 io_unit = sbi->parent;
627 board = of_getintprop_default(io_unit, "board#", -1);
628 if (board == -1) {
629 printk("%s: Error, lacks board# property.\n",
630 io_unit->full_name);
631 goto build_resources;
632 }
633
607 for (i = 0; i < op->num_irqs; i++) { 634 for (i = 0; i < op->num_irqs; i++) {
608 int this_irq = op->irqs[i]; 635 int this_irq = op->irqs[i];
609 int sbusl = pil_to_sbus[this_irq]; 636 int sbusl = pil_to_sbus[this_irq];
@@ -617,6 +644,7 @@ static struct of_device * __init scan_one_device(struct device_node *dp,
617 } 644 }
618 } 645 }
619 646
647build_resources:
620 build_device_resources(op, parent); 648 build_device_resources(op, parent);
621 649
622 op->dev.parent = parent; 650 op->dev.parent = parent;
diff --git a/arch/sparc/kernel/prom.c b/arch/sparc/kernel/prom.c
index 4b06dcb00ebd..4ca9e5fc97f4 100644
--- a/arch/sparc/kernel/prom.c
+++ b/arch/sparc/kernel/prom.c
@@ -444,6 +444,7 @@ static struct property * __init build_one_prop(phandle node, char *prev, char *s
444 static struct property *tmp = NULL; 444 static struct property *tmp = NULL;
445 struct property *p; 445 struct property *p;
446 int len; 446 int len;
447 const char *name;
447 448
448 if (tmp) { 449 if (tmp) {
449 p = tmp; 450 p = tmp;
@@ -456,19 +457,21 @@ static struct property * __init build_one_prop(phandle node, char *prev, char *s
456 457
457 p->name = (char *) (p + 1); 458 p->name = (char *) (p + 1);
458 if (special_name) { 459 if (special_name) {
460 strcpy(p->name, special_name);
459 p->length = special_len; 461 p->length = special_len;
460 p->value = prom_early_alloc(special_len); 462 p->value = prom_early_alloc(special_len);
461 memcpy(p->value, special_val, special_len); 463 memcpy(p->value, special_val, special_len);
462 } else { 464 } else {
463 if (prev == NULL) { 465 if (prev == NULL) {
464 prom_firstprop(node, p->name); 466 name = prom_firstprop(node, NULL);
465 } else { 467 } else {
466 prom_nextprop(node, prev, p->name); 468 name = prom_nextprop(node, prev, NULL);
467 } 469 }
468 if (strlen(p->name) == 0) { 470 if (strlen(name) == 0) {
469 tmp = p; 471 tmp = p;
470 return NULL; 472 return NULL;
471 } 473 }
474 strcpy(p->name, name);
472 p->length = prom_getproplen(node, p->name); 475 p->length = prom_getproplen(node, p->name);
473 if (p->length <= 0) { 476 if (p->length <= 0) {
474 p->length = 0; 477 p->length = 0;
diff --git a/arch/sparc/kernel/smp.c b/arch/sparc/kernel/smp.c
index 6135d4faeeeb..e311ade1b490 100644
--- a/arch/sparc/kernel/smp.c
+++ b/arch/sparc/kernel/smp.c
@@ -87,6 +87,7 @@ void __cpuinit smp_store_cpu_info(int id)
87void __init smp_cpus_done(unsigned int max_cpus) 87void __init smp_cpus_done(unsigned int max_cpus)
88{ 88{
89 extern void smp4m_smp_done(void); 89 extern void smp4m_smp_done(void);
90 extern void smp4d_smp_done(void);
90 unsigned long bogosum = 0; 91 unsigned long bogosum = 0;
91 int cpu, num; 92 int cpu, num;
92 93
@@ -100,8 +101,34 @@ void __init smp_cpus_done(unsigned int max_cpus)
100 num, bogosum/(500000/HZ), 101 num, bogosum/(500000/HZ),
101 (bogosum/(5000/HZ))%100); 102 (bogosum/(5000/HZ))%100);
102 103
103 BUG_ON(sparc_cpu_model != sun4m); 104 switch(sparc_cpu_model) {
104 smp4m_smp_done(); 105 case sun4:
106 printk("SUN4\n");
107 BUG();
108 break;
109 case sun4c:
110 printk("SUN4C\n");
111 BUG();
112 break;
113 case sun4m:
114 smp4m_smp_done();
115 break;
116 case sun4d:
117 smp4d_smp_done();
118 break;
119 case sun4e:
120 printk("SUN4E\n");
121 BUG();
122 break;
123 case sun4u:
124 printk("SUN4U\n");
125 BUG();
126 break;
127 default:
128 printk("UNKNOWN!\n");
129 BUG();
130 break;
131 };
105} 132}
106 133
107void cpu_panic(void) 134void cpu_panic(void)
@@ -267,9 +294,9 @@ int setup_profiling_timer(unsigned int multiplier)
267void __init smp_prepare_cpus(unsigned int max_cpus) 294void __init smp_prepare_cpus(unsigned int max_cpus)
268{ 295{
269 extern void smp4m_boot_cpus(void); 296 extern void smp4m_boot_cpus(void);
297 extern void smp4d_boot_cpus(void);
270 int i, cpuid, extra; 298 int i, cpuid, extra;
271 299
272 BUG_ON(sparc_cpu_model != sun4m);
273 printk("Entering SMP Mode...\n"); 300 printk("Entering SMP Mode...\n");
274 301
275 extra = 0; 302 extra = 0;
@@ -283,7 +310,34 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
283 310
284 smp_store_cpu_info(boot_cpu_id); 311 smp_store_cpu_info(boot_cpu_id);
285 312
286 smp4m_boot_cpus(); 313 switch(sparc_cpu_model) {
314 case sun4:
315 printk("SUN4\n");
316 BUG();
317 break;
318 case sun4c:
319 printk("SUN4C\n");
320 BUG();
321 break;
322 case sun4m:
323 smp4m_boot_cpus();
324 break;
325 case sun4d:
326 smp4d_boot_cpus();
327 break;
328 case sun4e:
329 printk("SUN4E\n");
330 BUG();
331 break;
332 case sun4u:
333 printk("SUN4U\n");
334 BUG();
335 break;
336 default:
337 printk("UNKNOWN!\n");
338 BUG();
339 break;
340 };
287} 341}
288 342
289/* Set this up early so that things like the scheduler can init 343/* Set this up early so that things like the scheduler can init
@@ -323,9 +377,37 @@ void __init smp_prepare_boot_cpu(void)
323int __cpuinit __cpu_up(unsigned int cpu) 377int __cpuinit __cpu_up(unsigned int cpu)
324{ 378{
325 extern int smp4m_boot_one_cpu(int); 379 extern int smp4m_boot_one_cpu(int);
326 int ret; 380 extern int smp4d_boot_one_cpu(int);
327 381 int ret=0;
328 ret = smp4m_boot_one_cpu(cpu); 382
383 switch(sparc_cpu_model) {
384 case sun4:
385 printk("SUN4\n");
386 BUG();
387 break;
388 case sun4c:
389 printk("SUN4C\n");
390 BUG();
391 break;
392 case sun4m:
393 ret = smp4m_boot_one_cpu(cpu);
394 break;
395 case sun4d:
396 ret = smp4d_boot_one_cpu(cpu);
397 break;
398 case sun4e:
399 printk("SUN4E\n");
400 BUG();
401 break;
402 case sun4u:
403 printk("SUN4U\n");
404 BUG();
405 break;
406 default:
407 printk("UNKNOWN!\n");
408 BUG();
409 break;
410 };
329 411
330 if (!ret) { 412 if (!ret) {
331 cpu_set(cpu, smp_commenced_mask); 413 cpu_set(cpu, smp_commenced_mask);
diff --git a/arch/sparc/kernel/sparc_ksyms.c b/arch/sparc/kernel/sparc_ksyms.c
index 5fb987fc3d63..4d441a554d35 100644
--- a/arch/sparc/kernel/sparc_ksyms.c
+++ b/arch/sparc/kernel/sparc_ksyms.c
@@ -237,7 +237,6 @@ EXPORT_SYMBOL(prom_node_has_property);
237EXPORT_SYMBOL(prom_setprop); 237EXPORT_SYMBOL(prom_setprop);
238EXPORT_SYMBOL(saved_command_line); 238EXPORT_SYMBOL(saved_command_line);
239EXPORT_SYMBOL(prom_apply_obio_ranges); 239EXPORT_SYMBOL(prom_apply_obio_ranges);
240EXPORT_SYMBOL(prom_getname);
241EXPORT_SYMBOL(prom_feval); 240EXPORT_SYMBOL(prom_feval);
242EXPORT_SYMBOL(prom_getbool); 241EXPORT_SYMBOL(prom_getbool);
243EXPORT_SYMBOL(prom_getstring); 242EXPORT_SYMBOL(prom_getstring);
diff --git a/arch/sparc/kernel/sun4d_smp.c b/arch/sparc/kernel/sun4d_smp.c
index b141b7ee6717..ba843f6a2832 100644
--- a/arch/sparc/kernel/sun4d_smp.c
+++ b/arch/sparc/kernel/sun4d_smp.c
@@ -43,15 +43,10 @@ extern ctxd_t *srmmu_ctx_table_phys;
43extern void calibrate_delay(void); 43extern void calibrate_delay(void);
44 44
45extern volatile int smp_processors_ready; 45extern volatile int smp_processors_ready;
46extern int smp_num_cpus;
47static int smp_highest_cpu; 46static int smp_highest_cpu;
48extern volatile unsigned long cpu_callin_map[NR_CPUS]; 47extern volatile unsigned long cpu_callin_map[NR_CPUS];
49extern cpuinfo_sparc cpu_data[NR_CPUS]; 48extern cpuinfo_sparc cpu_data[NR_CPUS];
50extern unsigned char boot_cpu_id; 49extern unsigned char boot_cpu_id;
51extern int smp_activated;
52extern volatile int __cpu_number_map[NR_CPUS];
53extern volatile int __cpu_logical_map[NR_CPUS];
54extern volatile unsigned long ipi_count;
55extern volatile int smp_process_available; 50extern volatile int smp_process_available;
56 51
57extern cpumask_t smp_commenced_mask; 52extern cpumask_t smp_commenced_mask;
@@ -144,6 +139,8 @@ void __init smp4d_callin(void)
144 spin_lock_irqsave(&sun4d_imsk_lock, flags); 139 spin_lock_irqsave(&sun4d_imsk_lock, flags);
145 cc_set_imsk(cc_get_imsk() & ~0x4000); /* Allow PIL 14 as well */ 140 cc_set_imsk(cc_get_imsk() & ~0x4000); /* Allow PIL 14 as well */
146 spin_unlock_irqrestore(&sun4d_imsk_lock, flags); 141 spin_unlock_irqrestore(&sun4d_imsk_lock, flags);
142 cpu_set(cpuid, cpu_online_map);
143
147} 144}
148 145
149extern void init_IRQ(void); 146extern void init_IRQ(void);
@@ -160,51 +157,24 @@ extern unsigned long trapbase_cpu3[];
160 157
161void __init smp4d_boot_cpus(void) 158void __init smp4d_boot_cpus(void)
162{ 159{
163 int cpucount = 0;
164 int i, mid;
165
166 printk("Entering SMP Mode...\n");
167
168 if (boot_cpu_id) 160 if (boot_cpu_id)
169 current_set[0] = NULL; 161 current_set[0] = NULL;
170
171 local_irq_enable();
172 cpus_clear(cpu_present_map);
173
174 /* XXX This whole thing has to go. See sparc64. */
175 for (i = 0; !cpu_find_by_instance(i, NULL, &mid); i++)
176 cpu_set(mid, cpu_present_map);
177 SMP_PRINTK(("cpu_present_map %08lx\n", cpus_addr(cpu_present_map)[0]));
178 for(i=0; i < NR_CPUS; i++)
179 __cpu_number_map[i] = -1;
180 for(i=0; i < NR_CPUS; i++)
181 __cpu_logical_map[i] = -1;
182 __cpu_number_map[boot_cpu_id] = 0;
183 __cpu_logical_map[0] = boot_cpu_id;
184 current_thread_info()->cpu = boot_cpu_id;
185 smp_store_cpu_info(boot_cpu_id);
186 smp_setup_percpu_timer(); 162 smp_setup_percpu_timer();
187 local_flush_cache_all(); 163 local_flush_cache_all();
188 if (cpu_find_by_instance(1, NULL, NULL)) 164}
189 return; /* Not an MP box. */ 165
190 SMP_PRINTK(("Iterating over CPUs\n")); 166int smp4d_boot_one_cpu(int i)
191 for(i = 0; i < NR_CPUS; i++) { 167{
192 if(i == boot_cpu_id)
193 continue;
194
195 if (cpu_isset(i, cpu_present_map)) {
196 extern unsigned long sun4d_cpu_startup; 168 extern unsigned long sun4d_cpu_startup;
197 unsigned long *entry = &sun4d_cpu_startup; 169 unsigned long *entry = &sun4d_cpu_startup;
198 struct task_struct *p; 170 struct task_struct *p;
199 int timeout; 171 int timeout;
200 int no; 172 int cpu_node;
201 173
174 cpu_find_by_instance(i, &cpu_node,NULL);
202 /* Cook up an idler for this guy. */ 175 /* Cook up an idler for this guy. */
203 p = fork_idle(i); 176 p = fork_idle(i);
204 cpucount++;
205 current_set[i] = task_thread_info(p); 177 current_set[i] = task_thread_info(p);
206 for (no = 0; !cpu_find_by_instance(no, NULL, &mid)
207 && mid != i; no++) ;
208 178
209 /* 179 /*
210 * Initialize the contexts table 180 * Initialize the contexts table
@@ -216,9 +186,9 @@ void __init smp4d_boot_cpus(void)
216 smp_penguin_ctable.reg_size = 0; 186 smp_penguin_ctable.reg_size = 0;
217 187
218 /* whirrr, whirrr, whirrrrrrrrr... */ 188 /* whirrr, whirrr, whirrrrrrrrr... */
219 SMP_PRINTK(("Starting CPU %d at %p task %d node %08x\n", i, entry, cpucount, cpu_data(no).prom_node)); 189 SMP_PRINTK(("Starting CPU %d at %p \n", i, entry));
220 local_flush_cache_all(); 190 local_flush_cache_all();
221 prom_startcpu(cpu_data(no).prom_node, 191 prom_startcpu(cpu_node,
222 &smp_penguin_ctable, 0, (char *)entry); 192 &smp_penguin_ctable, 0, (char *)entry);
223 193
224 SMP_PRINTK(("prom_startcpu returned :)\n")); 194 SMP_PRINTK(("prom_startcpu returned :)\n"));
@@ -230,39 +200,30 @@ void __init smp4d_boot_cpus(void)
230 udelay(200); 200 udelay(200);
231 } 201 }
232 202
233 if(cpu_callin_map[i]) { 203 if (!(cpu_callin_map[i])) {
234 /* Another "Red Snapper". */ 204 printk("Processor %d is stuck.\n", i);
235 __cpu_number_map[i] = cpucount; 205 return -ENODEV;
236 __cpu_logical_map[cpucount] = i; 206
237 } else {
238 cpucount--;
239 printk("Processor %d is stuck.\n", i);
240 }
241 }
242 if(!(cpu_callin_map[i])) {
243 cpu_clear(i, cpu_present_map);
244 __cpu_number_map[i] = -1;
245 }
246 } 207 }
247 local_flush_cache_all(); 208 local_flush_cache_all();
248 if(cpucount == 0) { 209 return 0;
249 printk("Error: only one Processor found.\n"); 210}
250 cpu_present_map = cpumask_of_cpu(hard_smp4d_processor_id()); 211
251 } else { 212void __init smp4d_smp_done(void)
252 unsigned long bogosum = 0; 213{
253 214 int i, first;
254 for_each_present_cpu(i) { 215 int *prev;
255 bogosum += cpu_data(i).udelay_val; 216
256 smp_highest_cpu = i; 217 /* setup cpu list for irq rotation */
218 first = 0;
219 prev = &first;
220 for (i = 0; i < NR_CPUS; i++)
221 if (cpu_online(i)) {
222 *prev = i;
223 prev = &cpu_data(i).next;
257 } 224 }
258 SMP_PRINTK(("Total of %d Processors activated (%lu.%02lu BogoMIPS).\n", cpucount + 1, bogosum/(500000/HZ), (bogosum/(5000/HZ))%100)); 225 *prev = first;
259 printk("Total of %d Processors activated (%lu.%02lu BogoMIPS).\n", 226 local_flush_cache_all();
260 cpucount + 1,
261 bogosum/(500000/HZ),
262 (bogosum/(5000/HZ))%100);
263 smp_activated = 1;
264 smp_num_cpus = cpucount + 1;
265 }
266 227
267 /* Free unneeded trap tables */ 228 /* Free unneeded trap tables */
268 ClearPageReserved(virt_to_page(trapbase_cpu1)); 229 ClearPageReserved(virt_to_page(trapbase_cpu1));
@@ -334,7 +295,7 @@ void smp4d_cross_call(smpfunc_t func, unsigned long arg1, unsigned long arg2,
334 register int i; 295 register int i;
335 296
336 mask = cpumask_of_cpu(hard_smp4d_processor_id()); 297 mask = cpumask_of_cpu(hard_smp4d_processor_id());
337 cpus_andnot(mask, cpu_present_map, mask); 298 cpus_andnot(mask, cpu_online_map, mask);
338 for(i = 0; i <= high; i++) { 299 for(i = 0; i <= high; i++) {
339 if (cpu_isset(i, mask)) { 300 if (cpu_isset(i, mask)) {
340 ccall_info.processors_in[i] = 0; 301 ccall_info.processors_in[i] = 0;
diff --git a/arch/sparc/kernel/sys_sparc.c b/arch/sparc/kernel/sys_sparc.c
index 0cdfc9d294b4..a41c8a5c2007 100644
--- a/arch/sparc/kernel/sys_sparc.c
+++ b/arch/sparc/kernel/sys_sparc.c
@@ -465,21 +465,21 @@ sys_rt_sigaction(int sig,
465 465
466asmlinkage int sys_getdomainname(char __user *name, int len) 466asmlinkage int sys_getdomainname(char __user *name, int len)
467{ 467{
468 int nlen; 468 int nlen, err;
469 int err = -EFAULT;
470 469
470 if (len < 0 || len > __NEW_UTS_LEN)
471 return -EINVAL;
472
471 down_read(&uts_sem); 473 down_read(&uts_sem);
472 474
473 nlen = strlen(system_utsname.domainname) + 1; 475 nlen = strlen(system_utsname.domainname) + 1;
474
475 if (nlen < len) 476 if (nlen < len)
476 len = nlen; 477 len = nlen;
477 if (len > __NEW_UTS_LEN) 478
478 goto done; 479 err = -EFAULT;
479 if (copy_to_user(name, system_utsname.domainname, len)) 480 if (!copy_to_user(name, system_utsname.domainname, len))
480 goto done; 481 err = 0;
481 err = 0; 482
482done:
483 up_read(&uts_sem); 483 up_read(&uts_sem);
484 return err; 484 return err;
485} 485}
diff --git a/arch/sparc/mm/io-unit.c b/arch/sparc/mm/io-unit.c
index 42c1c700c0a7..2bb1309003dd 100644
--- a/arch/sparc/mm/io-unit.c
+++ b/arch/sparc/mm/io-unit.c
@@ -64,6 +64,7 @@ iounit_init(int sbi_node, int io_node, struct sbus_bus *sbus)
64 64
65 sbus->iommu = (struct iommu_struct *)iounit; 65 sbus->iommu = (struct iommu_struct *)iounit;
66 iounit->page_table = xpt; 66 iounit->page_table = xpt;
67 spin_lock_init(&iounit->lock);
67 68
68 for (xptend = iounit->page_table + (16 * PAGE_SIZE) / sizeof(iopte_t); 69 for (xptend = iounit->page_table + (16 * PAGE_SIZE) / sizeof(iopte_t);
69 xpt < xptend;) 70 xpt < xptend;)
diff --git a/arch/sparc/prom/tree.c b/arch/sparc/prom/tree.c
index 2bf03ee8cde5..5ec246573a98 100644
--- a/arch/sparc/prom/tree.c
+++ b/arch/sparc/prom/tree.c
@@ -205,24 +205,6 @@ int prom_searchsiblings(int node_start, char *nodename)
205 return 0; 205 return 0;
206} 206}
207 207
208/* Gets name in the form prom v2+ uses it (name@x,yyyyy or name (if no reg)) */
209int prom_getname (int node, char *buffer, int len)
210{
211 int i;
212 struct linux_prom_registers reg[PROMREG_MAX];
213
214 i = prom_getproperty (node, "name", buffer, len);
215 if (i <= 0) return -1;
216 buffer [i] = 0;
217 len -= i;
218 i = prom_getproperty (node, "reg", (char *)reg, sizeof (reg));
219 if (i <= 0) return 0;
220 if (len < 11) return -1;
221 buffer = strchr (buffer, 0);
222 sprintf (buffer, "@%x,%x", reg[0].which_io, (uint)reg[0].phys_addr);
223 return 0;
224}
225
226/* Interal version of nextprop that does not alter return values. */ 208/* Interal version of nextprop that does not alter return values. */
227char * __prom_nextprop(int node, char * oprop) 209char * __prom_nextprop(int node, char * oprop)
228{ 210{
diff --git a/arch/sparc64/defconfig b/arch/sparc64/defconfig
index 38353621069e..43d9229fca07 100644
--- a/arch/sparc64/defconfig
+++ b/arch/sparc64/defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.18-rc1 3# Linux kernel version: 2.6.18-rc2
4# Wed Jul 12 14:00:58 2006 4# Fri Jul 21 14:19:24 2006
5# 5#
6CONFIG_SPARC=y 6CONFIG_SPARC=y
7CONFIG_SPARC64=y 7CONFIG_SPARC64=y
@@ -36,6 +36,7 @@ CONFIG_SWAP=y
36CONFIG_SYSVIPC=y 36CONFIG_SYSVIPC=y
37CONFIG_POSIX_MQUEUE=y 37CONFIG_POSIX_MQUEUE=y
38# CONFIG_BSD_PROCESS_ACCT is not set 38# CONFIG_BSD_PROCESS_ACCT is not set
39# CONFIG_TASKSTATS is not set
39CONFIG_SYSCTL=y 40CONFIG_SYSCTL=y
40# CONFIG_AUDIT is not set 41# CONFIG_AUDIT is not set
41# CONFIG_IKCONFIG is not set 42# CONFIG_IKCONFIG is not set
@@ -1120,7 +1121,7 @@ CONFIG_USB_HIDDEV=y
1120# CONFIG_USB_LEGOTOWER is not set 1121# CONFIG_USB_LEGOTOWER is not set
1121# CONFIG_USB_LCD is not set 1122# CONFIG_USB_LCD is not set
1122# CONFIG_USB_LED is not set 1123# CONFIG_USB_LED is not set
1123# CONFIG_USB_CY7C63 is not set 1124# CONFIG_USB_CYPRESS_CY7C63 is not set
1124# CONFIG_USB_CYTHERM is not set 1125# CONFIG_USB_CYTHERM is not set
1125# CONFIG_USB_PHIDGETKIT is not set 1126# CONFIG_USB_PHIDGETKIT is not set
1126# CONFIG_USB_PHIDGETSERVO is not set 1127# CONFIG_USB_PHIDGETSERVO is not set
@@ -1279,7 +1280,6 @@ CONFIG_RAMFS=y
1279# CONFIG_NFSD is not set 1280# CONFIG_NFSD is not set
1280# CONFIG_SMB_FS is not set 1281# CONFIG_SMB_FS is not set
1281# CONFIG_CIFS is not set 1282# CONFIG_CIFS is not set
1282# CONFIG_CIFS_DEBUG2 is not set
1283# CONFIG_NCP_FS is not set 1283# CONFIG_NCP_FS is not set
1284# CONFIG_CODA_FS is not set 1284# CONFIG_CODA_FS is not set
1285# CONFIG_AFS_FS is not set 1285# CONFIG_AFS_FS is not set
diff --git a/arch/sparc64/kernel/devices.c b/arch/sparc64/kernel/devices.c
index f8ef2f2b9b37..ec10f7edcf86 100644
--- a/arch/sparc64/kernel/devices.c
+++ b/arch/sparc64/kernel/devices.c
@@ -66,9 +66,6 @@ static int check_cpu_node(struct device_node *dp, int *cur_inst,
66 void *compare_arg, 66 void *compare_arg,
67 struct device_node **dev_node, int *mid) 67 struct device_node **dev_node, int *mid)
68{ 68{
69 if (strcmp(dp->type, "cpu"))
70 return -ENODEV;
71
72 if (!compare(dp, *cur_inst, compare_arg)) { 69 if (!compare(dp, *cur_inst, compare_arg)) {
73 if (dev_node) 70 if (dev_node)
74 *dev_node = dp; 71 *dev_node = dp;
diff --git a/arch/sparc64/kernel/of_device.c b/arch/sparc64/kernel/of_device.c
index 7064cee290ae..238bbf6de07d 100644
--- a/arch/sparc64/kernel/of_device.c
+++ b/arch/sparc64/kernel/of_device.c
@@ -542,9 +542,17 @@ static void __init build_device_resources(struct of_device *op,
542 /* Convert to num-cells. */ 542 /* Convert to num-cells. */
543 num_reg /= 4; 543 num_reg /= 4;
544 544
545 /* Conver to num-entries. */ 545 /* Convert to num-entries. */
546 num_reg /= na + ns; 546 num_reg /= na + ns;
547 547
548 /* Prevent overruning the op->resources[] array. */
549 if (num_reg > PROMREG_MAX) {
550 printk(KERN_WARNING "%s: Too many regs (%d), "
551 "limiting to %d.\n",
552 op->node->full_name, num_reg, PROMREG_MAX);
553 num_reg = PROMREG_MAX;
554 }
555
548 for (index = 0; index < num_reg; index++) { 556 for (index = 0; index < num_reg; index++) {
549 struct resource *r = &op->resource[index]; 557 struct resource *r = &op->resource[index];
550 u32 addr[OF_MAX_ADDR_CELLS]; 558 u32 addr[OF_MAX_ADDR_CELLS];
@@ -650,8 +658,22 @@ apply_interrupt_map(struct device_node *dp, struct device_node *pp,
650 next: 658 next:
651 imap += (na + 3); 659 imap += (na + 3);
652 } 660 }
653 if (i == imlen) 661 if (i == imlen) {
662 /* Psycho and Sabre PCI controllers can have 'interrupt-map'
663 * properties that do not include the on-board device
664 * interrupts. Instead, the device's 'interrupts' property
665 * is already a fully specified INO value.
666 *
667 * Handle this by deciding that, if we didn't get a
668 * match in the parent's 'interrupt-map', and the
669 * parent is an IRQ translater, then use the parent as
670 * our IRQ controller.
671 */
672 if (pp->irq_trans)
673 return pp;
674
654 return NULL; 675 return NULL;
676 }
655 677
656 *irq_p = irq; 678 *irq_p = irq;
657 cp = of_find_node_by_phandle(handle); 679 cp = of_find_node_by_phandle(handle);
@@ -803,6 +825,14 @@ static struct of_device * __init scan_one_device(struct device_node *dp,
803 op->num_irqs = 0; 825 op->num_irqs = 0;
804 } 826 }
805 827
828 /* Prevent overruning the op->irqs[] array. */
829 if (op->num_irqs > PROMINTR_MAX) {
830 printk(KERN_WARNING "%s: Too many irqs (%d), "
831 "limiting to %d.\n",
832 dp->full_name, op->num_irqs, PROMINTR_MAX);
833 op->num_irqs = PROMINTR_MAX;
834 }
835
806 build_device_resources(op, parent); 836 build_device_resources(op, parent);
807 for (i = 0; i < op->num_irqs; i++) 837 for (i = 0; i < op->num_irqs; i++)
808 op->irqs[i] = build_one_device_irq(op, parent, op->irqs[i]); 838 op->irqs[i] = build_one_device_irq(op, parent, op->irqs[i]);
diff --git a/arch/sparc64/kernel/prom.c b/arch/sparc64/kernel/prom.c
index c86007a2aa3f..5cc5ab63293f 100644
--- a/arch/sparc64/kernel/prom.c
+++ b/arch/sparc64/kernel/prom.c
@@ -344,10 +344,12 @@ static unsigned long __psycho_onboard_imap_off[] = {
344/*0x2f*/ PSYCHO_IMAP_CE, 344/*0x2f*/ PSYCHO_IMAP_CE,
345/*0x30*/ PSYCHO_IMAP_A_ERR, 345/*0x30*/ PSYCHO_IMAP_A_ERR,
346/*0x31*/ PSYCHO_IMAP_B_ERR, 346/*0x31*/ PSYCHO_IMAP_B_ERR,
347/*0x32*/ PSYCHO_IMAP_PMGMT 347/*0x32*/ PSYCHO_IMAP_PMGMT,
348/*0x33*/ PSYCHO_IMAP_GFX,
349/*0x34*/ PSYCHO_IMAP_EUPA,
348}; 350};
349#define PSYCHO_ONBOARD_IRQ_BASE 0x20 351#define PSYCHO_ONBOARD_IRQ_BASE 0x20
350#define PSYCHO_ONBOARD_IRQ_LAST 0x32 352#define PSYCHO_ONBOARD_IRQ_LAST 0x34
351#define psycho_onboard_imap_offset(__ino) \ 353#define psycho_onboard_imap_offset(__ino) \
352 __psycho_onboard_imap_off[(__ino) - PSYCHO_ONBOARD_IRQ_BASE] 354 __psycho_onboard_imap_off[(__ino) - PSYCHO_ONBOARD_IRQ_BASE]
353 355
@@ -529,6 +531,10 @@ static unsigned long __sabre_onboard_imap_off[] = {
529/*0x2e*/ SABRE_IMAP_UE, 531/*0x2e*/ SABRE_IMAP_UE,
530/*0x2f*/ SABRE_IMAP_CE, 532/*0x2f*/ SABRE_IMAP_CE,
531/*0x30*/ SABRE_IMAP_PCIERR, 533/*0x30*/ SABRE_IMAP_PCIERR,
534/*0x31*/ 0 /* reserved */,
535/*0x32*/ 0 /* reserved */,
536/*0x33*/ SABRE_IMAP_GFX,
537/*0x34*/ SABRE_IMAP_EUPA,
532}; 538};
533#define SABRE_ONBOARD_IRQ_BASE 0x20 539#define SABRE_ONBOARD_IRQ_BASE 0x20
534#define SABRE_ONBOARD_IRQ_LAST 0x30 540#define SABRE_ONBOARD_IRQ_LAST 0x30
@@ -895,6 +901,8 @@ static unsigned long sysio_irq_offsets[] = {
895 SYSIO_IMAP_CE, 901 SYSIO_IMAP_CE,
896 SYSIO_IMAP_SBERR, 902 SYSIO_IMAP_SBERR,
897 SYSIO_IMAP_PMGMT, 903 SYSIO_IMAP_PMGMT,
904 SYSIO_IMAP_GFX,
905 SYSIO_IMAP_EUPA,
898}; 906};
899 907
900#undef bogon 908#undef bogon
diff --git a/arch/sparc64/kernel/sparc64_ksyms.c b/arch/sparc64/kernel/sparc64_ksyms.c
index 237524d87cab..beffc82a1e85 100644
--- a/arch/sparc64/kernel/sparc64_ksyms.c
+++ b/arch/sparc64/kernel/sparc64_ksyms.c
@@ -254,7 +254,6 @@ EXPORT_SYMBOL(prom_getproperty);
254EXPORT_SYMBOL(prom_node_has_property); 254EXPORT_SYMBOL(prom_node_has_property);
255EXPORT_SYMBOL(prom_setprop); 255EXPORT_SYMBOL(prom_setprop);
256EXPORT_SYMBOL(saved_command_line); 256EXPORT_SYMBOL(saved_command_line);
257EXPORT_SYMBOL(prom_getname);
258EXPORT_SYMBOL(prom_finddevice); 257EXPORT_SYMBOL(prom_finddevice);
259EXPORT_SYMBOL(prom_feval); 258EXPORT_SYMBOL(prom_feval);
260EXPORT_SYMBOL(prom_getbool); 259EXPORT_SYMBOL(prom_getbool);
diff --git a/arch/sparc64/kernel/sys_sparc.c b/arch/sparc64/kernel/sys_sparc.c
index 51c056df528e..054d0abdb7ee 100644
--- a/arch/sparc64/kernel/sys_sparc.c
+++ b/arch/sparc64/kernel/sys_sparc.c
@@ -701,21 +701,21 @@ extern void check_pending(int signum);
701 701
702asmlinkage long sys_getdomainname(char __user *name, int len) 702asmlinkage long sys_getdomainname(char __user *name, int len)
703{ 703{
704 int nlen; 704 int nlen, err;
705 int err = -EFAULT; 705
706 if (len < 0 || len > __NEW_UTS_LEN)
707 return -EINVAL;
706 708
707 down_read(&uts_sem); 709 down_read(&uts_sem);
708 710
709 nlen = strlen(system_utsname.domainname) + 1; 711 nlen = strlen(system_utsname.domainname) + 1;
710
711 if (nlen < len) 712 if (nlen < len)
712 len = nlen; 713 len = nlen;
713 if (len > __NEW_UTS_LEN) 714
714 goto done; 715 err = -EFAULT;
715 if (copy_to_user(name, system_utsname.domainname, len)) 716 if (!copy_to_user(name, system_utsname.domainname, len))
716 goto done; 717 err = 0;
717 err = 0; 718
718done:
719 up_read(&uts_sem); 719 up_read(&uts_sem);
720 return err; 720 return err;
721} 721}
diff --git a/arch/sparc64/prom/tree.c b/arch/sparc64/prom/tree.c
index 49075abd7cbc..500f05e2cfcb 100644
--- a/arch/sparc64/prom/tree.c
+++ b/arch/sparc64/prom/tree.c
@@ -193,91 +193,6 @@ prom_searchsiblings(int node_start, const char *nodename)
193 return 0; 193 return 0;
194} 194}
195 195
196/* Gets name in the {name@x,yyyyy|name (if no reg)} form */
197int
198prom_getname (int node, char *buffer, int len)
199{
200 int i, sbus = 0;
201 int pci = 0, ebus = 0, ide = 0;
202 struct linux_prom_registers *reg;
203 struct linux_prom64_registers reg64[PROMREG_MAX];
204
205 for (sbus = prom_getparent (node); sbus; sbus = prom_getparent (sbus)) {
206 i = prom_getproperty (sbus, "name", buffer, len);
207 if (i > 0) {
208 buffer [i] = 0;
209 if (!strcmp (buffer, "sbus"))
210 goto getit;
211 }
212 }
213 if ((pci = prom_getparent (node))) {
214 i = prom_getproperty (pci, "name", buffer, len);
215 if (i > 0) {
216 buffer [i] = 0;
217 if (!strcmp (buffer, "pci"))
218 goto getit;
219 }
220 pci = 0;
221 }
222 if ((ebus = prom_getparent (node))) {
223 i = prom_getproperty (ebus, "name", buffer, len);
224 if (i > 0) {
225 buffer[i] = 0;
226 if (!strcmp (buffer, "ebus"))
227 goto getit;
228 }
229 ebus = 0;
230 }
231 if ((ide = prom_getparent (node))) {
232 i = prom_getproperty (ide, "name", buffer, len);
233 if (i > 0) {
234 buffer [i] = 0;
235 if (!strcmp (buffer, "ide"))
236 goto getit;
237 }
238 ide = 0;
239 }
240getit:
241 i = prom_getproperty (node, "name", buffer, len);
242 if (i <= 0) {
243 buffer [0] = 0;
244 return -1;
245 }
246 buffer [i] = 0;
247 len -= i;
248 i = prom_getproperty (node, "reg", (char *)reg64, sizeof (reg64));
249 if (i <= 0) return 0;
250 if (len < 16) return -1;
251 buffer = strchr (buffer, 0);
252 if (sbus) {
253 reg = (struct linux_prom_registers *)reg64;
254 sprintf (buffer, "@%x,%x", reg[0].which_io, (uint)reg[0].phys_addr);
255 } else if (pci) {
256 int dev, fn;
257 reg = (struct linux_prom_registers *)reg64;
258 fn = (reg[0].which_io >> 8) & 0x07;
259 dev = (reg[0].which_io >> 11) & 0x1f;
260 if (fn)
261 sprintf (buffer, "@%x,%x", dev, fn);
262 else
263 sprintf (buffer, "@%x", dev);
264 } else if (ebus) {
265 reg = (struct linux_prom_registers *)reg64;
266 sprintf (buffer, "@%x,%x", reg[0].which_io, reg[0].phys_addr);
267 } else if (ide) {
268 reg = (struct linux_prom_registers *)reg64;
269 sprintf (buffer, "@%x,%x", reg[0].which_io, reg[0].phys_addr);
270 } else if (i == 4) { /* Happens on 8042's children on Ultra/PCI. */
271 reg = (struct linux_prom_registers *)reg64;
272 sprintf (buffer, "@%x", reg[0].which_io);
273 } else {
274 sprintf (buffer, "@%x,%x",
275 (unsigned int)(reg64[0].phys_addr >> 36),
276 (unsigned int)(reg64[0].phys_addr));
277 }
278 return 0;
279}
280
281/* Return the first property type for node 'node'. 196/* Return the first property type for node 'node'.
282 * buffer should be at least 32B in length 197 * buffer should be at least 32B in length
283 */ 198 */