41 if (info->
node == node && info->
link == link)
52 for (j = min_bus; j <=
max_bus; j++)
53 set_mp_bus_to_node(j, node);
62 static int __init early_fill_mp_bus_info(
void)
79 struct resource fam10h_mmconf_res, *fam10h_mmconf;
80 u64 fam10h_mmconf_start;
81 u64 fam10h_mmconf_end;
92 bus = pci_probes[
i].bus;
93 slot = pci_probes[
i].slot;
97 device = (
id>>16) & 0xffff;
98 if (pci_probes[i].vendor == vendor &&
99 pci_probes[i].device == device) {
108 for (i = 0; i < 4; i++) {
117 min_bus = (reg >> 16) & 0xff;
118 max_bus = (reg >> 24) & 0xff;
119 node = (reg >> 4) & 0x07;
120 set_mp_bus_range_to_node(min_bus, max_bus, node);
121 link = (reg >> 8) & 0x03;
128 def_node = (reg >> 8) & 0x07;
130 def_link = (reg >> 8) & 0x03;
135 for (i = 0; i < 4; i++) {
140 start = reg & 0xfff000;
143 link = (reg >> 4) & 0x03;
144 end = (reg & 0xfff000) | 0xfff;
146 info = find_pci_root_info(node, link);
151 node, link, start, end);
161 info = find_pci_root_info(def_node, def_link);
174 end = cap_resource((0xfdULL<<32) - 1);
180 rdmsrl(address, val);
181 end = (val & 0xffffff800000ULL);
183 if (end < (1ULL<<32))
191 fam10h_mmconf_start = fam10h_mmconf->
start;
192 fam10h_mmconf_end = fam10h_mmconf->
end;
194 fam10h_mmconf_end + 1);
196 fam10h_mmconf_start = 0;
197 fam10h_mmconf_end = 0;
201 for (i = 0; i < 8; i++) {
206 start = reg & 0xffffff00;
210 link = (reg >> 4) & 0x03;
211 end = (reg & 0xffffff00);
215 info = find_pci_root_info(node, link);
221 node, link, start, end);
226 if (fam10h_mmconf_end) {
229 if (start >= fam10h_mmconf_start &&
230 start <= fam10h_mmconf_end) {
231 start = fam10h_mmconf_end + 1;
235 if (end >= fam10h_mmconf_start &&
236 end <= fam10h_mmconf_end) {
237 end = fam10h_mmconf_start - 1;
241 if (start < fam10h_mmconf_start &&
242 end > fam10h_mmconf_end) {
244 endx = fam10h_mmconf_start - 1;
249 start = fam10h_mmconf_end + 1;
254 printk(
KERN_CONT " %s [%llx, %llx]", endx ?
"and" :
"==>", start, end);
262 update_res(info, cap_resource(start), cap_resource(end),
271 rdmsrl(address, val);
276 rdmsrl(address, val);
277 end = (val & 0xffffff800000ULL);
286 info = find_pci_root_info(def_node, def_link);
293 cap_resource(
range[i].end - 1),
302 busnum = info->
busn.start;
307 busnum, &root_res->
res);
313 #define ENABLE_CF8_EXT_CFG (1ULL << 46)
326 unsigned long action,
void *hcpu)
341 .notifier_call = amd_cpu_notify,
344 static void __init pci_enable_pci_io_ecs(
void)
371 static int __init pci_io_ecs_init(
void)
381 pci_enable_pci_io_ecs();
383 register_cpu_notifier(&amd_cpu_notifier);
385 amd_cpu_notify(&amd_cpu_notifier, (
unsigned long)
CPU_ONLINE,
392 static
int __init amd_postcore_init(
void)
397 early_fill_mp_bus_info();