summaryrefslogtreecommitdiffstats
path: root/trace-events
diff options
context:
space:
mode:
authorGreg Kurz <gkurz@linux.vnet.ibm.com>2016-02-26 10:44:07 +0100
committerTimothy Pearson <tpearson@raptorengineering.com>2019-11-29 19:46:50 -0600
commit16635ea43a62439e35dacb5f940b6f6377b9c588 (patch)
tree2a4a10b459c0c4835fa44c72b5a8e1a7715e9b8d /trace-events
parentca21c6a465ffc10d7d281d8d78dff5740e02620b (diff)
downloadhqemu-16635ea43a62439e35dacb5f940b6f6377b9c588.zip
hqemu-16635ea43a62439e35dacb5f940b6f6377b9c588.tar.gz
xics: report errors with the QEMU Error API
Using the return value to report errors is error prone: - xics_alloc() returns -1 on error but spapr_vio_busdev_realize() errors on 0 - xics_alloc_block() returns the unclear value of ics->offset - 1 on error but both rtas_ibm_change_msi() and spapr_phb_realize() error on 0 This patch adds an errp argument to xics_alloc() and xics_alloc_block() to report errors. The return value of these functions is a valid IRQ number if errp is NULL. It is undefined otherwise. The corresponding error traces get promotted to error messages. Note that the "can't allocate IRQ" error message in spapr_vio_busdev_realize() also moves to xics_alloc(). Similar error message consolidation isn't really applicable to xics_alloc_block() because callers have extra context (device config address, MSI or MSIX). This fixes the issues mentioned above. Based on previous work from Brian W. Hart. Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'trace-events')
-rw-r--r--trace-events2
1 files changed, 0 insertions, 2 deletions
diff --git a/trace-events b/trace-events
index 61a133f..075ec27 100644
--- a/trace-events
+++ b/trace-events
@@ -1409,8 +1409,6 @@ xics_ics_write_xive(int nr, int srcno, int server, uint8_t priority) "ics_write_
xics_ics_reject(int nr, int srcno) "reject irq %#x [src %d]"
xics_ics_eoi(int nr) "ics_eoi: irq %#x"
xics_alloc(int src, int irq) "source#%d, irq %d"
-xics_alloc_failed_hint(int src, int irq) "source#%d, irq %d is already in use"
-xics_alloc_failed_no_left(int src) "source#%d, no irq left"
xics_alloc_block(int src, int first, int num, bool lsi, int align) "source#%d, first irq %d, %d irqs, lsi=%d, alignnum %d"
xics_ics_free(int src, int irq, int num) "Source#%d, first irq %d, %d irqs"
xics_ics_free_warn(int src, int irq) "Source#%d, irq %d is already free"
OpenPOWER on IntegriCloud