diff options
Diffstat (limited to 'arch/sparc64/kernel')
-rw-r--r-- | arch/sparc64/kernel/central.c | 4 | ||||
-rw-r--r-- | arch/sparc64/kernel/ebus.c | 8 | ||||
-rw-r--r-- | arch/sparc64/kernel/entry.S | 3 | ||||
-rw-r--r-- | arch/sparc64/kernel/isa.c | 8 | ||||
-rw-r--r-- | arch/sparc64/kernel/of_device.c | 42 | ||||
-rw-r--r-- | arch/sparc64/kernel/pci.c | 9 | ||||
-rw-r--r-- | arch/sparc64/kernel/pci_common.c | 29 | ||||
-rw-r--r-- | arch/sparc64/kernel/pci_iommu.c | 2 | ||||
-rw-r--r-- | arch/sparc64/kernel/pci_sabre.c | 23 | ||||
-rw-r--r-- | arch/sparc64/kernel/prom.c | 51 | ||||
-rw-r--r-- | arch/sparc64/kernel/setup.c | 2 | ||||
-rw-r--r-- | arch/sparc64/kernel/systbls.S | 8 | ||||
-rw-r--r-- | arch/sparc64/kernel/traps.c | 8 | ||||
-rw-r--r-- | arch/sparc64/kernel/vmlinux.lds.S | 8 |
14 files changed, 120 insertions, 85 deletions
diff --git a/arch/sparc64/kernel/central.c b/arch/sparc64/kernel/central.c index b66336db00ee..e724c54af029 100644 --- a/arch/sparc64/kernel/central.c +++ b/arch/sparc64/kernel/central.c | |||
@@ -126,6 +126,10 @@ static void probe_other_fhcs(void) | |||
126 | int board; | 126 | int board; |
127 | u32 tmp; | 127 | u32 tmp; |
128 | 128 | ||
129 | if (dp->parent && | ||
130 | dp->parent->parent != NULL) | ||
131 | continue; | ||
132 | |||
129 | fhc = (struct linux_fhc *) | 133 | fhc = (struct linux_fhc *) |
130 | central_alloc_bootmem(sizeof(struct linux_fhc)); | 134 | central_alloc_bootmem(sizeof(struct linux_fhc)); |
131 | if (fhc == NULL) | 135 | if (fhc == NULL) |
diff --git a/arch/sparc64/kernel/ebus.c b/arch/sparc64/kernel/ebus.c index 2df25c2b4071..35bf895fdeee 100644 --- a/arch/sparc64/kernel/ebus.c +++ b/arch/sparc64/kernel/ebus.c | |||
@@ -389,12 +389,12 @@ static void __init fill_ebus_device(struct device_node *dp, struct linux_ebus_de | |||
389 | dev->ofdev.node = dp; | 389 | dev->ofdev.node = dp; |
390 | dev->ofdev.dev.parent = &dev->bus->ofdev.dev; | 390 | dev->ofdev.dev.parent = &dev->bus->ofdev.dev; |
391 | dev->ofdev.dev.bus = &ebus_bus_type; | 391 | dev->ofdev.dev.bus = &ebus_bus_type; |
392 | strcpy(dev->ofdev.dev.bus_id, dp->path_component_name); | 392 | sprintf(dev->ofdev.dev.bus_id, "ebus[%08x]", dp->node); |
393 | 393 | ||
394 | /* Register with core */ | 394 | /* Register with core */ |
395 | if (of_device_register(&dev->ofdev) != 0) | 395 | if (of_device_register(&dev->ofdev) != 0) |
396 | printk(KERN_DEBUG "ebus: device registration error for %s!\n", | 396 | printk(KERN_DEBUG "ebus: device registration error for %s!\n", |
397 | dev->ofdev.dev.bus_id); | 397 | dp->path_component_name); |
398 | 398 | ||
399 | dp = dp->child; | 399 | dp = dp->child; |
400 | if (dp) { | 400 | if (dp) { |
@@ -494,12 +494,12 @@ void __init ebus_init(void) | |||
494 | ebus->ofdev.node = dp; | 494 | ebus->ofdev.node = dp; |
495 | ebus->ofdev.dev.parent = &pdev->dev; | 495 | ebus->ofdev.dev.parent = &pdev->dev; |
496 | ebus->ofdev.dev.bus = &ebus_bus_type; | 496 | ebus->ofdev.dev.bus = &ebus_bus_type; |
497 | strcpy(ebus->ofdev.dev.bus_id, dp->path_component_name); | 497 | sprintf(ebus->ofdev.dev.bus_id, "ebus%d", num_ebus); |
498 | 498 | ||
499 | /* Register with core */ | 499 | /* Register with core */ |
500 | if (of_device_register(&ebus->ofdev) != 0) | 500 | if (of_device_register(&ebus->ofdev) != 0) |
501 | printk(KERN_DEBUG "ebus: device registration error for %s!\n", | 501 | printk(KERN_DEBUG "ebus: device registration error for %s!\n", |
502 | ebus->ofdev.dev.bus_id); | 502 | dp->path_component_name); |
503 | 503 | ||
504 | 504 | ||
505 | child = dp->child; | 505 | child = dp->child; |
diff --git a/arch/sparc64/kernel/entry.S b/arch/sparc64/kernel/entry.S index 0aaa35fc5a9c..6f28bec0a9bf 100644 --- a/arch/sparc64/kernel/entry.S +++ b/arch/sparc64/kernel/entry.S | |||
@@ -22,11 +22,10 @@ | |||
22 | #include <asm/auxio.h> | 22 | #include <asm/auxio.h> |
23 | #include <asm/sfafsr.h> | 23 | #include <asm/sfafsr.h> |
24 | #include <asm/pil.h> | 24 | #include <asm/pil.h> |
25 | #include <asm/unistd.h> | ||
25 | 26 | ||
26 | #define curptr g6 | 27 | #define curptr g6 |
27 | 28 | ||
28 | #define NR_SYSCALLS 300 /* Each OS is different... */ | ||
29 | |||
30 | .text | 29 | .text |
31 | .align 32 | 30 | .align 32 |
32 | 31 | ||
diff --git a/arch/sparc64/kernel/isa.c b/arch/sparc64/kernel/isa.c index 0f3aec72ef5f..f028e68b23f2 100644 --- a/arch/sparc64/kernel/isa.c +++ b/arch/sparc64/kernel/isa.c | |||
@@ -115,12 +115,12 @@ static void __init isa_fill_devices(struct sparc_isa_bridge *isa_br) | |||
115 | isa_dev->ofdev.node = dp; | 115 | isa_dev->ofdev.node = dp; |
116 | isa_dev->ofdev.dev.parent = &isa_br->ofdev.dev; | 116 | isa_dev->ofdev.dev.parent = &isa_br->ofdev.dev; |
117 | isa_dev->ofdev.dev.bus = &isa_bus_type; | 117 | isa_dev->ofdev.dev.bus = &isa_bus_type; |
118 | strcpy(isa_dev->ofdev.dev.bus_id, dp->path_component_name); | 118 | sprintf(isa_dev->ofdev.dev.bus_id, "isa[%08x]", dp->node); |
119 | 119 | ||
120 | /* Register with core */ | 120 | /* Register with core */ |
121 | if (of_device_register(&isa_dev->ofdev) != 0) { | 121 | if (of_device_register(&isa_dev->ofdev) != 0) { |
122 | printk(KERN_DEBUG "isa: device registration error for %s!\n", | 122 | printk(KERN_DEBUG "isa: device registration error for %s!\n", |
123 | isa_dev->ofdev.dev.bus_id); | 123 | dp->path_component_name); |
124 | kfree(isa_dev); | 124 | kfree(isa_dev); |
125 | goto next_sibling; | 125 | goto next_sibling; |
126 | } | 126 | } |
@@ -191,12 +191,12 @@ void __init isa_init(void) | |||
191 | isa_br->ofdev.node = dp; | 191 | isa_br->ofdev.node = dp; |
192 | isa_br->ofdev.dev.parent = &pdev->dev; | 192 | isa_br->ofdev.dev.parent = &pdev->dev; |
193 | isa_br->ofdev.dev.bus = &isa_bus_type; | 193 | isa_br->ofdev.dev.bus = &isa_bus_type; |
194 | strcpy(isa_br->ofdev.dev.bus_id, dp->path_component_name); | 194 | sprintf(isa_br->ofdev.dev.bus_id, "isa%d", index); |
195 | 195 | ||
196 | /* Register with core */ | 196 | /* Register with core */ |
197 | if (of_device_register(&isa_br->ofdev) != 0) { | 197 | if (of_device_register(&isa_br->ofdev) != 0) { |
198 | printk(KERN_DEBUG "isa: device registration error for %s!\n", | 198 | printk(KERN_DEBUG "isa: device registration error for %s!\n", |
199 | isa_br->ofdev.dev.bus_id); | 199 | dp->path_component_name); |
200 | kfree(isa_br); | 200 | kfree(isa_br); |
201 | return; | 201 | return; |
202 | } | 202 | } |
diff --git a/arch/sparc64/kernel/of_device.c b/arch/sparc64/kernel/of_device.c index d822c7c18e1f..8cc14fc6b6f1 100644 --- a/arch/sparc64/kernel/of_device.c +++ b/arch/sparc64/kernel/of_device.c | |||
@@ -131,8 +131,13 @@ static int of_device_resume(struct device * dev) | |||
131 | void __iomem *of_ioremap(struct resource *res, unsigned long offset, unsigned long size, char *name) | 131 | void __iomem *of_ioremap(struct resource *res, unsigned long offset, unsigned long size, char *name) |
132 | { | 132 | { |
133 | unsigned long ret = res->start + offset; | 133 | unsigned long ret = res->start + offset; |
134 | struct resource *r; | ||
134 | 135 | ||
135 | if (!request_region(ret, size, name)) | 136 | if (res->flags & IORESOURCE_MEM) |
137 | r = request_mem_region(ret, size, name); | ||
138 | else | ||
139 | r = request_region(ret, size, name); | ||
140 | if (!r) | ||
136 | ret = 0; | 141 | ret = 0; |
137 | 142 | ||
138 | return (void __iomem *) ret; | 143 | return (void __iomem *) ret; |
@@ -397,16 +402,22 @@ static void of_bus_sbus_count_cells(struct device_node *child, | |||
397 | *sizec = 1; | 402 | *sizec = 1; |
398 | } | 403 | } |
399 | 404 | ||
400 | static int of_bus_sbus_map(u32 *addr, const u32 *range, int na, int ns, int pna) | 405 | /* |
401 | { | 406 | * FHC/Central bus specific translator. |
402 | return of_bus_default_map(addr, range, na, ns, pna); | 407 | * |
403 | } | 408 | * This is just needed to hard-code the address and size cell |
404 | 409 | * counts. 'fhc' and 'central' nodes lack the #address-cells and | |
405 | static unsigned int of_bus_sbus_get_flags(u32 *addr) | 410 | * #size-cells properties, and if you walk to the root on such |
411 | * Enterprise boxes all you'll get is a #size-cells of 2 which is | ||
412 | * not what we want to use. | ||
413 | */ | ||
414 | static int of_bus_fhc_match(struct device_node *np) | ||
406 | { | 415 | { |
407 | return IORESOURCE_MEM; | 416 | return !strcmp(np->name, "fhc") || |
417 | !strcmp(np->name, "central"); | ||
408 | } | 418 | } |
409 | 419 | ||
420 | #define of_bus_fhc_count_cells of_bus_sbus_count_cells | ||
410 | 421 | ||
411 | /* | 422 | /* |
412 | * Array of bus specific translators | 423 | * Array of bus specific translators |
@@ -428,8 +439,17 @@ static struct of_bus of_busses[] = { | |||
428 | .addr_prop_name = "reg", | 439 | .addr_prop_name = "reg", |
429 | .match = of_bus_sbus_match, | 440 | .match = of_bus_sbus_match, |
430 | .count_cells = of_bus_sbus_count_cells, | 441 | .count_cells = of_bus_sbus_count_cells, |
431 | .map = of_bus_sbus_map, | 442 | .map = of_bus_default_map, |
432 | .get_flags = of_bus_sbus_get_flags, | 443 | .get_flags = of_bus_default_get_flags, |
444 | }, | ||
445 | /* FHC */ | ||
446 | { | ||
447 | .name = "fhc", | ||
448 | .addr_prop_name = "reg", | ||
449 | .match = of_bus_fhc_match, | ||
450 | .count_cells = of_bus_fhc_count_cells, | ||
451 | .map = of_bus_default_map, | ||
452 | .get_flags = of_bus_default_get_flags, | ||
433 | }, | 453 | }, |
434 | /* Default */ | 454 | /* Default */ |
435 | { | 455 | { |
@@ -841,7 +861,7 @@ static struct of_device * __init scan_one_device(struct device_node *dp, | |||
841 | if (!parent) | 861 | if (!parent) |
842 | strcpy(op->dev.bus_id, "root"); | 862 | strcpy(op->dev.bus_id, "root"); |
843 | else | 863 | else |
844 | sprintf(op->dev.bus_id, "%s@%08x", dp->name, dp->node); | 864 | sprintf(op->dev.bus_id, "%08x", dp->node); |
845 | 865 | ||
846 | if (of_device_register(op)) { | 866 | if (of_device_register(op)) { |
847 | printk("%s: Could not register of device.\n", | 867 | printk("%s: Could not register of device.\n", |
diff --git a/arch/sparc64/kernel/pci.c b/arch/sparc64/kernel/pci.c index e02f01b644af..dfc41cd4bb5d 100644 --- a/arch/sparc64/kernel/pci.c +++ b/arch/sparc64/kernel/pci.c | |||
@@ -646,13 +646,4 @@ int pci_domain_nr(struct pci_bus *pbus) | |||
646 | } | 646 | } |
647 | EXPORT_SYMBOL(pci_domain_nr); | 647 | EXPORT_SYMBOL(pci_domain_nr); |
648 | 648 | ||
649 | int pcibios_prep_mwi(struct pci_dev *dev) | ||
650 | { | ||
651 | /* We set correct PCI_CACHE_LINE_SIZE register values for every | ||
652 | * device probed on this platform. So there is nothing to check | ||
653 | * and this always succeeds. | ||
654 | */ | ||
655 | return 0; | ||
656 | } | ||
657 | |||
658 | #endif /* !(CONFIG_PCI) */ | 649 | #endif /* !(CONFIG_PCI) */ |
diff --git a/arch/sparc64/kernel/pci_common.c b/arch/sparc64/kernel/pci_common.c index 7a59cc72c844..827ae30aa497 100644 --- a/arch/sparc64/kernel/pci_common.c +++ b/arch/sparc64/kernel/pci_common.c | |||
@@ -330,19 +330,6 @@ __init get_device_resource(struct linux_prom_pci_registers *ap, | |||
330 | return res; | 330 | return res; |
331 | } | 331 | } |
332 | 332 | ||
333 | static int __init pdev_resource_collisions_expected(struct pci_dev *pdev) | ||
334 | { | ||
335 | if (pdev->vendor != PCI_VENDOR_ID_SUN) | ||
336 | return 0; | ||
337 | |||
338 | if (pdev->device == PCI_DEVICE_ID_SUN_RIO_EBUS || | ||
339 | pdev->device == PCI_DEVICE_ID_SUN_RIO_1394 || | ||
340 | pdev->device == PCI_DEVICE_ID_SUN_RIO_USB) | ||
341 | return 1; | ||
342 | |||
343 | return 0; | ||
344 | } | ||
345 | |||
346 | static void __init pdev_record_assignments(struct pci_pbm_info *pbm, | 333 | static void __init pdev_record_assignments(struct pci_pbm_info *pbm, |
347 | struct pci_dev *pdev) | 334 | struct pci_dev *pdev) |
348 | { | 335 | { |
@@ -400,19 +387,23 @@ static void __init pdev_record_assignments(struct pci_pbm_info *pbm, | |||
400 | pbm->parent->resource_adjust(pdev, res, root); | 387 | pbm->parent->resource_adjust(pdev, res, root); |
401 | 388 | ||
402 | if (request_resource(root, res) < 0) { | 389 | if (request_resource(root, res) < 0) { |
390 | int rnum; | ||
391 | |||
403 | /* OK, there is some conflict. But this is fine | 392 | /* OK, there is some conflict. But this is fine |
404 | * since we'll reassign it in the fixup pass. | 393 | * since we'll reassign it in the fixup pass. |
405 | * | 394 | * |
406 | * We notify the user that OBP made an error if it | 395 | * Do not print the warning for ROM resources |
407 | * is a case we don't expect. | 396 | * as such a conflict is quite common and |
397 | * harmless as the ROM bar is disabled. | ||
408 | */ | 398 | */ |
409 | if (!pdev_resource_collisions_expected(pdev)) { | 399 | rnum = (res - &pdev->resource[0]); |
410 | printk(KERN_ERR "PCI: Address space collision on region %ld " | 400 | if (rnum != PCI_ROM_RESOURCE) |
401 | printk(KERN_ERR "PCI: Resource collision, " | ||
402 | "region %d " | ||
411 | "[%016lx:%016lx] of device %s\n", | 403 | "[%016lx:%016lx] of device %s\n", |
412 | (res - &pdev->resource[0]), | 404 | rnum, |
413 | res->start, res->end, | 405 | res->start, res->end, |
414 | pci_name(pdev)); | 406 | pci_name(pdev)); |
415 | } | ||
416 | } | 407 | } |
417 | } | 408 | } |
418 | } | 409 | } |
diff --git a/arch/sparc64/kernel/pci_iommu.c b/arch/sparc64/kernel/pci_iommu.c index 82e5455134c6..2e7f1427088a 100644 --- a/arch/sparc64/kernel/pci_iommu.c +++ b/arch/sparc64/kernel/pci_iommu.c | |||
@@ -281,7 +281,7 @@ static void pci_4u_free_consistent(struct pci_dev *pdev, size_t size, void *cpu, | |||
281 | 281 | ||
282 | spin_lock_irqsave(&iommu->lock, flags); | 282 | spin_lock_irqsave(&iommu->lock, flags); |
283 | 283 | ||
284 | free_npages(iommu, dvma, npages); | 284 | free_npages(iommu, dvma - iommu->page_table_map_base, npages); |
285 | 285 | ||
286 | spin_unlock_irqrestore(&iommu->lock, flags); | 286 | spin_unlock_irqrestore(&iommu->lock, flags); |
287 | 287 | ||
diff --git a/arch/sparc64/kernel/pci_sabre.c b/arch/sparc64/kernel/pci_sabre.c index 6ec569828c29..94bb681f2323 100644 --- a/arch/sparc64/kernel/pci_sabre.c +++ b/arch/sparc64/kernel/pci_sabre.c | |||
@@ -1196,7 +1196,7 @@ static void pbm_register_toplevel_resources(struct pci_controller_info *p, | |||
1196 | &pbm->mem_space); | 1196 | &pbm->mem_space); |
1197 | } | 1197 | } |
1198 | 1198 | ||
1199 | static void sabre_pbm_init(struct pci_controller_info *p, struct device_node *dp, u32 dma_begin) | 1199 | static void sabre_pbm_init(struct pci_controller_info *p, struct device_node *dp, u32 dma_start, u32 dma_end) |
1200 | { | 1200 | { |
1201 | struct pci_pbm_info *pbm; | 1201 | struct pci_pbm_info *pbm; |
1202 | struct device_node *node; | 1202 | struct device_node *node; |
@@ -1261,6 +1261,8 @@ static void sabre_pbm_init(struct pci_controller_info *p, struct device_node *dp | |||
1261 | node = node->sibling; | 1261 | node = node->sibling; |
1262 | } | 1262 | } |
1263 | if (simbas_found == 0) { | 1263 | if (simbas_found == 0) { |
1264 | struct resource *rp; | ||
1265 | |||
1264 | /* No APBs underneath, probably this is a hummingbird | 1266 | /* No APBs underneath, probably this is a hummingbird |
1265 | * system. | 1267 | * system. |
1266 | */ | 1268 | */ |
@@ -1302,8 +1304,10 @@ static void sabre_pbm_init(struct pci_controller_info *p, struct device_node *dp | |||
1302 | pbm->io_space.end = pbm->io_space.start + (1UL << 24) - 1UL; | 1304 | pbm->io_space.end = pbm->io_space.start + (1UL << 24) - 1UL; |
1303 | pbm->io_space.flags = IORESOURCE_IO; | 1305 | pbm->io_space.flags = IORESOURCE_IO; |
1304 | 1306 | ||
1305 | pbm->mem_space.start = p->pbm_A.controller_regs + SABRE_MEMSPACE; | 1307 | pbm->mem_space.start = |
1306 | pbm->mem_space.end = pbm->mem_space.start + (unsigned long)dma_begin - 1UL; | 1308 | (p->pbm_A.controller_regs + SABRE_MEMSPACE); |
1309 | pbm->mem_space.end = | ||
1310 | (pbm->mem_space.start + ((1UL << 32UL) - 1UL)); | ||
1307 | pbm->mem_space.flags = IORESOURCE_MEM; | 1311 | pbm->mem_space.flags = IORESOURCE_MEM; |
1308 | 1312 | ||
1309 | if (request_resource(&ioport_resource, &pbm->io_space) < 0) { | 1313 | if (request_resource(&ioport_resource, &pbm->io_space) < 0) { |
@@ -1315,6 +1319,17 @@ static void sabre_pbm_init(struct pci_controller_info *p, struct device_node *dp | |||
1315 | prom_halt(); | 1319 | prom_halt(); |
1316 | } | 1320 | } |
1317 | 1321 | ||
1322 | rp = kmalloc(sizeof(*rp), GFP_KERNEL); | ||
1323 | if (!rp) { | ||
1324 | prom_printf("Cannot allocate IOMMU resource.\n"); | ||
1325 | prom_halt(); | ||
1326 | } | ||
1327 | rp->name = "IOMMU"; | ||
1328 | rp->start = pbm->mem_space.start + (unsigned long) dma_start; | ||
1329 | rp->end = pbm->mem_space.start + (unsigned long) dma_end - 1UL; | ||
1330 | rp->flags = IORESOURCE_BUSY; | ||
1331 | request_resource(&pbm->mem_space, rp); | ||
1332 | |||
1318 | pci_register_legacy_regions(&pbm->io_space, | 1333 | pci_register_legacy_regions(&pbm->io_space, |
1319 | &pbm->mem_space); | 1334 | &pbm->mem_space); |
1320 | } | 1335 | } |
@@ -1450,5 +1465,5 @@ void sabre_init(struct device_node *dp, char *model_name) | |||
1450 | /* | 1465 | /* |
1451 | * Look for APB underneath. | 1466 | * Look for APB underneath. |
1452 | */ | 1467 | */ |
1453 | sabre_pbm_init(p, dp, vdma[0]); | 1468 | sabre_pbm_init(p, dp, vdma[0], vdma[0] + vdma[1]); |
1454 | } | 1469 | } |
diff --git a/arch/sparc64/kernel/prom.c b/arch/sparc64/kernel/prom.c index e21cd6afa709..0917c24c4f08 100644 --- a/arch/sparc64/kernel/prom.c +++ b/arch/sparc64/kernel/prom.c | |||
@@ -793,7 +793,7 @@ static unsigned int schizo_irq_build(struct device_node *dp, | |||
793 | return virt_irq; | 793 | return virt_irq; |
794 | } | 794 | } |
795 | 795 | ||
796 | static void schizo_irq_trans_init(struct device_node *dp) | 796 | static void __schizo_irq_trans_init(struct device_node *dp, int is_tomatillo) |
797 | { | 797 | { |
798 | struct linux_prom64_registers *regs; | 798 | struct linux_prom64_registers *regs; |
799 | struct schizo_irq_data *irq_data; | 799 | struct schizo_irq_data *irq_data; |
@@ -807,11 +807,24 @@ static void schizo_irq_trans_init(struct device_node *dp) | |||
807 | dp->irq_trans->data = irq_data; | 807 | dp->irq_trans->data = irq_data; |
808 | 808 | ||
809 | irq_data->pbm_regs = regs[0].phys_addr; | 809 | irq_data->pbm_regs = regs[0].phys_addr; |
810 | irq_data->sync_reg = regs[3].phys_addr + 0x1a18UL; | 810 | if (is_tomatillo) |
811 | irq_data->sync_reg = regs[3].phys_addr + 0x1a18UL; | ||
812 | else | ||
813 | irq_data->sync_reg = 0UL; | ||
811 | irq_data->portid = of_getintprop_default(dp, "portid", 0); | 814 | irq_data->portid = of_getintprop_default(dp, "portid", 0); |
812 | irq_data->chip_version = of_getintprop_default(dp, "version#", 0); | 815 | irq_data->chip_version = of_getintprop_default(dp, "version#", 0); |
813 | } | 816 | } |
814 | 817 | ||
818 | static void schizo_irq_trans_init(struct device_node *dp) | ||
819 | { | ||
820 | __schizo_irq_trans_init(dp, 0); | ||
821 | } | ||
822 | |||
823 | static void tomatillo_irq_trans_init(struct device_node *dp) | ||
824 | { | ||
825 | __schizo_irq_trans_init(dp, 1); | ||
826 | } | ||
827 | |||
815 | static unsigned int pci_sun4v_irq_build(struct device_node *dp, | 828 | static unsigned int pci_sun4v_irq_build(struct device_node *dp, |
816 | unsigned int devino, | 829 | unsigned int devino, |
817 | void *_data) | 830 | void *_data) |
@@ -1050,8 +1063,8 @@ static struct irq_trans pci_irq_trans_table[] = { | |||
1050 | { "pci108e,8001", schizo_irq_trans_init }, | 1063 | { "pci108e,8001", schizo_irq_trans_init }, |
1051 | { "SUNW,schizo+", schizo_irq_trans_init }, | 1064 | { "SUNW,schizo+", schizo_irq_trans_init }, |
1052 | { "pci108e,8002", schizo_irq_trans_init }, | 1065 | { "pci108e,8002", schizo_irq_trans_init }, |
1053 | { "SUNW,tomatillo", schizo_irq_trans_init }, | 1066 | { "SUNW,tomatillo", tomatillo_irq_trans_init }, |
1054 | { "pci108e,a801", schizo_irq_trans_init }, | 1067 | { "pci108e,a801", tomatillo_irq_trans_init }, |
1055 | { "SUNW,sun4v-pci", pci_sun4v_irq_trans_init }, | 1068 | { "SUNW,sun4v-pci", pci_sun4v_irq_trans_init }, |
1056 | }; | 1069 | }; |
1057 | #endif | 1070 | #endif |
@@ -1079,23 +1092,22 @@ static void sun4v_vdev_irq_trans_init(struct device_node *dp) | |||
1079 | 1092 | ||
1080 | static void irq_trans_init(struct device_node *dp) | 1093 | static void irq_trans_init(struct device_node *dp) |
1081 | { | 1094 | { |
1082 | const char *model; | ||
1083 | #ifdef CONFIG_PCI | 1095 | #ifdef CONFIG_PCI |
1096 | const char *model; | ||
1084 | int i; | 1097 | int i; |
1085 | #endif | 1098 | #endif |
1086 | 1099 | ||
1100 | #ifdef CONFIG_PCI | ||
1087 | model = of_get_property(dp, "model", NULL); | 1101 | model = of_get_property(dp, "model", NULL); |
1088 | if (!model) | 1102 | if (!model) |
1089 | model = of_get_property(dp, "compatible", NULL); | 1103 | model = of_get_property(dp, "compatible", NULL); |
1090 | if (!model) | 1104 | if (model) { |
1091 | return; | 1105 | for (i = 0; i < ARRAY_SIZE(pci_irq_trans_table); i++) { |
1092 | 1106 | struct irq_trans *t = &pci_irq_trans_table[i]; | |
1093 | #ifdef CONFIG_PCI | ||
1094 | for (i = 0; i < ARRAY_SIZE(pci_irq_trans_table); i++) { | ||
1095 | struct irq_trans *t = &pci_irq_trans_table[i]; | ||
1096 | 1107 | ||
1097 | if (!strcmp(model, t->name)) | 1108 | if (!strcmp(model, t->name)) |
1098 | return t->init(dp); | 1109 | return t->init(dp); |
1110 | } | ||
1099 | } | 1111 | } |
1100 | #endif | 1112 | #endif |
1101 | #ifdef CONFIG_SBUS | 1113 | #ifdef CONFIG_SBUS |
@@ -1103,8 +1115,9 @@ static void irq_trans_init(struct device_node *dp) | |||
1103 | !strcmp(dp->name, "sbi")) | 1115 | !strcmp(dp->name, "sbi")) |
1104 | return sbus_irq_trans_init(dp); | 1116 | return sbus_irq_trans_init(dp); |
1105 | #endif | 1117 | #endif |
1106 | if (!strcmp(dp->name, "central")) | 1118 | if (!strcmp(dp->name, "fhc") && |
1107 | return central_irq_trans_init(dp->child); | 1119 | !strcmp(dp->parent->name, "central")) |
1120 | return central_irq_trans_init(dp); | ||
1108 | if (!strcmp(dp->name, "virtual-devices")) | 1121 | if (!strcmp(dp->name, "virtual-devices")) |
1109 | return sun4v_vdev_irq_trans_init(dp); | 1122 | return sun4v_vdev_irq_trans_init(dp); |
1110 | } | 1123 | } |
@@ -1516,7 +1529,7 @@ static char * __init get_one_property(phandle node, const char *name) | |||
1516 | return buf; | 1529 | return buf; |
1517 | } | 1530 | } |
1518 | 1531 | ||
1519 | static struct device_node * __init create_node(phandle node) | 1532 | static struct device_node * __init create_node(phandle node, struct device_node *parent) |
1520 | { | 1533 | { |
1521 | struct device_node *dp; | 1534 | struct device_node *dp; |
1522 | 1535 | ||
@@ -1525,6 +1538,7 @@ static struct device_node * __init create_node(phandle node) | |||
1525 | 1538 | ||
1526 | dp = prom_early_alloc(sizeof(*dp)); | 1539 | dp = prom_early_alloc(sizeof(*dp)); |
1527 | dp->unique_id = unique_id++; | 1540 | dp->unique_id = unique_id++; |
1541 | dp->parent = parent; | ||
1528 | 1542 | ||
1529 | kref_init(&dp->kref); | 1543 | kref_init(&dp->kref); |
1530 | 1544 | ||
@@ -1543,12 +1557,11 @@ static struct device_node * __init build_tree(struct device_node *parent, phandl | |||
1543 | { | 1557 | { |
1544 | struct device_node *dp; | 1558 | struct device_node *dp; |
1545 | 1559 | ||
1546 | dp = create_node(node); | 1560 | dp = create_node(node, parent); |
1547 | if (dp) { | 1561 | if (dp) { |
1548 | *(*nextp) = dp; | 1562 | *(*nextp) = dp; |
1549 | *nextp = &dp->allnext; | 1563 | *nextp = &dp->allnext; |
1550 | 1564 | ||
1551 | dp->parent = parent; | ||
1552 | dp->path_component_name = build_path_component(dp); | 1565 | dp->path_component_name = build_path_component(dp); |
1553 | dp->full_name = build_full_name(dp); | 1566 | dp->full_name = build_full_name(dp); |
1554 | 1567 | ||
@@ -1564,7 +1577,7 @@ void __init prom_build_devicetree(void) | |||
1564 | { | 1577 | { |
1565 | struct device_node **nextp; | 1578 | struct device_node **nextp; |
1566 | 1579 | ||
1567 | allnodes = create_node(prom_root_node); | 1580 | allnodes = create_node(prom_root_node, NULL); |
1568 | allnodes->path_component_name = ""; | 1581 | allnodes->path_component_name = ""; |
1569 | allnodes->full_name = "/"; | 1582 | allnodes->full_name = "/"; |
1570 | 1583 | ||
diff --git a/arch/sparc64/kernel/setup.c b/arch/sparc64/kernel/setup.c index cc8ad480a204..bf033b31d437 100644 --- a/arch/sparc64/kernel/setup.c +++ b/arch/sparc64/kernel/setup.c | |||
@@ -74,7 +74,6 @@ prom_console_write(struct console *con, const char *s, unsigned n) | |||
74 | 74 | ||
75 | unsigned int boot_flags = 0; | 75 | unsigned int boot_flags = 0; |
76 | #define BOOTME_DEBUG 0x1 | 76 | #define BOOTME_DEBUG 0x1 |
77 | #define BOOTME_SINGLE 0x2 | ||
78 | 77 | ||
79 | /* Exported for mm/init.c:paging_init. */ | 78 | /* Exported for mm/init.c:paging_init. */ |
80 | unsigned long cmdline_memory_size = 0; | 79 | unsigned long cmdline_memory_size = 0; |
@@ -102,7 +101,6 @@ static void __init process_switch(char c) | |||
102 | boot_flags |= BOOTME_DEBUG; | 101 | boot_flags |= BOOTME_DEBUG; |
103 | break; | 102 | break; |
104 | case 's': | 103 | case 's': |
105 | boot_flags |= BOOTME_SINGLE; | ||
106 | break; | 104 | break; |
107 | case 'h': | 105 | case 'h': |
108 | prom_printf("boot_flags_init: Halt!\n"); | 106 | prom_printf("boot_flags_init: Halt!\n"); |
diff --git a/arch/sparc64/kernel/systbls.S b/arch/sparc64/kernel/systbls.S index 419a63fca172..9a8026797ac0 100644 --- a/arch/sparc64/kernel/systbls.S +++ b/arch/sparc64/kernel/systbls.S | |||
@@ -79,7 +79,7 @@ sys_call_table32: | |||
79 | .word sys_mkdirat, sys_mknodat, sys_fchownat, compat_sys_futimesat, compat_sys_fstatat64 | 79 | .word sys_mkdirat, sys_mknodat, sys_fchownat, compat_sys_futimesat, compat_sys_fstatat64 |
80 | /*290*/ .word sys_unlinkat, sys_renameat, sys_linkat, sys_symlinkat, sys_readlinkat | 80 | /*290*/ .word sys_unlinkat, sys_renameat, sys_linkat, sys_symlinkat, sys_readlinkat |
81 | .word sys_fchmodat, sys_faccessat, compat_sys_pselect6, compat_sys_ppoll, sys_unshare | 81 | .word sys_fchmodat, sys_faccessat, compat_sys_pselect6, compat_sys_ppoll, sys_unshare |
82 | /*300*/ .word compat_sys_set_robust_list, compat_sys_get_robust_list | 82 | /*300*/ .word compat_sys_set_robust_list, compat_sys_get_robust_list, compat_sys_migrate_pages |
83 | 83 | ||
84 | #endif /* CONFIG_COMPAT */ | 84 | #endif /* CONFIG_COMPAT */ |
85 | 85 | ||
@@ -149,7 +149,7 @@ sys_call_table: | |||
149 | .word sys_mkdirat, sys_mknodat, sys_fchownat, sys_futimesat, sys_fstatat64 | 149 | .word sys_mkdirat, sys_mknodat, sys_fchownat, sys_futimesat, sys_fstatat64 |
150 | /*290*/ .word sys_unlinkat, sys_renameat, sys_linkat, sys_symlinkat, sys_readlinkat | 150 | /*290*/ .word sys_unlinkat, sys_renameat, sys_linkat, sys_symlinkat, sys_readlinkat |
151 | .word sys_fchmodat, sys_faccessat, sys_pselect6, sys_ppoll, sys_unshare | 151 | .word sys_fchmodat, sys_faccessat, sys_pselect6, sys_ppoll, sys_unshare |
152 | /*300*/ .word sys_set_robust_list, sys_get_robust_list | 152 | /*300*/ .word sys_set_robust_list, sys_get_robust_list, sys_migrate_pages |
153 | 153 | ||
154 | #if defined(CONFIG_SUNOS_EMUL) || defined(CONFIG_SOLARIS_EMUL) || \ | 154 | #if defined(CONFIG_SUNOS_EMUL) || defined(CONFIG_SOLARIS_EMUL) || \ |
155 | defined(CONFIG_SOLARIS_EMUL_MODULE) | 155 | defined(CONFIG_SOLARIS_EMUL_MODULE) |
@@ -262,5 +262,7 @@ sunos_sys_table: | |||
262 | /*290*/ .word sunos_nosys, sunos_nosys, sunos_nosys | 262 | /*290*/ .word sunos_nosys, sunos_nosys, sunos_nosys |
263 | .word sunos_nosys, sunos_nosys, sunos_nosys | 263 | .word sunos_nosys, sunos_nosys, sunos_nosys |
264 | .word sunos_nosys, sunos_nosys, sunos_nosys | 264 | .word sunos_nosys, sunos_nosys, sunos_nosys |
265 | .word sunos_nosys, sunos_nosys, sunos_nosys | 265 | .word sunos_nosys |
266 | /*300*/ .word sunos_nosys, sunos_nosys, sunos_nosys | ||
267 | |||
266 | #endif | 268 | #endif |
diff --git a/arch/sparc64/kernel/traps.c b/arch/sparc64/kernel/traps.c index 68420e2dad0e..fe1796c939c3 100644 --- a/arch/sparc64/kernel/traps.c +++ b/arch/sparc64/kernel/traps.c | |||
@@ -87,6 +87,7 @@ static void dump_tl1_traplog(struct tl1_traplog *p) | |||
87 | i + 1, | 87 | i + 1, |
88 | p->trapstack[i].tstate, p->trapstack[i].tpc, | 88 | p->trapstack[i].tstate, p->trapstack[i].tpc, |
89 | p->trapstack[i].tnpc, p->trapstack[i].tt); | 89 | p->trapstack[i].tnpc, p->trapstack[i].tt); |
90 | print_symbol("TRAPLOG: TPC<%s>\n", p->trapstack[i].tpc); | ||
90 | } | 91 | } |
91 | } | 92 | } |
92 | 93 | ||
@@ -1134,6 +1135,9 @@ static void cheetah_log_errors(struct pt_regs *regs, struct cheetah_err_info *in | |||
1134 | printk("%s" "ERROR(%d): TPC[%lx] TNPC[%lx] O7[%lx] TSTATE[%lx]\n", | 1135 | printk("%s" "ERROR(%d): TPC[%lx] TNPC[%lx] O7[%lx] TSTATE[%lx]\n", |
1135 | (recoverable ? KERN_WARNING : KERN_CRIT), smp_processor_id(), | 1136 | (recoverable ? KERN_WARNING : KERN_CRIT), smp_processor_id(), |
1136 | regs->tpc, regs->tnpc, regs->u_regs[UREG_I7], regs->tstate); | 1137 | regs->tpc, regs->tnpc, regs->u_regs[UREG_I7], regs->tstate); |
1138 | printk("%s" "ERROR(%d): ", | ||
1139 | (recoverable ? KERN_WARNING : KERN_CRIT), smp_processor_id()); | ||
1140 | print_symbol("TPC<%s>\n", regs->tpc); | ||
1137 | printk("%s" "ERROR(%d): M_SYND(%lx), E_SYND(%lx)%s%s\n", | 1141 | printk("%s" "ERROR(%d): M_SYND(%lx), E_SYND(%lx)%s%s\n", |
1138 | (recoverable ? KERN_WARNING : KERN_CRIT), smp_processor_id(), | 1142 | (recoverable ? KERN_WARNING : KERN_CRIT), smp_processor_id(), |
1139 | (afsr & CHAFSR_M_SYNDROME) >> CHAFSR_M_SYNDROME_SHIFT, | 1143 | (afsr & CHAFSR_M_SYNDROME) >> CHAFSR_M_SYNDROME_SHIFT, |
@@ -1741,6 +1745,7 @@ void cheetah_plus_parity_error(int type, struct pt_regs *regs) | |||
1741 | smp_processor_id(), | 1745 | smp_processor_id(), |
1742 | (type & 0x1) ? 'I' : 'D', | 1746 | (type & 0x1) ? 'I' : 'D', |
1743 | regs->tpc); | 1747 | regs->tpc); |
1748 | print_symbol(KERN_EMERG "TPC<%s>\n", regs->tpc); | ||
1744 | panic("Irrecoverable Cheetah+ parity error."); | 1749 | panic("Irrecoverable Cheetah+ parity error."); |
1745 | } | 1750 | } |
1746 | 1751 | ||
@@ -1748,6 +1753,7 @@ void cheetah_plus_parity_error(int type, struct pt_regs *regs) | |||
1748 | smp_processor_id(), | 1753 | smp_processor_id(), |
1749 | (type & 0x1) ? 'I' : 'D', | 1754 | (type & 0x1) ? 'I' : 'D', |
1750 | regs->tpc); | 1755 | regs->tpc); |
1756 | print_symbol(KERN_WARNING "TPC<%s>\n", regs->tpc); | ||
1751 | } | 1757 | } |
1752 | 1758 | ||
1753 | struct sun4v_error_entry { | 1759 | struct sun4v_error_entry { |
@@ -1946,6 +1952,7 @@ void sun4v_itlb_error_report(struct pt_regs *regs, int tl) | |||
1946 | 1952 | ||
1947 | printk(KERN_EMERG "SUN4V-ITLB: Error at TPC[%lx], tl %d\n", | 1953 | printk(KERN_EMERG "SUN4V-ITLB: Error at TPC[%lx], tl %d\n", |
1948 | regs->tpc, tl); | 1954 | regs->tpc, tl); |
1955 | print_symbol(KERN_EMERG "SUN4V-ITLB: TPC<%s>\n", regs->tpc); | ||
1949 | printk(KERN_EMERG "SUN4V-ITLB: vaddr[%lx] ctx[%lx] " | 1956 | printk(KERN_EMERG "SUN4V-ITLB: vaddr[%lx] ctx[%lx] " |
1950 | "pte[%lx] error[%lx]\n", | 1957 | "pte[%lx] error[%lx]\n", |
1951 | sun4v_err_itlb_vaddr, sun4v_err_itlb_ctx, | 1958 | sun4v_err_itlb_vaddr, sun4v_err_itlb_ctx, |
@@ -1966,6 +1973,7 @@ void sun4v_dtlb_error_report(struct pt_regs *regs, int tl) | |||
1966 | 1973 | ||
1967 | printk(KERN_EMERG "SUN4V-DTLB: Error at TPC[%lx], tl %d\n", | 1974 | printk(KERN_EMERG "SUN4V-DTLB: Error at TPC[%lx], tl %d\n", |
1968 | regs->tpc, tl); | 1975 | regs->tpc, tl); |
1976 | print_symbol(KERN_EMERG "SUN4V-DTLB: TPC<%s>\n", regs->tpc); | ||
1969 | printk(KERN_EMERG "SUN4V-DTLB: vaddr[%lx] ctx[%lx] " | 1977 | printk(KERN_EMERG "SUN4V-DTLB: vaddr[%lx] ctx[%lx] " |
1970 | "pte[%lx] error[%lx]\n", | 1978 | "pte[%lx] error[%lx]\n", |
1971 | sun4v_err_dtlb_vaddr, sun4v_err_dtlb_ctx, | 1979 | sun4v_err_dtlb_vaddr, sun4v_err_dtlb_ctx, |
diff --git a/arch/sparc64/kernel/vmlinux.lds.S b/arch/sparc64/kernel/vmlinux.lds.S index b097379a49a8..bd9de8c2a2aa 100644 --- a/arch/sparc64/kernel/vmlinux.lds.S +++ b/arch/sparc64/kernel/vmlinux.lds.S | |||
@@ -57,13 +57,7 @@ SECTIONS | |||
57 | __setup_end = .; | 57 | __setup_end = .; |
58 | __initcall_start = .; | 58 | __initcall_start = .; |
59 | .initcall.init : { | 59 | .initcall.init : { |
60 | *(.initcall1.init) | 60 | INITCALLS |
61 | *(.initcall2.init) | ||
62 | *(.initcall3.init) | ||
63 | *(.initcall4.init) | ||
64 | *(.initcall5.init) | ||
65 | *(.initcall6.init) | ||
66 | *(.initcall7.init) | ||
67 | } | 61 | } |
68 | __initcall_end = .; | 62 | __initcall_end = .; |
69 | __con_initcall_start = .; | 63 | __con_initcall_start = .; |