diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2014-01-24 13:56:06 -0500 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2014-02-03 12:38:46 -0500 |
commit | 25453e9e521382883b6588ef1748ed61efc77001 (patch) | |
tree | fb580ab4d1c953aab3a7421468aabe07b237a5a2 | |
parent | 6616dbdf6d967c704830586d5ead35c9767a8431 (diff) |
x86/PCI: Remove mp_bus_to_node[], set_mp_bus_to_node(), get_mp_bus_to_node()
There are no callers of get_mp_bus_to_node(), so we no longer need
mp_bus_to_node[], get_mp_bus_to_node(), or set_mp_bus_to_node().
This removes them.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r-- | arch/x86/include/asm/topology.h | 13 | ||||
-rw-r--r-- | arch/x86/pci/acpi.c | 4 | ||||
-rw-r--r-- | arch/x86/pci/amd_bus.c | 10 | ||||
-rw-r--r-- | arch/x86/pci/common.c | 69 |
4 files changed, 1 insertions, 95 deletions
diff --git a/arch/x86/include/asm/topology.h b/arch/x86/include/asm/topology.h index 09046a1a6c35..c840571afa4e 100644 --- a/arch/x86/include/asm/topology.h +++ b/arch/x86/include/asm/topology.h | |||
@@ -140,17 +140,4 @@ void x86_pci_root_bus_resources(int bus, struct list_head *resources); | |||
140 | #define smt_capable() (smp_num_siblings > 1) | 140 | #define smt_capable() (smp_num_siblings > 1) |
141 | #endif | 141 | #endif |
142 | 142 | ||
143 | #ifdef CONFIG_NUMA | ||
144 | extern int get_mp_bus_to_node(int busnum); | ||
145 | extern void set_mp_bus_to_node(int busnum, int node); | ||
146 | #else | ||
147 | static inline int get_mp_bus_to_node(int busnum) | ||
148 | { | ||
149 | return 0; | ||
150 | } | ||
151 | static inline void set_mp_bus_to_node(int busnum, int node) | ||
152 | { | ||
153 | } | ||
154 | #endif | ||
155 | |||
156 | #endif /* _ASM_X86_TOPOLOGY_H */ | 143 | #endif /* _ASM_X86_TOPOLOGY_H */ |
diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c index 3f42c5c05bf6..78f27efa11e1 100644 --- a/arch/x86/pci/acpi.c +++ b/arch/x86/pci/acpi.c | |||
@@ -499,10 +499,8 @@ struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root) | |||
499 | pxm = acpi_get_pxm(device->handle); | 499 | pxm = acpi_get_pxm(device->handle); |
500 | if (pxm >= 0) | 500 | if (pxm >= 0) |
501 | node = pxm_to_node(pxm); | 501 | node = pxm_to_node(pxm); |
502 | if (node != -1) | ||
503 | set_mp_bus_to_node(busnum, node); | ||
504 | else | ||
505 | #endif | 502 | #endif |
503 | if (node == -1) | ||
506 | node = x86_pci_root_bus_node(busnum); | 504 | node = x86_pci_root_bus_node(busnum); |
507 | 505 | ||
508 | if (node != -1 && !node_online(node)) | 506 | if (node != -1 && !node_online(node)) |
diff --git a/arch/x86/pci/amd_bus.c b/arch/x86/pci/amd_bus.c index a48be98e9ded..a313a7fb6b86 100644 --- a/arch/x86/pci/amd_bus.c +++ b/arch/x86/pci/amd_bus.c | |||
@@ -44,15 +44,6 @@ static struct pci_root_info __init *find_pci_root_info(int node, int link) | |||
44 | return NULL; | 44 | return NULL; |
45 | } | 45 | } |
46 | 46 | ||
47 | static void __init set_mp_bus_range_to_node(int min_bus, int max_bus, int node) | ||
48 | { | ||
49 | #ifdef CONFIG_NUMA | ||
50 | int j; | ||
51 | |||
52 | for (j = min_bus; j <= max_bus; j++) | ||
53 | set_mp_bus_to_node(j, node); | ||
54 | #endif | ||
55 | } | ||
56 | /** | 47 | /** |
57 | * early_fill_mp_bus_to_node() | 48 | * early_fill_mp_bus_to_node() |
58 | * called before pcibios_scan_root and pci_scan_bus | 49 | * called before pcibios_scan_root and pci_scan_bus |
@@ -117,7 +108,6 @@ static int __init early_fill_mp_bus_info(void) | |||
117 | min_bus = (reg >> 16) & 0xff; | 108 | min_bus = (reg >> 16) & 0xff; |
118 | max_bus = (reg >> 24) & 0xff; | 109 | max_bus = (reg >> 24) & 0xff; |
119 | node = (reg >> 4) & 0x07; | 110 | node = (reg >> 4) & 0x07; |
120 | set_mp_bus_range_to_node(min_bus, max_bus, node); | ||
121 | link = (reg >> 8) & 0x03; | 111 | link = (reg >> 8) & 0x03; |
122 | 112 | ||
123 | info = alloc_pci_root_info(min_bus, max_bus, node, link); | 113 | info = alloc_pci_root_info(min_bus, max_bus, node, link); |
diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c index f7d6800f10d1..d491deddebae 100644 --- a/arch/x86/pci/common.c +++ b/arch/x86/pci/common.c | |||
@@ -683,72 +683,3 @@ int pci_ext_cfg_avail(void) | |||
683 | else | 683 | else |
684 | return 0; | 684 | return 0; |
685 | } | 685 | } |
686 | |||
687 | /* | ||
688 | * NUMA info for PCI busses | ||
689 | * | ||
690 | * Early arch code is responsible for filling in reasonable values here. | ||
691 | * A node id of "-1" means "use current node". In other words, if a bus | ||
692 | * has a -1 node id, it's not tightly coupled to any particular chunk | ||
693 | * of memory (as is the case on some Nehalem systems). | ||
694 | */ | ||
695 | #ifdef CONFIG_NUMA | ||
696 | |||
697 | #define BUS_NR 256 | ||
698 | |||
699 | #ifdef CONFIG_X86_64 | ||
700 | |||
701 | static int mp_bus_to_node[BUS_NR] = { | ||
702 | [0 ... BUS_NR - 1] = -1 | ||
703 | }; | ||
704 | |||
705 | void set_mp_bus_to_node(int busnum, int node) | ||
706 | { | ||
707 | if (busnum >= 0 && busnum < BUS_NR) | ||
708 | mp_bus_to_node[busnum] = node; | ||
709 | } | ||
710 | |||
711 | int get_mp_bus_to_node(int busnum) | ||
712 | { | ||
713 | int node = -1; | ||
714 | |||
715 | if (busnum < 0 || busnum > (BUS_NR - 1)) | ||
716 | return node; | ||
717 | |||
718 | node = mp_bus_to_node[busnum]; | ||
719 | |||
720 | /* | ||
721 | * let numa_node_id to decide it later in dma_alloc_pages | ||
722 | * if there is no ram on that node | ||
723 | */ | ||
724 | if (node != -1 && !node_online(node)) | ||
725 | node = -1; | ||
726 | |||
727 | return node; | ||
728 | } | ||
729 | |||
730 | #else /* CONFIG_X86_32 */ | ||
731 | |||
732 | static int mp_bus_to_node[BUS_NR] = { | ||
733 | [0 ... BUS_NR - 1] = -1 | ||
734 | }; | ||
735 | |||
736 | void set_mp_bus_to_node(int busnum, int node) | ||
737 | { | ||
738 | if (busnum >= 0 && busnum < BUS_NR) | ||
739 | mp_bus_to_node[busnum] = (unsigned char) node; | ||
740 | } | ||
741 | |||
742 | int get_mp_bus_to_node(int busnum) | ||
743 | { | ||
744 | int node; | ||
745 | |||
746 | if (busnum < 0 || busnum > (BUS_NR - 1)) | ||
747 | return 0; | ||
748 | node = mp_bus_to_node[busnum]; | ||
749 | return node; | ||
750 | } | ||
751 | |||
752 | #endif /* CONFIG_X86_32 */ | ||
753 | |||
754 | #endif /* CONFIG_NUMA */ | ||