diff options
Diffstat (limited to 'arch/sparc')
-rw-r--r-- | arch/sparc/kernel/leon_pci.c | 8 | ||||
-rw-r--r-- | arch/sparc/kernel/of_device_64.c | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/pci.c | 102 | ||||
-rw-r--r-- | arch/sparc/kernel/pci_impl.h | 1 | ||||
-rw-r--r-- | arch/sparc/kernel/pcic.c | 8 | ||||
-rw-r--r-- | arch/sparc/kernel/smp_64.c | 7 | ||||
-rw-r--r-- | arch/sparc/net/bpf_jit_comp.c | 4 |
7 files changed, 13 insertions, 119 deletions
diff --git a/arch/sparc/kernel/leon_pci.c b/arch/sparc/kernel/leon_pci.c index 19f56058742b..21dcda75a520 100644 --- a/arch/sparc/kernel/leon_pci.c +++ b/arch/sparc/kernel/leon_pci.c | |||
@@ -91,14 +91,6 @@ void __devinit pcibios_fixup_bus(struct pci_bus *pbus) | |||
91 | } | 91 | } |
92 | } | 92 | } |
93 | 93 | ||
94 | /* | ||
95 | * Other archs parse arguments here. | ||
96 | */ | ||
97 | char * __devinit pcibios_setup(char *str) | ||
98 | { | ||
99 | return str; | ||
100 | } | ||
101 | |||
102 | resource_size_t pcibios_align_resource(void *data, const struct resource *res, | 94 | resource_size_t pcibios_align_resource(void *data, const struct resource *res, |
103 | resource_size_t size, resource_size_t align) | 95 | resource_size_t size, resource_size_t align) |
104 | { | 96 | { |
diff --git a/arch/sparc/kernel/of_device_64.c b/arch/sparc/kernel/of_device_64.c index 7a3be6f6737a..7bbdc26d9512 100644 --- a/arch/sparc/kernel/of_device_64.c +++ b/arch/sparc/kernel/of_device_64.c | |||
@@ -580,7 +580,7 @@ static unsigned int __init build_one_device_irq(struct platform_device *op, | |||
580 | printk("%s: Apply [%s:%x] imap --> [%s:%x]\n", | 580 | printk("%s: Apply [%s:%x] imap --> [%s:%x]\n", |
581 | op->dev.of_node->full_name, | 581 | op->dev.of_node->full_name, |
582 | pp->full_name, this_orig_irq, | 582 | pp->full_name, this_orig_irq, |
583 | (iret ? iret->full_name : "NULL"), irq); | 583 | of_node_full_name(iret), irq); |
584 | 584 | ||
585 | if (!iret) | 585 | if (!iret) |
586 | break; | 586 | break; |
diff --git a/arch/sparc/kernel/pci.c b/arch/sparc/kernel/pci.c index fdaf21811670..065b88c4f868 100644 --- a/arch/sparc/kernel/pci.c +++ b/arch/sparc/kernel/pci.c | |||
@@ -375,93 +375,6 @@ static void __devinit apb_calc_first_last(u8 map, u32 *first_p, u32 *last_p) | |||
375 | *last_p = last; | 375 | *last_p = last; |
376 | } | 376 | } |
377 | 377 | ||
378 | /* For PCI bus devices which lack a 'ranges' property we interrogate | ||
379 | * the config space values to set the resources, just like the generic | ||
380 | * Linux PCI probing code does. | ||
381 | */ | ||
382 | static void __devinit pci_cfg_fake_ranges(struct pci_dev *dev, | ||
383 | struct pci_bus *bus, | ||
384 | struct pci_pbm_info *pbm) | ||
385 | { | ||
386 | struct pci_bus_region region; | ||
387 | struct resource *res, res2; | ||
388 | u8 io_base_lo, io_limit_lo; | ||
389 | u16 mem_base_lo, mem_limit_lo; | ||
390 | unsigned long base, limit; | ||
391 | |||
392 | pci_read_config_byte(dev, PCI_IO_BASE, &io_base_lo); | ||
393 | pci_read_config_byte(dev, PCI_IO_LIMIT, &io_limit_lo); | ||
394 | base = (io_base_lo & PCI_IO_RANGE_MASK) << 8; | ||
395 | limit = (io_limit_lo & PCI_IO_RANGE_MASK) << 8; | ||
396 | |||
397 | if ((io_base_lo & PCI_IO_RANGE_TYPE_MASK) == PCI_IO_RANGE_TYPE_32) { | ||
398 | u16 io_base_hi, io_limit_hi; | ||
399 | |||
400 | pci_read_config_word(dev, PCI_IO_BASE_UPPER16, &io_base_hi); | ||
401 | pci_read_config_word(dev, PCI_IO_LIMIT_UPPER16, &io_limit_hi); | ||
402 | base |= (io_base_hi << 16); | ||
403 | limit |= (io_limit_hi << 16); | ||
404 | } | ||
405 | |||
406 | res = bus->resource[0]; | ||
407 | if (base <= limit) { | ||
408 | res->flags = (io_base_lo & PCI_IO_RANGE_TYPE_MASK) | IORESOURCE_IO; | ||
409 | res2.flags = res->flags; | ||
410 | region.start = base; | ||
411 | region.end = limit + 0xfff; | ||
412 | pcibios_bus_to_resource(dev, &res2, ®ion); | ||
413 | if (!res->start) | ||
414 | res->start = res2.start; | ||
415 | if (!res->end) | ||
416 | res->end = res2.end; | ||
417 | } | ||
418 | |||
419 | pci_read_config_word(dev, PCI_MEMORY_BASE, &mem_base_lo); | ||
420 | pci_read_config_word(dev, PCI_MEMORY_LIMIT, &mem_limit_lo); | ||
421 | base = (mem_base_lo & PCI_MEMORY_RANGE_MASK) << 16; | ||
422 | limit = (mem_limit_lo & PCI_MEMORY_RANGE_MASK) << 16; | ||
423 | |||
424 | res = bus->resource[1]; | ||
425 | if (base <= limit) { | ||
426 | res->flags = ((mem_base_lo & PCI_MEMORY_RANGE_TYPE_MASK) | | ||
427 | IORESOURCE_MEM); | ||
428 | region.start = base; | ||
429 | region.end = limit + 0xfffff; | ||
430 | pcibios_bus_to_resource(dev, res, ®ion); | ||
431 | } | ||
432 | |||
433 | pci_read_config_word(dev, PCI_PREF_MEMORY_BASE, &mem_base_lo); | ||
434 | pci_read_config_word(dev, PCI_PREF_MEMORY_LIMIT, &mem_limit_lo); | ||
435 | base = (mem_base_lo & PCI_PREF_RANGE_MASK) << 16; | ||
436 | limit = (mem_limit_lo & PCI_PREF_RANGE_MASK) << 16; | ||
437 | |||
438 | if ((mem_base_lo & PCI_PREF_RANGE_TYPE_MASK) == PCI_PREF_RANGE_TYPE_64) { | ||
439 | u32 mem_base_hi, mem_limit_hi; | ||
440 | |||
441 | pci_read_config_dword(dev, PCI_PREF_BASE_UPPER32, &mem_base_hi); | ||
442 | pci_read_config_dword(dev, PCI_PREF_LIMIT_UPPER32, &mem_limit_hi); | ||
443 | |||
444 | /* | ||
445 | * Some bridges set the base > limit by default, and some | ||
446 | * (broken) BIOSes do not initialize them. If we find | ||
447 | * this, just assume they are not being used. | ||
448 | */ | ||
449 | if (mem_base_hi <= mem_limit_hi) { | ||
450 | base |= ((long) mem_base_hi) << 32; | ||
451 | limit |= ((long) mem_limit_hi) << 32; | ||
452 | } | ||
453 | } | ||
454 | |||
455 | res = bus->resource[2]; | ||
456 | if (base <= limit) { | ||
457 | res->flags = ((mem_base_lo & PCI_MEMORY_RANGE_TYPE_MASK) | | ||
458 | IORESOURCE_MEM | IORESOURCE_PREFETCH); | ||
459 | region.start = base; | ||
460 | region.end = limit + 0xfffff; | ||
461 | pcibios_bus_to_resource(dev, res, ®ion); | ||
462 | } | ||
463 | } | ||
464 | |||
465 | /* Cook up fake bus resources for SUNW,simba PCI bridges which lack | 378 | /* Cook up fake bus resources for SUNW,simba PCI bridges which lack |
466 | * a proper 'ranges' property. | 379 | * a proper 'ranges' property. |
467 | */ | 380 | */ |
@@ -535,7 +448,7 @@ static void __devinit of_scan_pci_bridge(struct pci_pbm_info *pbm, | |||
535 | } | 448 | } |
536 | 449 | ||
537 | bus->primary = dev->bus->number; | 450 | bus->primary = dev->bus->number; |
538 | bus->subordinate = busrange[1]; | 451 | pci_bus_insert_busn_res(bus, busrange[0], busrange[1]); |
539 | bus->bridge_ctl = 0; | 452 | bus->bridge_ctl = 0; |
540 | 453 | ||
541 | /* parse ranges property, or cook one up by hand for Simba */ | 454 | /* parse ranges property, or cook one up by hand for Simba */ |
@@ -550,7 +463,7 @@ static void __devinit of_scan_pci_bridge(struct pci_pbm_info *pbm, | |||
550 | apb_fake_ranges(dev, bus, pbm); | 463 | apb_fake_ranges(dev, bus, pbm); |
551 | goto after_ranges; | 464 | goto after_ranges; |
552 | } else if (ranges == NULL) { | 465 | } else if (ranges == NULL) { |
553 | pci_cfg_fake_ranges(dev, bus, pbm); | 466 | pci_read_bridge_bases(bus); |
554 | goto after_ranges; | 467 | goto after_ranges; |
555 | } | 468 | } |
556 | i = 1; | 469 | i = 1; |
@@ -685,6 +598,10 @@ struct pci_bus * __devinit pci_scan_one_pbm(struct pci_pbm_info *pbm, | |||
685 | pbm->io_space.start); | 598 | pbm->io_space.start); |
686 | pci_add_resource_offset(&resources, &pbm->mem_space, | 599 | pci_add_resource_offset(&resources, &pbm->mem_space, |
687 | pbm->mem_space.start); | 600 | pbm->mem_space.start); |
601 | pbm->busn.start = pbm->pci_first_busno; | ||
602 | pbm->busn.end = pbm->pci_last_busno; | ||
603 | pbm->busn.flags = IORESOURCE_BUS; | ||
604 | pci_add_resource(&resources, &pbm->busn); | ||
688 | bus = pci_create_root_bus(parent, pbm->pci_first_busno, pbm->pci_ops, | 605 | bus = pci_create_root_bus(parent, pbm->pci_first_busno, pbm->pci_ops, |
689 | pbm, &resources); | 606 | pbm, &resources); |
690 | if (!bus) { | 607 | if (!bus) { |
@@ -693,8 +610,6 @@ struct pci_bus * __devinit pci_scan_one_pbm(struct pci_pbm_info *pbm, | |||
693 | pci_free_resource_list(&resources); | 610 | pci_free_resource_list(&resources); |
694 | return NULL; | 611 | return NULL; |
695 | } | 612 | } |
696 | bus->secondary = pbm->pci_first_busno; | ||
697 | bus->subordinate = pbm->pci_last_busno; | ||
698 | 613 | ||
699 | pci_of_scan_bus(pbm, node, bus); | 614 | pci_of_scan_bus(pbm, node, bus); |
700 | pci_bus_add_devices(bus); | 615 | pci_bus_add_devices(bus); |
@@ -747,11 +662,6 @@ int pcibios_enable_device(struct pci_dev *dev, int mask) | |||
747 | return 0; | 662 | return 0; |
748 | } | 663 | } |
749 | 664 | ||
750 | char * __devinit pcibios_setup(char *str) | ||
751 | { | ||
752 | return str; | ||
753 | } | ||
754 | |||
755 | /* Platform support for /proc/bus/pci/X/Y mmap()s. */ | 665 | /* Platform support for /proc/bus/pci/X/Y mmap()s. */ |
756 | 666 | ||
757 | /* If the user uses a host-bridge as the PCI device, he may use | 667 | /* If the user uses a host-bridge as the PCI device, he may use |
diff --git a/arch/sparc/kernel/pci_impl.h b/arch/sparc/kernel/pci_impl.h index 6beb60df31d0..918a2031c8bb 100644 --- a/arch/sparc/kernel/pci_impl.h +++ b/arch/sparc/kernel/pci_impl.h | |||
@@ -97,6 +97,7 @@ struct pci_pbm_info { | |||
97 | /* PBM I/O and Memory space resources. */ | 97 | /* PBM I/O and Memory space resources. */ |
98 | struct resource io_space; | 98 | struct resource io_space; |
99 | struct resource mem_space; | 99 | struct resource mem_space; |
100 | struct resource busn; | ||
100 | 101 | ||
101 | /* Base of PCI Config space, can be per-PBM or shared. */ | 102 | /* Base of PCI Config space, can be per-PBM or shared. */ |
102 | unsigned long config_space; | 103 | unsigned long config_space; |
diff --git a/arch/sparc/kernel/pcic.c b/arch/sparc/kernel/pcic.c index 46ba84998f16..521fdf1b20e5 100644 --- a/arch/sparc/kernel/pcic.c +++ b/arch/sparc/kernel/pcic.c | |||
@@ -767,14 +767,6 @@ static void watchdog_reset() { | |||
767 | } | 767 | } |
768 | #endif | 768 | #endif |
769 | 769 | ||
770 | /* | ||
771 | * Other archs parse arguments here. | ||
772 | */ | ||
773 | char * __devinit pcibios_setup(char *str) | ||
774 | { | ||
775 | return str; | ||
776 | } | ||
777 | |||
778 | resource_size_t pcibios_align_resource(void *data, const struct resource *res, | 770 | resource_size_t pcibios_align_resource(void *data, const struct resource *res, |
779 | resource_size_t size, resource_size_t align) | 771 | resource_size_t size, resource_size_t align) |
780 | { | 772 | { |
diff --git a/arch/sparc/kernel/smp_64.c b/arch/sparc/kernel/smp_64.c index f591598d92f6..781bcb10b8bd 100644 --- a/arch/sparc/kernel/smp_64.c +++ b/arch/sparc/kernel/smp_64.c | |||
@@ -103,8 +103,6 @@ void __cpuinit smp_callin(void) | |||
103 | if (cheetah_pcache_forced_on) | 103 | if (cheetah_pcache_forced_on) |
104 | cheetah_enable_pcache(); | 104 | cheetah_enable_pcache(); |
105 | 105 | ||
106 | local_irq_enable(); | ||
107 | |||
108 | callin_flag = 1; | 106 | callin_flag = 1; |
109 | __asm__ __volatile__("membar #Sync\n\t" | 107 | __asm__ __volatile__("membar #Sync\n\t" |
110 | "flush %%g6" : : : "memory"); | 108 | "flush %%g6" : : : "memory"); |
@@ -124,9 +122,8 @@ void __cpuinit smp_callin(void) | |||
124 | while (!cpumask_test_cpu(cpuid, &smp_commenced_mask)) | 122 | while (!cpumask_test_cpu(cpuid, &smp_commenced_mask)) |
125 | rmb(); | 123 | rmb(); |
126 | 124 | ||
127 | ipi_call_lock_irq(); | ||
128 | set_cpu_online(cpuid, true); | 125 | set_cpu_online(cpuid, true); |
129 | ipi_call_unlock_irq(); | 126 | local_irq_enable(); |
130 | 127 | ||
131 | /* idle thread is expected to have preempt disabled */ | 128 | /* idle thread is expected to have preempt disabled */ |
132 | preempt_disable(); | 129 | preempt_disable(); |
@@ -1308,9 +1305,7 @@ int __cpu_disable(void) | |||
1308 | mdelay(1); | 1305 | mdelay(1); |
1309 | local_irq_disable(); | 1306 | local_irq_disable(); |
1310 | 1307 | ||
1311 | ipi_call_lock(); | ||
1312 | set_cpu_online(cpu, false); | 1308 | set_cpu_online(cpu, false); |
1313 | ipi_call_unlock(); | ||
1314 | 1309 | ||
1315 | cpu_map_rebuild(); | 1310 | cpu_map_rebuild(); |
1316 | 1311 | ||
diff --git a/arch/sparc/net/bpf_jit_comp.c b/arch/sparc/net/bpf_jit_comp.c index 1a69244e785b..e9073e9501b3 100644 --- a/arch/sparc/net/bpf_jit_comp.c +++ b/arch/sparc/net/bpf_jit_comp.c | |||
@@ -96,6 +96,7 @@ static void bpf_flush_icache(void *start_, void *end_) | |||
96 | #define AND F3(2, 0x01) | 96 | #define AND F3(2, 0x01) |
97 | #define ANDCC F3(2, 0x11) | 97 | #define ANDCC F3(2, 0x11) |
98 | #define OR F3(2, 0x02) | 98 | #define OR F3(2, 0x02) |
99 | #define XOR F3(2, 0x03) | ||
99 | #define SUB F3(2, 0x04) | 100 | #define SUB F3(2, 0x04) |
100 | #define SUBCC F3(2, 0x14) | 101 | #define SUBCC F3(2, 0x14) |
101 | #define MUL F3(2, 0x0a) /* umul */ | 102 | #define MUL F3(2, 0x0a) /* umul */ |
@@ -462,6 +463,9 @@ void bpf_jit_compile(struct sk_filter *fp) | |||
462 | case BPF_S_ALU_OR_K: /* A |= K */ | 463 | case BPF_S_ALU_OR_K: /* A |= K */ |
463 | emit_alu_K(OR, K); | 464 | emit_alu_K(OR, K); |
464 | break; | 465 | break; |
466 | case BPF_S_ANC_ALU_XOR_X: /* A ^= X; */ | ||
467 | emit_alu_X(XOR); | ||
468 | break; | ||
465 | case BPF_S_ALU_LSH_X: /* A <<= X */ | 469 | case BPF_S_ALU_LSH_X: /* A <<= X */ |
466 | emit_alu_X(SLL); | 470 | emit_alu_X(SLL); |
467 | break; | 471 | break; |