From: Michael R. <md...@li...> - 2015-05-18 23:55:54
|
Currently we fail to release a PHB to firmware if we're unable to remove the PHB's interrupt-controller node from the guest device tree. However, according to update_phb_ic_info(): "... there can be more ICs than PHBs on a system. In this case, some ICs won't have my-drc-index." In such cases, we don't assign the 'interrupt-controller*' path to the PHB's OF node, so simply skip the IC node removal (it either doesn't exist, or is not not owned by this PHB) when this occurs and proceed with releasing the PHB. Signed-off-by: Michael Roth <md...@li...> --- src/drmgr/drslot_chrp_phb.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/drmgr/drslot_chrp_phb.c b/src/drmgr/drslot_chrp_phb.c index eda10eb..5fb25cb 100644 --- a/src/drmgr/drslot_chrp_phb.c +++ b/src/drmgr/drslot_chrp_phb.c @@ -75,9 +75,11 @@ release_phb(struct dr_node *phb) if (rc) return rc; - rc = remove_device_tree_nodes(phb->phb_ic_ofdt_path); - if (rc) - return rc; + if (phb->phb_ic_ofdt_path[0] != '\0') { + rc = remove_device_tree_nodes(phb->phb_ic_ofdt_path); + if (rc) + return rc; + } rc = release_drc(phb->drc_index, PHB_DEV); -- 1.9.1 |