x86/pci: AMD one chain system to use pci read out res
authorYinghai Lu <yinghai@kernel.org>
Wed, 10 Feb 2010 09:20:09 +0000 (01:20 -0800)
committerH. Peter Anvin <hpa@zytor.com>
Thu, 11 Feb 2010 01:47:17 +0000 (17:47 -0800)
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>
arch/x86/pci/amd_bus.c
arch/x86/pci/bus_numa.c
arch/x86/pci/bus_numa.h

index 2356ea18697d151b8bb3e38bbf5ee4aaf278af24..ae50b8fa0c60400d6da3d73aa9cf130a929f8096 100644 (file)
@@ -87,11 +87,12 @@ static int __init early_fill_mp_bus_info(void)
        struct range range[RANGE_NUM];
        u64 val;
        u32 address;
+       bool found;
 
        if (!early_pci_allowed())
                return -1;
 
-       found_all_numa_early = 0;
+       found = false;
        for (i = 0; i < ARRAY_SIZE(pci_probes); i++) {
                u32 id;
                u16 device;
@@ -105,12 +106,12 @@ static int __init early_fill_mp_bus_info(void)
                device = (id>>16) & 0xffff;
                if (pci_probes[i].vendor == vendor &&
                    pci_probes[i].device == device) {
-                       found_all_numa_early = 1;
+                       found = true;
                        break;
                }
        }
 
-       if (!found_all_numa_early)
+       if (!found)
                return 0;
 
        pci_root_num = 0;
index 30f65cecd65f6551bf1204f8e284f5f72464f279..3411687b676e88eacd635e10c7f7c2fd5ee31265 100644 (file)
@@ -5,7 +5,6 @@
 
 int pci_root_num;
 struct pci_root_info pci_root_info[PCI_ROOT_NR];
-int found_all_numa_early;
 
 void x86_pci_root_bus_res_quirks(struct pci_bus *b)
 {
@@ -21,10 +20,6 @@ void x86_pci_root_bus_res_quirks(struct pci_bus *b)
        if (!pci_root_num)
                return;
 
-       /* for amd, if only one root bus, don't need to do anything */
-       if (pci_root_num < 2 && found_all_numa_early)
-               return;
-
        for (i = 0; i < pci_root_num; i++) {
                if (pci_root_info[i].bus_min == b->number)
                        break;
index 374ecc5ead427387ac9c89e4725b1a34dc63c1df..f63e80294f22c77cbdcc8842d77f162ec93f0edd 100644 (file)
@@ -20,7 +20,6 @@ struct pci_root_info {
 #define PCI_ROOT_NR 4
 extern int pci_root_num;
 extern struct pci_root_info pci_root_info[PCI_ROOT_NR];
-extern int found_all_numa_early;
 
 extern void update_res(struct pci_root_info *info, resource_size_t start,
                      resource_size_t end, unsigned long flags, int merge);