From: Sam Bobroff Date: Tue, 1 Sep 2015 01:23:47 +0000 (+1000) Subject: spapr: Make ibm, change-msi respect 3 return values X-Git-Tag: TizenStudio_2.0_p2.3.2~120^2~1^2~170^2~31 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b359bd6a424b8de7db994d7120e87a7465b69337;p=sdk%2Femulator%2Fqemu.git spapr: Make ibm, change-msi respect 3 return values Currently, rtas_ibm_change_msi() always returns four values even if less are specified. Correct this by only returning the fourth parameter if it was requested. This is specified by PAPR. Signed-off-by: Sam Bobroff Reviewed-by: David Gibson Signed-off-by: David Gibson --- diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c index a2feb4c..6782fd0 100644 --- a/hw/ppc/spapr_pci.c +++ b/hw/ppc/spapr_pci.c @@ -375,7 +375,9 @@ out: rtas_st(rets, 0, RTAS_OUT_SUCCESS); rtas_st(rets, 1, req_num); rtas_st(rets, 2, ++seq_num); - rtas_st(rets, 3, ret_intr_type); + if (nret > 3) { + rtas_st(rets, 3, ret_intr_type); + } trace_spapr_pci_rtas_ibm_change_msi(config_addr, func, req_num, irq); }