From: John Rose <johnrose@austin.ibm.com>
To: benh@kernel.crashing.org
Cc: External List <linuxppc-dev@ozlabs.org>,
Paul Mackerras <paulus@samba.org>
Subject: [PATCH] powerpc: dynamic probe - use ppc_md.pci_probe_mode()
Date: Fri, 24 Mar 2006 11:25:32 -0600 [thread overview]
Message-ID: <1143221132.2567.26.camel@sinatra.austin.ibm.com> (raw)
In-Reply-To: <1143220753.2567.22.camel@sinatra.austin.ibm.com>
Change the dynamic PCI probe function for pSeries to use
ppc_md.pci_probe_mode() when appropriate.
Signed-off-by: John Rose <johnrose@austin.ibm.com>
---
Actually - how about a version without debug prints!? Original change
suggested by BenH. Tested on POWER5.
Thanks-
John
diff -puN arch/powerpc/platforms/pseries/pci_dlpar.c~use_probe_mode arch/powerpc/platforms/pseries/pci_dlpar.c
--- 2_6_linus/arch/powerpc/platforms/pseries/pci_dlpar.c~use_probe_mode 2006-03-24 09:57:08.000000000 -0600
+++ 2_6_linus-johnrose/arch/powerpc/platforms/pseries/pci_dlpar.c 2006-03-24 11:26:23.000000000 -0600
@@ -152,20 +152,24 @@ pcibios_pci_config_bridge(struct pci_dev
void
pcibios_add_pci_devices(struct pci_bus * bus)
{
- int slotno, num;
+ int slotno, num, mode;
struct pci_dev *dev;
struct device_node *dn = pci_bus_to_OF_node(bus);
eeh_add_device_tree_early(dn);
- if (_machine == PLATFORM_PSERIES_LPAR) {
+ mode = PCI_PROBE_NORMAL;
+ if (ppc_md.pci_probe_mode)
+ mode = ppc_md.pci_probe_mode(bus);
+
+ if (mode == PCI_PROBE_DEVTREE) {
/* use ofdt-based probe */
of_scan_bus(dn, bus);
if (!list_empty(&bus->devices)) {
pcibios_fixup_new_pci_devices(bus, 0);
pci_bus_add_devices(bus);
}
- } else {
+ } else if (mode == PCI_PROBE_NORMAL) {
/* use legacy probe */
slotno = PCI_SLOT(PCI_DN(dn->child)->devfn);
num = pci_scan_slot(bus, PCI_DEVFN(slotno, 0));
_
next prev parent reply other threads:[~2006-03-24 17:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-24 17:19 [PATCH] powerpc: dynamic probe - use ppc_md.pci_probe_mode() John Rose
2006-03-24 17:25 ` John Rose [this message]
2006-03-24 22:48 ` Linas Vepstas
2006-03-24 23:03 ` Linas Vepstas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1143221132.2567.26.camel@sinatra.austin.ibm.com \
--to=johnrose@austin.ibm.com \
--cc=benh@kernel.crashing.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).