diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2013-01-09 13:37:01 -0500 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2013-01-09 13:37:01 -0500 |
commit | e84d0dedd324379bd784be748314b251334a79b6 (patch) | |
tree | 0d7022be3ce5e339410b6dd39f4304180431b381 | |
parent | d1c3ed669a2d452cacfb48c2d171a1f364dae2ed (diff) | |
parent | 3ecd9d01f7dffd5a2291267ba0410e1826c87530 (diff) |
Merge branch 'pci/misc' into next
* pci/misc:
PCI: cpqphp: Cleanup and remove unreachable paths
PCI: Drop "__" prefix on __pci_enable_device_flags()
PCI: Use "unsigned long" for __pci_enable_device_flags to match ioport.h
mn10300/PCI: Remove unused pci_root_bus
frv/PCI: Remove unused pci_root_bus
x86/PCI: Remove unused pci_root_bus
-rw-r--r-- | arch/frv/mb93090-mb00/pci-frv.h | 1 | ||||
-rw-r--r-- | arch/frv/mb93090-mb00/pci-vdk.c | 4 | ||||
-rw-r--r-- | arch/mn10300/unit-asb2305/pci-asb2305.h | 1 | ||||
-rw-r--r-- | arch/mn10300/unit-asb2305/pci.c | 4 | ||||
-rw-r--r-- | arch/x86/include/asm/pci_x86.h | 1 | ||||
-rw-r--r-- | arch/x86/pci/common.c | 1 | ||||
-rw-r--r-- | arch/x86/pci/legacy.c | 2 | ||||
-rw-r--r-- | arch/x86/pci/numaq_32.c | 2 | ||||
-rw-r--r-- | drivers/pci/hotplug/cpqphp_ctrl.c | 57 | ||||
-rw-r--r-- | drivers/pci/pci.c | 9 |
10 files changed, 28 insertions, 54 deletions
diff --git a/arch/frv/mb93090-mb00/pci-frv.h b/arch/frv/mb93090-mb00/pci-frv.h index 089eeba4f3bc..76c4e73d643d 100644 --- a/arch/frv/mb93090-mb00/pci-frv.h +++ b/arch/frv/mb93090-mb00/pci-frv.h | |||
@@ -31,7 +31,6 @@ void pcibios_resource_survey(void); | |||
31 | /* pci-vdk.c */ | 31 | /* pci-vdk.c */ |
32 | 32 | ||
33 | extern int __nongpreldata pcibios_last_bus; | 33 | extern int __nongpreldata pcibios_last_bus; |
34 | extern struct pci_bus *__nongpreldata pci_root_bus; | ||
35 | extern struct pci_ops *__nongpreldata pci_root_ops; | 34 | extern struct pci_ops *__nongpreldata pci_root_ops; |
36 | 35 | ||
37 | /* pci-irq.c */ | 36 | /* pci-irq.c */ |
diff --git a/arch/frv/mb93090-mb00/pci-vdk.c b/arch/frv/mb93090-mb00/pci-vdk.c index 71e9bcf58105..1152a1e3cabb 100644 --- a/arch/frv/mb93090-mb00/pci-vdk.c +++ b/arch/frv/mb93090-mb00/pci-vdk.c | |||
@@ -26,7 +26,6 @@ | |||
26 | unsigned int __nongpreldata pci_probe = 1; | 26 | unsigned int __nongpreldata pci_probe = 1; |
27 | 27 | ||
28 | int __nongpreldata pcibios_last_bus = -1; | 28 | int __nongpreldata pcibios_last_bus = -1; |
29 | struct pci_bus *__nongpreldata pci_root_bus; | ||
30 | struct pci_ops *__nongpreldata pci_root_ops; | 29 | struct pci_ops *__nongpreldata pci_root_ops; |
31 | 30 | ||
32 | /* | 31 | /* |
@@ -416,8 +415,7 @@ int __init pcibios_init(void) | |||
416 | printk("PCI: Probing PCI hardware\n"); | 415 | printk("PCI: Probing PCI hardware\n"); |
417 | pci_add_resource(&resources, &pci_ioport_resource); | 416 | pci_add_resource(&resources, &pci_ioport_resource); |
418 | pci_add_resource(&resources, &pci_iomem_resource); | 417 | pci_add_resource(&resources, &pci_iomem_resource); |
419 | pci_root_bus = pci_scan_root_bus(NULL, 0, pci_root_ops, NULL, | 418 | pci_scan_root_bus(NULL, 0, pci_root_ops, NULL, &resources); |
420 | &resources); | ||
421 | 419 | ||
422 | pcibios_irq_init(); | 420 | pcibios_irq_init(); |
423 | pcibios_fixup_peer_bridges(); | 421 | pcibios_fixup_peer_bridges(); |
diff --git a/arch/mn10300/unit-asb2305/pci-asb2305.h b/arch/mn10300/unit-asb2305/pci-asb2305.h index 1194fe486b01..7fa66a0e4624 100644 --- a/arch/mn10300/unit-asb2305/pci-asb2305.h +++ b/arch/mn10300/unit-asb2305/pci-asb2305.h | |||
@@ -36,7 +36,6 @@ extern void pcibios_resource_survey(void); | |||
36 | /* pci.c */ | 36 | /* pci.c */ |
37 | 37 | ||
38 | extern int pcibios_last_bus; | 38 | extern int pcibios_last_bus; |
39 | extern struct pci_bus *pci_root_bus; | ||
40 | extern struct pci_ops *pci_root_ops; | 39 | extern struct pci_ops *pci_root_ops; |
41 | 40 | ||
42 | extern struct irq_routing_table *pcibios_get_irq_routing_table(void); | 41 | extern struct irq_routing_table *pcibios_get_irq_routing_table(void); |
diff --git a/arch/mn10300/unit-asb2305/pci.c b/arch/mn10300/unit-asb2305/pci.c index e2059486d3f8..426bf51605f3 100644 --- a/arch/mn10300/unit-asb2305/pci.c +++ b/arch/mn10300/unit-asb2305/pci.c | |||
@@ -24,7 +24,6 @@ | |||
24 | unsigned int pci_probe = 1; | 24 | unsigned int pci_probe = 1; |
25 | 25 | ||
26 | int pcibios_last_bus = -1; | 26 | int pcibios_last_bus = -1; |
27 | struct pci_bus *pci_root_bus; | ||
28 | struct pci_ops *pci_root_ops; | 27 | struct pci_ops *pci_root_ops; |
29 | 28 | ||
30 | /* | 29 | /* |
@@ -377,8 +376,7 @@ static int __init pcibios_init(void) | |||
377 | 376 | ||
378 | pci_add_resource_offset(&resources, &pci_ioport_resource, io_offset); | 377 | pci_add_resource_offset(&resources, &pci_ioport_resource, io_offset); |
379 | pci_add_resource_offset(&resources, &pci_iomem_resource, mem_offset); | 378 | pci_add_resource_offset(&resources, &pci_iomem_resource, mem_offset); |
380 | pci_root_bus = pci_scan_root_bus(NULL, 0, &pci_direct_ampci, NULL, | 379 | pci_scan_root_bus(NULL, 0, &pci_direct_ampci, NULL, &resources); |
381 | &resources); | ||
382 | 380 | ||
383 | pcibios_irq_init(); | 381 | pcibios_irq_init(); |
384 | pcibios_fixup_irqs(); | 382 | pcibios_fixup_irqs(); |
diff --git a/arch/x86/include/asm/pci_x86.h b/arch/x86/include/asm/pci_x86.h index 73e8eeff22ee..0126f104f0a5 100644 --- a/arch/x86/include/asm/pci_x86.h +++ b/arch/x86/include/asm/pci_x86.h | |||
@@ -54,7 +54,6 @@ void pcibios_set_cache_line_size(void); | |||
54 | /* pci-pc.c */ | 54 | /* pci-pc.c */ |
55 | 55 | ||
56 | extern int pcibios_last_bus; | 56 | extern int pcibios_last_bus; |
57 | extern struct pci_bus *pci_root_bus; | ||
58 | extern struct pci_ops pci_root_ops; | 57 | extern struct pci_ops pci_root_ops; |
59 | 58 | ||
60 | void pcibios_scan_specific_bus(int busn); | 59 | void pcibios_scan_specific_bus(int busn); |
diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c index 412e1286d1fc..505731b139f4 100644 --- a/arch/x86/pci/common.c +++ b/arch/x86/pci/common.c | |||
@@ -34,7 +34,6 @@ int noioapicreroute = 1; | |||
34 | #endif | 34 | #endif |
35 | int pcibios_last_bus = -1; | 35 | int pcibios_last_bus = -1; |
36 | unsigned long pirq_table_addr; | 36 | unsigned long pirq_table_addr; |
37 | struct pci_bus *pci_root_bus; | ||
38 | const struct pci_raw_ops *__read_mostly raw_pci_ops; | 37 | const struct pci_raw_ops *__read_mostly raw_pci_ops; |
39 | const struct pci_raw_ops *__read_mostly raw_pci_ext_ops; | 38 | const struct pci_raw_ops *__read_mostly raw_pci_ext_ops; |
40 | 39 | ||
diff --git a/arch/x86/pci/legacy.c b/arch/x86/pci/legacy.c index a1df191129d3..a9e83083fb85 100644 --- a/arch/x86/pci/legacy.c +++ b/arch/x86/pci/legacy.c | |||
@@ -30,7 +30,7 @@ int __init pci_legacy_init(void) | |||
30 | } | 30 | } |
31 | 31 | ||
32 | printk("PCI: Probing PCI hardware\n"); | 32 | printk("PCI: Probing PCI hardware\n"); |
33 | pci_root_bus = pcibios_scan_root(0); | 33 | pcibios_scan_root(0); |
34 | return 0; | 34 | return 0; |
35 | } | 35 | } |
36 | 36 | ||
diff --git a/arch/x86/pci/numaq_32.c b/arch/x86/pci/numaq_32.c index 83e125b95ca6..00edfe652b72 100644 --- a/arch/x86/pci/numaq_32.c +++ b/arch/x86/pci/numaq_32.c | |||
@@ -152,7 +152,7 @@ int __init pci_numaq_init(void) | |||
152 | 152 | ||
153 | raw_pci_ops = &pci_direct_conf1_mq; | 153 | raw_pci_ops = &pci_direct_conf1_mq; |
154 | 154 | ||
155 | pci_root_bus = pcibios_scan_root(0); | 155 | pcibios_scan_root(0); |
156 | if (num_online_nodes() > 1) | 156 | if (num_online_nodes() > 1) |
157 | for_each_online_node(quad) { | 157 | for_each_online_node(quad) { |
158 | if (quad == 0) | 158 | if (quad == 0) |
diff --git a/drivers/pci/hotplug/cpqphp_ctrl.c b/drivers/pci/hotplug/cpqphp_ctrl.c index 36112fe212d3..d282019cda5f 100644 --- a/drivers/pci/hotplug/cpqphp_ctrl.c +++ b/drivers/pci/hotplug/cpqphp_ctrl.c | |||
@@ -1900,8 +1900,7 @@ static void interrupt_event_handler(struct controller *ctrl) | |||
1900 | dbg("power fault\n"); | 1900 | dbg("power fault\n"); |
1901 | } else { | 1901 | } else { |
1902 | /* refresh notification */ | 1902 | /* refresh notification */ |
1903 | if (p_slot) | 1903 | update_slot_info(ctrl, p_slot); |
1904 | update_slot_info(ctrl, p_slot); | ||
1905 | } | 1904 | } |
1906 | 1905 | ||
1907 | ctrl->event_queue[loop].event_type = 0; | 1906 | ctrl->event_queue[loop].event_type = 0; |
@@ -2520,44 +2519,28 @@ static int configure_new_function(struct controller *ctrl, struct pci_func *func | |||
2520 | 2519 | ||
2521 | /* If we have IO resources copy them and fill in the bridge's | 2520 | /* If we have IO resources copy them and fill in the bridge's |
2522 | * IO range registers */ | 2521 | * IO range registers */ |
2523 | if (io_node) { | 2522 | memcpy(hold_IO_node, io_node, sizeof(struct pci_resource)); |
2524 | memcpy(hold_IO_node, io_node, sizeof(struct pci_resource)); | 2523 | io_node->next = NULL; |
2525 | io_node->next = NULL; | ||
2526 | 2524 | ||
2527 | /* set IO base and Limit registers */ | 2525 | /* set IO base and Limit registers */ |
2528 | temp_byte = io_node->base >> 8; | 2526 | temp_byte = io_node->base >> 8; |
2529 | rc = pci_bus_write_config_byte(pci_bus, devfn, PCI_IO_BASE, temp_byte); | 2527 | rc = pci_bus_write_config_byte(pci_bus, devfn, PCI_IO_BASE, temp_byte); |
2530 | 2528 | ||
2531 | temp_byte = (io_node->base + io_node->length - 1) >> 8; | 2529 | temp_byte = (io_node->base + io_node->length - 1) >> 8; |
2532 | rc = pci_bus_write_config_byte(pci_bus, devfn, PCI_IO_LIMIT, temp_byte); | 2530 | rc = pci_bus_write_config_byte(pci_bus, devfn, PCI_IO_LIMIT, temp_byte); |
2533 | } else { | ||
2534 | kfree(hold_IO_node); | ||
2535 | hold_IO_node = NULL; | ||
2536 | } | ||
2537 | |||
2538 | /* If we have memory resources copy them and fill in the | ||
2539 | * bridge's memory range registers. Otherwise, fill in the | ||
2540 | * range registers with values that disable them. */ | ||
2541 | if (mem_node) { | ||
2542 | memcpy(hold_mem_node, mem_node, sizeof(struct pci_resource)); | ||
2543 | mem_node->next = NULL; | ||
2544 | |||
2545 | /* set Mem base and Limit registers */ | ||
2546 | temp_word = mem_node->base >> 16; | ||
2547 | rc = pci_bus_write_config_word(pci_bus, devfn, PCI_MEMORY_BASE, temp_word); | ||
2548 | 2531 | ||
2549 | temp_word = (mem_node->base + mem_node->length - 1) >> 16; | 2532 | /* Copy the memory resources and fill in the bridge's memory |
2550 | rc = pci_bus_write_config_word(pci_bus, devfn, PCI_MEMORY_LIMIT, temp_word); | 2533 | * range registers. |
2551 | } else { | 2534 | */ |
2552 | temp_word = 0xFFFF; | 2535 | memcpy(hold_mem_node, mem_node, sizeof(struct pci_resource)); |
2553 | rc = pci_bus_write_config_word(pci_bus, devfn, PCI_MEMORY_BASE, temp_word); | 2536 | mem_node->next = NULL; |
2554 | 2537 | ||
2555 | temp_word = 0x0000; | 2538 | /* set Mem base and Limit registers */ |
2556 | rc = pci_bus_write_config_word(pci_bus, devfn, PCI_MEMORY_LIMIT, temp_word); | 2539 | temp_word = mem_node->base >> 16; |
2540 | rc = pci_bus_write_config_word(pci_bus, devfn, PCI_MEMORY_BASE, temp_word); | ||
2557 | 2541 | ||
2558 | kfree(hold_mem_node); | 2542 | temp_word = (mem_node->base + mem_node->length - 1) >> 16; |
2559 | hold_mem_node = NULL; | 2543 | rc = pci_bus_write_config_word(pci_bus, devfn, PCI_MEMORY_LIMIT, temp_word); |
2560 | } | ||
2561 | 2544 | ||
2562 | memcpy(hold_p_mem_node, p_mem_node, sizeof(struct pci_resource)); | 2545 | memcpy(hold_p_mem_node, p_mem_node, sizeof(struct pci_resource)); |
2563 | p_mem_node->next = NULL; | 2546 | p_mem_node->next = NULL; |
@@ -2627,7 +2610,7 @@ static int configure_new_function(struct controller *ctrl, struct pci_func *func | |||
2627 | /* Return unused bus resources | 2610 | /* Return unused bus resources |
2628 | * First use the temporary node to store information for | 2611 | * First use the temporary node to store information for |
2629 | * the board */ | 2612 | * the board */ |
2630 | if (hold_bus_node && bus_node && temp_resources.bus_head) { | 2613 | if (bus_node && temp_resources.bus_head) { |
2631 | hold_bus_node->length = bus_node->base - hold_bus_node->base; | 2614 | hold_bus_node->length = bus_node->base - hold_bus_node->base; |
2632 | 2615 | ||
2633 | hold_bus_node->next = func->bus_head; | 2616 | hold_bus_node->next = func->bus_head; |
@@ -2751,7 +2734,7 @@ static int configure_new_function(struct controller *ctrl, struct pci_func *func | |||
2751 | } | 2734 | } |
2752 | /* If we have prefetchable memory space available and there | 2735 | /* If we have prefetchable memory space available and there |
2753 | * is some left at the end, return the unused portion */ | 2736 | * is some left at the end, return the unused portion */ |
2754 | if (hold_p_mem_node && temp_resources.p_mem_head) { | 2737 | if (temp_resources.p_mem_head) { |
2755 | p_mem_node = do_pre_bridge_resource_split(&(temp_resources.p_mem_head), | 2738 | p_mem_node = do_pre_bridge_resource_split(&(temp_resources.p_mem_head), |
2756 | &hold_p_mem_node, 0x100000); | 2739 | &hold_p_mem_node, 0x100000); |
2757 | 2740 | ||
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 5cb5820fae40..a2f30394c091 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c | |||
@@ -1156,8 +1156,7 @@ int pci_reenable_device(struct pci_dev *dev) | |||
1156 | return 0; | 1156 | return 0; |
1157 | } | 1157 | } |
1158 | 1158 | ||
1159 | static int __pci_enable_device_flags(struct pci_dev *dev, | 1159 | static int pci_enable_device_flags(struct pci_dev *dev, unsigned long flags) |
1160 | resource_size_t flags) | ||
1161 | { | 1160 | { |
1162 | int err; | 1161 | int err; |
1163 | int i, bars = 0; | 1162 | int i, bars = 0; |
@@ -1201,7 +1200,7 @@ static int __pci_enable_device_flags(struct pci_dev *dev, | |||
1201 | */ | 1200 | */ |
1202 | int pci_enable_device_io(struct pci_dev *dev) | 1201 | int pci_enable_device_io(struct pci_dev *dev) |
1203 | { | 1202 | { |
1204 | return __pci_enable_device_flags(dev, IORESOURCE_IO); | 1203 | return pci_enable_device_flags(dev, IORESOURCE_IO); |
1205 | } | 1204 | } |
1206 | 1205 | ||
1207 | /** | 1206 | /** |
@@ -1214,7 +1213,7 @@ int pci_enable_device_io(struct pci_dev *dev) | |||
1214 | */ | 1213 | */ |
1215 | int pci_enable_device_mem(struct pci_dev *dev) | 1214 | int pci_enable_device_mem(struct pci_dev *dev) |
1216 | { | 1215 | { |
1217 | return __pci_enable_device_flags(dev, IORESOURCE_MEM); | 1216 | return pci_enable_device_flags(dev, IORESOURCE_MEM); |
1218 | } | 1217 | } |
1219 | 1218 | ||
1220 | /** | 1219 | /** |
@@ -1230,7 +1229,7 @@ int pci_enable_device_mem(struct pci_dev *dev) | |||
1230 | */ | 1229 | */ |
1231 | int pci_enable_device(struct pci_dev *dev) | 1230 | int pci_enable_device(struct pci_dev *dev) |
1232 | { | 1231 | { |
1233 | return __pci_enable_device_flags(dev, IORESOURCE_MEM | IORESOURCE_IO); | 1232 | return pci_enable_device_flags(dev, IORESOURCE_MEM | IORESOURCE_IO); |
1234 | } | 1233 | } |
1235 | 1234 | ||
1236 | /* | 1235 | /* |