pnv_phb4_pec: Only export existing PHBs to the device tree
commitcd9b1cf96e11befa490e0252b57d46baa33458ea
authorFrederic Barrat <fbarrat@linux.ibm.com>
Thu, 2 Mar 2023 16:37:13 +0000 (2 17:37 +0100)
committerDaniel Henrique Barboza <danielhb413@gmail.com>
Fri, 3 Mar 2023 19:50:17 +0000 (3 16:50 -0300)
treee94d9a5d11d11d610198449e673e97b837c4285a
parent1068ebb60642a6da4bcece4859416a5abd00116c
pnv_phb4_pec: Only export existing PHBs to the device tree

So far, we were always exporting all possible PHBs to the device
tree. It works well when using the default config but it potentially
adds non-existing devices when using '-nodefaults' and user-created
PHBs, causing the firmware (skiboot) to report errors when probing
those PHBs. This patch only exports PHBs which have been realized to
the device tree.

Fixes: d786be3fe746 ("ppc/pnv: enable user created pnv-phb for powernv9")
Signed-off-by: Frederic Barrat <fbarrat@linux.ibm.com>
Message-Id: <20230302163715.129635-3-fbarrat@linux.ibm.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
hw/pci-host/pnv_phb4_pec.c