aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/pci
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-07-08 05:14:58 -0400
committerIngo Molnar <mingo@elte.hu>2008-07-08 05:14:58 -0400
commit3de352bbd86f890dd0c5e1c09a6a1b0b29e0f8ce (patch)
treed4c5eba8cd2abefd7c9f16d089393f0f5999cf63 /arch/x86/pci
parent1b8ba39a3fad9c58532f6dad12c94d6e675be656 (diff)
parent9340e1ccdf7b9b22a2be7f51cd74e8b5e11961bf (diff)
Merge branch 'x86/mpparse' into x86/devel
Conflicts: arch/x86/Kconfig arch/x86/kernel/io_apic_32.c arch/x86/kernel/setup_64.c arch/x86/mm/init_32.c Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/pci')
-rw-r--r--arch/x86/pci/Makefile_325
-rw-r--r--arch/x86/pci/amd_bus.c4
-rw-r--r--arch/x86/pci/numa.c29
3 files changed, 9 insertions, 29 deletions
diff --git a/arch/x86/pci/Makefile_32 b/arch/x86/pci/Makefile_32
index f647e7e56da4..a34fbf557926 100644
--- a/arch/x86/pci/Makefile_32
+++ b/arch/x86/pci/Makefile_32
@@ -13,10 +13,11 @@ pci-y := fixup.o
13pci-$(CONFIG_ACPI) += acpi.o 13pci-$(CONFIG_ACPI) += acpi.o
14pci-y += legacy.o irq.o 14pci-y += legacy.o irq.o
15 15
16# Careful: VISWS and NUMAQ overrule the pci-y above. The colons are 16# Careful: VISWS overrule the pci-y above. The colons are
17# therefor correct. This needs a proper fix by distangling the code. 17# therefor correct. This needs a proper fix by distangling the code.
18pci-$(CONFIG_X86_VISWS) := visws.o fixup.o 18pci-$(CONFIG_X86_VISWS) := visws.o fixup.o
19pci-$(CONFIG_X86_NUMAQ) := numa.o irq.o 19
20pci-$(CONFIG_X86_NUMAQ) += numa.o
20 21
21# Necessary for NUMAQ as well 22# Necessary for NUMAQ as well
22pci-$(CONFIG_NUMA) += mp_bus_to_node.o 23pci-$(CONFIG_NUMA) += mp_bus_to_node.o
diff --git a/arch/x86/pci/amd_bus.c b/arch/x86/pci/amd_bus.c
index 15f505d3a78e..d02c598451ec 100644
--- a/arch/x86/pci/amd_bus.c
+++ b/arch/x86/pci/amd_bus.c
@@ -388,7 +388,7 @@ static int __init early_fill_mp_bus_info(void)
388 /* need to take out [0, TOM) for RAM*/ 388 /* need to take out [0, TOM) for RAM*/
389 address = MSR_K8_TOP_MEM1; 389 address = MSR_K8_TOP_MEM1;
390 rdmsrl(address, val); 390 rdmsrl(address, val);
391 end = (val & 0xffffff8000000ULL); 391 end = (val & 0xffffff800000ULL);
392 printk(KERN_INFO "TOM: %016lx aka %ldM\n", end, end>>20); 392 printk(KERN_INFO "TOM: %016lx aka %ldM\n", end, end>>20);
393 if (end < (1ULL<<32)) 393 if (end < (1ULL<<32))
394 update_range(range, 0, end - 1); 394 update_range(range, 0, end - 1);
@@ -482,7 +482,7 @@ static int __init early_fill_mp_bus_info(void)
482 /* TOP_MEM2 */ 482 /* TOP_MEM2 */
483 address = MSR_K8_TOP_MEM2; 483 address = MSR_K8_TOP_MEM2;
484 rdmsrl(address, val); 484 rdmsrl(address, val);
485 end = (val & 0xffffff8000000ULL); 485 end = (val & 0xffffff800000ULL);
486 printk(KERN_INFO "TOM2: %016lx aka %ldM\n", end, end>>20); 486 printk(KERN_INFO "TOM2: %016lx aka %ldM\n", end, end>>20);
487 update_range(range, 1ULL<<32, end - 1); 487 update_range(range, 1ULL<<32, end - 1);
488 } 488 }
diff --git a/arch/x86/pci/numa.c b/arch/x86/pci/numa.c
index d9afbae5092b..99f1ecd485b5 100644
--- a/arch/x86/pci/numa.c
+++ b/arch/x86/pci/numa.c
@@ -6,45 +6,21 @@
6#include <linux/init.h> 6#include <linux/init.h>
7#include <linux/nodemask.h> 7#include <linux/nodemask.h>
8#include <mach_apic.h> 8#include <mach_apic.h>
9#include <asm/mpspec.h>
9#include "pci.h" 10#include "pci.h"
10 11
11#define XQUAD_PORTIO_BASE 0xfe400000 12#define XQUAD_PORTIO_BASE 0xfe400000
12#define XQUAD_PORTIO_QUAD 0x40000 /* 256k per quad. */ 13#define XQUAD_PORTIO_QUAD 0x40000 /* 256k per quad. */
13 14
14int mp_bus_id_to_node[MAX_MP_BUSSES];
15#define BUS2QUAD(global) (mp_bus_id_to_node[global]) 15#define BUS2QUAD(global) (mp_bus_id_to_node[global])
16 16
17int mp_bus_id_to_local[MAX_MP_BUSSES];
18#define BUS2LOCAL(global) (mp_bus_id_to_local[global]) 17#define BUS2LOCAL(global) (mp_bus_id_to_local[global])
19 18
20void mpc_oem_bus_info(struct mpc_config_bus *m, char *name,
21 struct mpc_config_translation *translation)
22{
23 int quad = translation->trans_quad;
24 int local = translation->trans_local;
25
26 mp_bus_id_to_node[m->mpc_busid] = quad;
27 mp_bus_id_to_local[m->mpc_busid] = local;
28 printk(KERN_INFO "Bus #%d is %s (node %d)\n",
29 m->mpc_busid, name, quad);
30}
31
32int quad_local_to_mp_bus_id [NR_CPUS/4][4];
33#define QUADLOCAL2BUS(quad,local) (quad_local_to_mp_bus_id[quad][local]) 19#define QUADLOCAL2BUS(quad,local) (quad_local_to_mp_bus_id[quad][local])
34void mpc_oem_pci_bus(struct mpc_config_bus *m,
35 struct mpc_config_translation *translation)
36{
37 int quad = translation->trans_quad;
38 int local = translation->trans_local;
39
40 quad_local_to_mp_bus_id[quad][local] = m->mpc_busid;
41}
42 20
43/* Where the IO area was mapped on multiquad, always 0 otherwise */ 21/* Where the IO area was mapped on multiquad, always 0 otherwise */
44void *xquad_portio; 22void *xquad_portio;
45#ifdef CONFIG_X86_NUMAQ
46EXPORT_SYMBOL(xquad_portio); 23EXPORT_SYMBOL(xquad_portio);
47#endif
48 24
49#define XQUAD_PORT_ADDR(port, quad) (xquad_portio + (XQUAD_PORTIO_QUAD*quad) + port) 25#define XQUAD_PORT_ADDR(port, quad) (xquad_portio + (XQUAD_PORTIO_QUAD*quad) + port)
50 26
@@ -179,6 +155,9 @@ static int __init pci_numa_init(void)
179{ 155{
180 int quad; 156 int quad;
181 157
158 if (!found_numaq)
159 return 0;
160
182 raw_pci_ops = &pci_direct_conf1_mq; 161 raw_pci_ops = &pci_direct_conf1_mq;
183 162
184 if (pcibios_scanned++) 163 if (pcibios_scanned++)