diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2015-09-10 14:35:52 +1000 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2015-10-07 18:42:02 +1100 |
commit | 72f0f43d60718ff4de7430b425b430343223cbac (patch) | |
tree | 755a8abf2f14677ffe7e3e68eece92fba46f0b39 /hw/p7ioc-phb.c | |
parent | 516424269edde1a53d40a34ecc540503b6e0b38b (diff) | |
download | skiboot-72f0f43d60718ff4de7430b425b430343223cbac.zip skiboot-72f0f43d60718ff4de7430b425b430343223cbac.tar.gz skiboot-72f0f43d60718ff4de7430b425b430343223cbac.tar.bz2 |
pci: Use a fixed numbering of PHBs on OPAL and improve log consistency
On P8, we calculate the OPAL ID of the PHB as a function of the physical
chip number and PHB index on that chip. P7 continues using "allocated"
numbers for now.
We also consistently print the PHB ID as a 4-digit hex number which
facilitates decoding it, and print the chip:index location in the probe
code to make it easier to correlate log entries.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
[stewart@linux.vnet.ibm.com: use next_chip rather than get_chip]
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw/p7ioc-phb.c')
-rw-r--r-- | hw/p7ioc-phb.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/p7ioc-phb.c b/hw/p7ioc-phb.c index 5167832..4ea0369 100644 --- a/hw/p7ioc-phb.c +++ b/hw/p7ioc-phb.c @@ -26,9 +26,9 @@ #include <opal.h> #include <ccan/str/str.h> -#define PHBDBG(p, fmt, a...) prlog(PR_DEBUG, "PHB%d: " fmt, \ +#define PHBDBG(p, fmt, a...) prlog(PR_DEBUG, "PHB#%04x: " fmt, \ (p)->phb.opal_id, ## a) -#define PHBERR(p, fmt, a...) prlog(PR_ERR, "PHB%d: " fmt, \ +#define PHBERR(p, fmt, a...) prlog(PR_ERR, "PHB#%04x: " fmt, \ (p)->phb.opal_id, ## a) /* Helper to select an IODA table entry */ @@ -2929,7 +2929,7 @@ void p7ioc_phb_setup(struct p7ioc *ioc, uint8_t index) /* We register the PHB before we initialize it so we * get a useful OPAL ID for it */ - pci_register_phb(&p->phb); + pci_register_phb(&p->phb, -1); /* Platform additional setup */ if (platform.pci_setup_phb) |