Commit 3e3da00c01d050307e753fb7b3e84aefc16da0d0
Committed by
H. Peter Anvin
1 parent
b74fd238a9
Exists in
master
and in
7 other branches
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>
Showing 3 changed files with 4 additions and 9 deletions Side-by-side Diff
arch/x86/pci/amd_bus.c
... | ... | @@ -87,11 +87,12 @@ |
87 | 87 | struct range range[RANGE_NUM]; |
88 | 88 | u64 val; |
89 | 89 | u32 address; |
90 | + bool found; | |
90 | 91 | |
91 | 92 | if (!early_pci_allowed()) |
92 | 93 | return -1; |
93 | 94 | |
94 | - found_all_numa_early = 0; | |
95 | + found = false; | |
95 | 96 | for (i = 0; i < ARRAY_SIZE(pci_probes); i++) { |
96 | 97 | u32 id; |
97 | 98 | u16 device; |
98 | 99 | |
... | ... | @@ -105,12 +106,12 @@ |
105 | 106 | device = (id>>16) & 0xffff; |
106 | 107 | if (pci_probes[i].vendor == vendor && |
107 | 108 | pci_probes[i].device == device) { |
108 | - found_all_numa_early = 1; | |
109 | + found = true; | |
109 | 110 | break; |
110 | 111 | } |
111 | 112 | } |
112 | 113 | |
113 | - if (!found_all_numa_early) | |
114 | + if (!found) | |
114 | 115 | return 0; |
115 | 116 | |
116 | 117 | pci_root_num = 0; |
arch/x86/pci/bus_numa.c
... | ... | @@ -5,7 +5,6 @@ |
5 | 5 | |
6 | 6 | int pci_root_num; |
7 | 7 | struct pci_root_info pci_root_info[PCI_ROOT_NR]; |
8 | -int found_all_numa_early; | |
9 | 8 | |
10 | 9 | void x86_pci_root_bus_res_quirks(struct pci_bus *b) |
11 | 10 | { |
... | ... | @@ -19,10 +18,6 @@ |
19 | 18 | return; |
20 | 19 | |
21 | 20 | if (!pci_root_num) |
22 | - return; | |
23 | - | |
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 | 21 | return; |
27 | 22 | |
28 | 23 | for (i = 0; i < pci_root_num; i++) { |
arch/x86/pci/bus_numa.h
... | ... | @@ -20,7 +20,6 @@ |
20 | 20 | #define PCI_ROOT_NR 4 |
21 | 21 | extern int pci_root_num; |
22 | 22 | extern struct pci_root_info pci_root_info[PCI_ROOT_NR]; |
23 | -extern int found_all_numa_early; | |
24 | 23 | |
25 | 24 | extern void update_res(struct pci_root_info *info, resource_size_t start, |
26 | 25 | resource_size_t end, unsigned long flags, int merge); |