aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/sparc64/kernel/pci_common.c4
-rw-r--r--arch/sparc64/kernel/prom.c3
-rw-r--r--arch/sparc64/kernel/smp.c2
-rw-r--r--arch/sparc64/kernel/vio.c29
-rw-r--r--arch/sparc64/lib/NGmemcpy.S8
5 files changed, 37 insertions, 9 deletions
diff --git a/arch/sparc64/kernel/pci_common.c b/arch/sparc64/kernel/pci_common.c
index 2f61c4b12596..c76bfbb7da08 100644
--- a/arch/sparc64/kernel/pci_common.c
+++ b/arch/sparc64/kernel/pci_common.c
@@ -264,7 +264,7 @@ static int sun4v_read_pci_cfg(struct pci_bus *bus_dev, unsigned int devfn,
264 unsigned int func = PCI_FUNC(devfn); 264 unsigned int func = PCI_FUNC(devfn);
265 unsigned long ret; 265 unsigned long ret;
266 266
267 if (bus_dev == pbm->pci_bus && devfn == 0x00) 267 if (!bus && devfn == 0x00)
268 return pci_host_bridge_read_pci_cfg(bus_dev, devfn, where, 268 return pci_host_bridge_read_pci_cfg(bus_dev, devfn, where,
269 size, value); 269 size, value);
270 if (config_out_of_range(pbm, bus, devfn, where)) { 270 if (config_out_of_range(pbm, bus, devfn, where)) {
@@ -300,7 +300,7 @@ static int sun4v_write_pci_cfg(struct pci_bus *bus_dev, unsigned int devfn,
300 unsigned int func = PCI_FUNC(devfn); 300 unsigned int func = PCI_FUNC(devfn);
301 unsigned long ret; 301 unsigned long ret;
302 302
303 if (bus_dev == pbm->pci_bus && devfn == 0x00) 303 if (!bus && devfn == 0x00)
304 return pci_host_bridge_write_pci_cfg(bus_dev, devfn, where, 304 return pci_host_bridge_write_pci_cfg(bus_dev, devfn, where,
305 size, value); 305 size, value);
306 if (config_out_of_range(pbm, bus, devfn, where)) { 306 if (config_out_of_range(pbm, bus, devfn, where)) {
diff --git a/arch/sparc64/kernel/prom.c b/arch/sparc64/kernel/prom.c
index 0614dff63d7c..a246e962e5a7 100644
--- a/arch/sparc64/kernel/prom.c
+++ b/arch/sparc64/kernel/prom.c
@@ -1046,7 +1046,8 @@ static void __init irq_trans_init(struct device_node *dp)
1046 if (!strcmp(dp->name, "fhc") && 1046 if (!strcmp(dp->name, "fhc") &&
1047 !strcmp(dp->parent->name, "central")) 1047 !strcmp(dp->parent->name, "central"))
1048 return central_irq_trans_init(dp); 1048 return central_irq_trans_init(dp);
1049 if (!strcmp(dp->name, "virtual-devices")) 1049 if (!strcmp(dp->name, "virtual-devices") ||
1050 !strcmp(dp->name, "niu"))
1050 return sun4v_vdev_irq_trans_init(dp); 1051 return sun4v_vdev_irq_trans_init(dp);
1051} 1052}
1052 1053
diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c
index b84c49e3697c..c73b7a48b036 100644
--- a/arch/sparc64/kernel/smp.c
+++ b/arch/sparc64/kernel/smp.c
@@ -353,6 +353,8 @@ static int __devinit smp_boot_one_cpu(unsigned int cpu)
353 int timeout, ret; 353 int timeout, ret;
354 354
355 p = fork_idle(cpu); 355 p = fork_idle(cpu);
356 if (IS_ERR(p))
357 return PTR_ERR(p);
356 callin_flag = 0; 358 callin_flag = 0;
357 cpu_new_thread = task_thread_info(p); 359 cpu_new_thread = task_thread_info(p);
358 360
diff --git a/arch/sparc64/kernel/vio.c b/arch/sparc64/kernel/vio.c
index 1550ac5673da..0c1ee619d814 100644
--- a/arch/sparc64/kernel/vio.c
+++ b/arch/sparc64/kernel/vio.c
@@ -292,7 +292,7 @@ static struct vio_dev *vio_create_one(struct mdesc_handle *hp, u64 mp,
292 } 292 }
293 vdev->dp = dp; 293 vdev->dp = dp;
294 294
295 printk(KERN_ERR "VIO: Adding device %s\n", vdev->dev.bus_id); 295 printk(KERN_INFO "VIO: Adding device %s\n", vdev->dev.bus_id);
296 296
297 err = device_register(&vdev->dev); 297 err = device_register(&vdev->dev);
298 if (err) { 298 if (err) {
@@ -342,8 +342,33 @@ static struct mdesc_notifier_client vio_device_notifier = {
342 .node_name = "virtual-device-port", 342 .node_name = "virtual-device-port",
343}; 343};
344 344
345/* We are only interested in domain service ports under the
346 * "domain-services" node. On control nodes there is another port
347 * under "openboot" that we should not mess with as aparently that is
348 * reserved exclusively for OBP use.
349 */
350static void vio_add_ds(struct mdesc_handle *hp, u64 node)
351{
352 int found;
353 u64 a;
354
355 found = 0;
356 mdesc_for_each_arc(a, hp, node, MDESC_ARC_TYPE_BACK) {
357 u64 target = mdesc_arc_target(hp, a);
358 const char *name = mdesc_node_name(hp, target);
359
360 if (!strcmp(name, "domain-services")) {
361 found = 1;
362 break;
363 }
364 }
365
366 if (found)
367 (void) vio_create_one(hp, node, &root_vdev->dev);
368}
369
345static struct mdesc_notifier_client vio_ds_notifier = { 370static struct mdesc_notifier_client vio_ds_notifier = {
346 .add = vio_add, 371 .add = vio_add_ds,
347 .remove = vio_remove, 372 .remove = vio_remove,
348 .node_name = "domain-services-port", 373 .node_name = "domain-services-port",
349}; 374};
diff --git a/arch/sparc64/lib/NGmemcpy.S b/arch/sparc64/lib/NGmemcpy.S
index 605cb3f09900..96a14caf6966 100644
--- a/arch/sparc64/lib/NGmemcpy.S
+++ b/arch/sparc64/lib/NGmemcpy.S
@@ -321,11 +321,11 @@ FUNC_NAME: /* %i0=dst, %i1=src, %i2=len */
321 andn %i2, 0xf, %i4 321 andn %i2, 0xf, %i4
322 and %i2, 0xf, %i2 322 and %i2, 0xf, %i2
3231: subcc %i4, 0x10, %i4 3231: subcc %i4, 0x10, %i4
324 EX_LD(LOAD(ldx, %i1, %i5)) 324 EX_LD(LOAD(ldx, %i1, %o4))
325 add %i1, 0x08, %i1 325 add %i1, 0x08, %i1
326 EX_LD(LOAD(ldx, %i1, %g1)) 326 EX_LD(LOAD(ldx, %i1, %g1))
327 sub %i1, 0x08, %i1 327 sub %i1, 0x08, %i1
328 EX_ST(STORE(stx, %i5, %i1 + %i3)) 328 EX_ST(STORE(stx, %o4, %i1 + %i3))
329 add %i1, 0x8, %i1 329 add %i1, 0x8, %i1
330 EX_ST(STORE(stx, %g1, %i1 + %i3)) 330 EX_ST(STORE(stx, %g1, %i1 + %i3))
331 bgu,pt %XCC, 1b 331 bgu,pt %XCC, 1b
@@ -334,8 +334,8 @@ FUNC_NAME: /* %i0=dst, %i1=src, %i2=len */
334 be,pt %XCC, 1f 334 be,pt %XCC, 1f
335 nop 335 nop
336 sub %i2, 0x8, %i2 336 sub %i2, 0x8, %i2
337 EX_LD(LOAD(ldx, %i1, %i5)) 337 EX_LD(LOAD(ldx, %i1, %o4))
338 EX_ST(STORE(stx, %i5, %i1 + %i3)) 338 EX_ST(STORE(stx, %o4, %i1 + %i3))
339 add %i1, 0x8, %i1 339 add %i1, 0x8, %i1
3401: andcc %i2, 0x4, %g0 3401: andcc %i2, 0x4, %g0
341 be,pt %XCC, 1f 341 be,pt %XCC, 1f