]> git.proxmox.com Git - mirror_qemu.git/commit - hw/ppc/spapr_drc.c
spapr: Clean up DR entity sense handling
authorDavid Gibson <david@gibson.dropbear.id.au>
Wed, 7 Jun 2017 01:26:52 +0000 (11:26 +1000)
committerDavid Gibson <david@gibson.dropbear.id.au>
Thu, 8 Jun 2017 04:38:26 +0000 (14:38 +1000)
commitf224d35be9fb971bf64b569b99ce2a582156bbf2
tree68c50c62d0bc1d3dd7390734b1cd191186e5d0c8
parent2c5534776b375bbaff3896420e41cb981d40e2bc
spapr: Clean up DR entity sense handling

DRC classes have an entity_sense method to determine (in a specific PAPR
sense) the presence or absence of a device plugged into a DRC.  However,
we only have one implementation of the method, which explicitly tests for
different DRC types.  This changes it to instead have different method
implementations for the two cases: "logical" and "physical" DRCs.

While we're at it, the entity sense method always returns RTAS_OUT_SUCCESS,
and the interesting value is returned via pass-by-reference.  Simplify this
to directly return the value we care about

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Acked-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/ppc/spapr_drc.c
hw/ppc/spapr_pci.c
hw/ppc/trace-events
include/hw/ppc/spapr_drc.h