diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-29 11:26:51 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-29 11:26:51 -0400 |
commit | 5f78e4d33945b291d12765cdd7e4304f437b9361 (patch) | |
tree | 113cea729de15a98bb941cc4afb8d13301534ca7 /arch/x86/mm/k8topology_64.c | |
parent | 867a89e0b73af48838c7987e80899a1ff26dd6ff (diff) | |
parent | 5f0b2976cb2b62668a076f54419c24b8ab677167 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86-bigbox-pci
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86-bigbox-pci:
x86: add pci=check_enable_amd_mmconf and dmi check
x86: work around io allocation overlap of HT links
acpi: get boot_cpu_id as early for k8_scan_nodes
x86_64: don't need set default res if only have one root bus
x86: double check the multi root bus with fam10h mmconf
x86: multi pci root bus with different io resource range, on 64-bit
x86: use bus conf in NB conf fun1 to get bus range on, on 64-bit
x86: get mp_bus_to_node early
x86 pci: remove checking type for mmconfig probe
x86: remove unneeded check in mmconf reject
driver core: try parent numa_node at first before using default
x86: seperate mmconf for fam10h out from setup_64.c
x86: if acpi=off, force setting the mmconf for fam10h
x86_64: check MSR to get MMCONFIG for AMD Family 10h
x86_64: check and enable MMCONFIG for AMD Family 10h
x86_64: set cfg_size for AMD Family 10h in case MMCONFIG
x86: mmconf enable mcfg early
x86: clear pci_mmcfg_virt when mmcfg get rejected
x86: validate against acpi motherboard resources
Fixed up fairly trivial conflicts in arch/x86/pci/{init.c,pci.h} due to
OLPC support manually.
Diffstat (limited to 'arch/x86/mm/k8topology_64.c')
-rw-r--r-- | arch/x86/mm/k8topology_64.c | 38 |
1 files changed, 37 insertions, 1 deletions
diff --git a/arch/x86/mm/k8topology_64.c b/arch/x86/mm/k8topology_64.c index 86808e666f9c..1f476e477844 100644 --- a/arch/x86/mm/k8topology_64.c +++ b/arch/x86/mm/k8topology_64.c | |||
@@ -13,12 +13,15 @@ | |||
13 | #include <linux/nodemask.h> | 13 | #include <linux/nodemask.h> |
14 | #include <asm/io.h> | 14 | #include <asm/io.h> |
15 | #include <linux/pci_ids.h> | 15 | #include <linux/pci_ids.h> |
16 | #include <linux/acpi.h> | ||
16 | #include <asm/types.h> | 17 | #include <asm/types.h> |
17 | #include <asm/mmzone.h> | 18 | #include <asm/mmzone.h> |
18 | #include <asm/proto.h> | 19 | #include <asm/proto.h> |
19 | #include <asm/e820.h> | 20 | #include <asm/e820.h> |
20 | #include <asm/pci-direct.h> | 21 | #include <asm/pci-direct.h> |
21 | #include <asm/numa.h> | 22 | #include <asm/numa.h> |
23 | #include <asm/mpspec.h> | ||
24 | #include <asm/apic.h> | ||
22 | 25 | ||
23 | static __init int find_northbridge(void) | 26 | static __init int find_northbridge(void) |
24 | { | 27 | { |
@@ -44,6 +47,30 @@ static __init int find_northbridge(void) | |||
44 | return -1; | 47 | return -1; |
45 | } | 48 | } |
46 | 49 | ||
50 | static __init void early_get_boot_cpu_id(void) | ||
51 | { | ||
52 | /* | ||
53 | * need to get boot_cpu_id so can use that to create apicid_to_node | ||
54 | * in k8_scan_nodes() | ||
55 | */ | ||
56 | /* | ||
57 | * Find possible boot-time SMP configuration: | ||
58 | */ | ||
59 | early_find_smp_config(); | ||
60 | #ifdef CONFIG_ACPI | ||
61 | /* | ||
62 | * Read APIC information from ACPI tables. | ||
63 | */ | ||
64 | early_acpi_boot_init(); | ||
65 | #endif | ||
66 | /* | ||
67 | * get boot-time SMP configuration: | ||
68 | */ | ||
69 | if (smp_found_config) | ||
70 | early_get_smp_config(); | ||
71 | early_init_lapic_mapping(); | ||
72 | } | ||
73 | |||
47 | int __init k8_scan_nodes(unsigned long start, unsigned long end) | 74 | int __init k8_scan_nodes(unsigned long start, unsigned long end) |
48 | { | 75 | { |
49 | unsigned long prevbase; | 76 | unsigned long prevbase; |
@@ -56,6 +83,7 @@ int __init k8_scan_nodes(unsigned long start, unsigned long end) | |||
56 | unsigned cores; | 83 | unsigned cores; |
57 | unsigned bits; | 84 | unsigned bits; |
58 | int j; | 85 | int j; |
86 | unsigned apicid_base; | ||
59 | 87 | ||
60 | if (!early_pci_allowed()) | 88 | if (!early_pci_allowed()) |
61 | return -1; | 89 | return -1; |
@@ -174,11 +202,19 @@ int __init k8_scan_nodes(unsigned long start, unsigned long end) | |||
174 | /* use the coreid bits from early_identify_cpu */ | 202 | /* use the coreid bits from early_identify_cpu */ |
175 | bits = boot_cpu_data.x86_coreid_bits; | 203 | bits = boot_cpu_data.x86_coreid_bits; |
176 | cores = (1<<bits); | 204 | cores = (1<<bits); |
205 | apicid_base = 0; | ||
206 | /* need to get boot_cpu_id early for system with apicid lifting */ | ||
207 | early_get_boot_cpu_id(); | ||
208 | if (boot_cpu_physical_apicid > 0) { | ||
209 | printk(KERN_INFO "BSP APIC ID: %02x\n", | ||
210 | boot_cpu_physical_apicid); | ||
211 | apicid_base = boot_cpu_physical_apicid; | ||
212 | } | ||
177 | 213 | ||
178 | for (i = 0; i < 8; i++) { | 214 | for (i = 0; i < 8; i++) { |
179 | if (nodes[i].start != nodes[i].end) { | 215 | if (nodes[i].start != nodes[i].end) { |
180 | nodeid = nodeids[i]; | 216 | nodeid = nodeids[i]; |
181 | for (j = 0; j < cores; j++) | 217 | for (j = apicid_base; j < cores + apicid_base; j++) |
182 | apicid_to_node[(nodeid << bits) + j] = i; | 218 | apicid_to_node[(nodeid << bits) + j] = i; |
183 | setup_node_bootmem(i, nodes[i].start, nodes[i].end); | 219 | setup_node_bootmem(i, nodes[i].start, nodes[i].end); |
184 | } | 220 | } |