Commit 151d16d531c5bc60bad9dc62102be18f11b4280a
1 parent
dcce6dc486
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
alpha/PCI: replace pci_probe_only with pci_flags
Some architectures (alpha, mips, powerpc) have an arch-specific "pci_probe_only" flag. Others use PCI_PROBE_ONLY in pci_flags for the same purpose. This moves alpha to the pci_flags approach so generic code can use the same test across all architectures. CC: linux-alpha@vger.kernel.org Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Showing 5 changed files with 12 additions and 13 deletions Side-by-side Diff
arch/alpha/include/asm/pci.h
arch/alpha/kernel/pci.c
... | ... | @@ -43,12 +43,10 @@ |
43 | 43 | |
44 | 44 | const char pci_hae0_name[] = "HAE0"; |
45 | 45 | |
46 | -/* Indicate whether we respect the PCI setup left by console. */ | |
47 | 46 | /* |
48 | - * Make this long-lived so that we know when shutting down | |
49 | - * whether we probed only or not. | |
47 | + * If PCI_PROBE_ONLY in pci_flags is set, we don't change any PCI resource | |
48 | + * assignments. | |
50 | 49 | */ |
51 | -int pci_probe_only; | |
52 | 50 | |
53 | 51 | /* |
54 | 52 | * The PCI controller list. |
... | ... | @@ -215,7 +213,7 @@ |
215 | 213 | struct pdev_srm_saved_conf *tmp; |
216 | 214 | static int printed = 0; |
217 | 215 | |
218 | - if (!alpha_using_srm || pci_probe_only) | |
216 | + if (!alpha_using_srm || pci_has_flag(PCI_PROBE_ONLY)) | |
219 | 217 | return; |
220 | 218 | |
221 | 219 | if (!printed) { |
... | ... | @@ -242,7 +240,7 @@ |
242 | 240 | struct pdev_srm_saved_conf *tmp; |
243 | 241 | |
244 | 242 | /* No need to restore if probed only. */ |
245 | - if (pci_probe_only) | |
243 | + if (pci_has_flag(PCI_PROBE_ONLY)) | |
246 | 244 | return; |
247 | 245 | |
248 | 246 | /* Restore SRM config. */ |
... | ... | @@ -283,7 +281,7 @@ |
283 | 281 | { |
284 | 282 | struct pci_dev *dev = bus->self; |
285 | 283 | |
286 | - if (pci_probe_only && dev && | |
284 | + if (pci_has_flag(PCI_PROBE_ONLY) && dev && | |
287 | 285 | (dev->class >> 8) == PCI_CLASS_BRIDGE_PCI) { |
288 | 286 | pci_read_bridge_bases(bus); |
289 | 287 | pcibios_fixup_device_resources(dev, bus); |
... | ... | @@ -374,7 +372,8 @@ |
374 | 372 | |
375 | 373 | if (r->parent || !r->start || !r->flags) |
376 | 374 | continue; |
377 | - if (pci_probe_only || (r->flags & IORESOURCE_PCI_FIXED)) | |
375 | + if (pci_has_flag(PCI_PROBE_ONLY) || | |
376 | + (r->flags & IORESOURCE_PCI_FIXED)) | |
378 | 377 | pci_claim_resource(dev, i); |
379 | 378 | } |
380 | 379 | } |
arch/alpha/kernel/pci_impl.h
... | ... | @@ -173,9 +173,6 @@ |
173 | 173 | extern struct pci_controller *hose_head, **hose_tail; |
174 | 174 | extern struct pci_controller *pci_isa_hose; |
175 | 175 | |
176 | -/* Indicate that we trust the console to configure things properly. */ | |
177 | -extern int pci_probe_only; | |
178 | - | |
179 | 176 | extern unsigned long alpha_agpgart_size; |
180 | 177 | |
181 | 178 | extern void common_init_pci(void); |
arch/alpha/kernel/sys_marvel.c
arch/alpha/kernel/sys_titan.c