aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/pci
diff options
context:
space:
mode:
authorYinghai Lu <yinghai@kernel.org>2010-02-10 04:20:09 -0500
committerH. Peter Anvin <hpa@zytor.com>2010-02-10 20:47:17 -0500
commit3e3da00c01d050307e753fb7b3e84aefc16da0d0 (patch)
tree582f5dc19c1c4d3421781e51e3ab0f4448a2315f /arch/x86/pci
parentb74fd238a9cf39a81d94152f375b756bf795b4af (diff)
x86/pci: AMD one chain system to use pci read out res
Found MSI amd k8 based laptops is hiding [0x70000000, 0x80000000) RAM from e820. enable amd one chain even for all. -v2: use bool for found, according to Andrew Signed-off-by: Yinghai Lu <yinghai@kernel.org> LKML-Reference: <1265793639-15071-6-git-send-email-yinghai@kernel.org> Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch/x86/pci')
-rw-r--r--arch/x86/pci/amd_bus.c7
-rw-r--r--arch/x86/pci/bus_numa.c5
-rw-r--r--arch/x86/pci/bus_numa.h1
3 files changed, 4 insertions, 9 deletions
diff --git a/arch/x86/pci/amd_bus.c b/arch/x86/pci/amd_bus.c
index 2356ea18697d..ae50b8fa0c60 100644
--- a/arch/x86/pci/amd_bus.c
+++ b/arch/x86/pci/amd_bus.c
@@ -87,11 +87,12 @@ static int __init early_fill_mp_bus_info(void)
87 struct range range[RANGE_NUM]; 87 struct range range[RANGE_NUM];
88 u64 val; 88 u64 val;
89 u32 address; 89 u32 address;
90 bool found;
90 91
91 if (!early_pci_allowed()) 92 if (!early_pci_allowed())
92 return -1; 93 return -1;
93 94
94 found_all_numa_early = 0; 95 found = false;
95 for (i = 0; i < ARRAY_SIZE(pci_probes); i++) { 96 for (i = 0; i < ARRAY_SIZE(pci_probes); i++) {
96 u32 id; 97 u32 id;
97 u16 device; 98 u16 device;
@@ -105,12 +106,12 @@ static int __init early_fill_mp_bus_info(void)
105 device = (id>>16) & 0xffff; 106 device = (id>>16) & 0xffff;
106 if (pci_probes[i].vendor == vendor && 107 if (pci_probes[i].vendor == vendor &&
107 pci_probes[i].device == device) { 108 pci_probes[i].device == device) {
108 found_all_numa_early = 1; 109 found = true;
109 break; 110 break;
110 } 111 }
111 } 112 }
112 113
113 if (!found_all_numa_early) 114 if (!found)
114 return 0; 115 return 0;
115 116
116 pci_root_num = 0; 117 pci_root_num = 0;
diff --git a/arch/x86/pci/bus_numa.c b/arch/x86/pci/bus_numa.c
index 30f65cecd65f..3411687b676e 100644
--- a/arch/x86/pci/bus_numa.c
+++ b/arch/x86/pci/bus_numa.c
@@ -5,7 +5,6 @@
5 5
6int pci_root_num; 6int pci_root_num;
7struct pci_root_info pci_root_info[PCI_ROOT_NR]; 7struct pci_root_info pci_root_info[PCI_ROOT_NR];
8int found_all_numa_early;
9 8
10void x86_pci_root_bus_res_quirks(struct pci_bus *b) 9void x86_pci_root_bus_res_quirks(struct pci_bus *b)
11{ 10{
@@ -21,10 +20,6 @@ void x86_pci_root_bus_res_quirks(struct pci_bus *b)
21 if (!pci_root_num) 20 if (!pci_root_num)
22 return; 21 return;
23 22
24 /* for amd, if only one root bus, don't need to do anything */
25 if (pci_root_num < 2 && found_all_numa_early)
26 return;
27
28 for (i = 0; i < pci_root_num; i++) { 23 for (i = 0; i < pci_root_num; i++) {
29 if (pci_root_info[i].bus_min == b->number) 24 if (pci_root_info[i].bus_min == b->number)
30 break; 25 break;
diff --git a/arch/x86/pci/bus_numa.h b/arch/x86/pci/bus_numa.h
index 374ecc5ead42..f63e80294f22 100644
--- a/arch/x86/pci/bus_numa.h
+++ b/arch/x86/pci/bus_numa.h
@@ -20,7 +20,6 @@ struct pci_root_info {
20#define PCI_ROOT_NR 4 20#define PCI_ROOT_NR 4
21extern int pci_root_num; 21extern int pci_root_num;
22extern struct pci_root_info pci_root_info[PCI_ROOT_NR]; 22extern struct pci_root_info pci_root_info[PCI_ROOT_NR];
23extern int found_all_numa_early;
24 23
25extern void update_res(struct pci_root_info *info, resource_size_t start, 24extern void update_res(struct pci_root_info *info, resource_size_t start,
26 resource_size_t end, unsigned long flags, int merge); 25 resource_size_t end, unsigned long flags, int merge);