mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
pseries: Remove hcalls callback
For forgotten historical reasons, PAPR hypercalls for specific virtual IO devices (oh which there are quite a number) are registered via a callback in the VIOsPAPRDeviceInfo structure. This is kind of ugly, so this patch instead registers hypercalls from device_init() functions for each device type. This works just as well, and is cleaner. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
parent
157feeadba
commit
1fc02533e7
4 changed files with 8 additions and 32 deletions
|
@ -684,7 +684,6 @@ VIOsPAPRBus *spapr_vio_bus_init(void)
|
|||
VIOsPAPRBus *bus;
|
||||
BusState *qbus;
|
||||
DeviceState *dev;
|
||||
DeviceInfo *qinfo;
|
||||
|
||||
/* Create bridge device */
|
||||
dev = qdev_create(NULL, "spapr-vio-bridge");
|
||||
|
@ -711,18 +710,6 @@ VIOsPAPRBus *spapr_vio_bus_init(void)
|
|||
spapr_rtas_register("ibm,set-tce-bypass", rtas_set_tce_bypass);
|
||||
spapr_rtas_register("quiesce", rtas_quiesce);
|
||||
|
||||
for (qinfo = device_info_list; qinfo; qinfo = qinfo->next) {
|
||||
VIOsPAPRDeviceInfo *info = (VIOsPAPRDeviceInfo *)qinfo;
|
||||
|
||||
if (qinfo->bus_info != &spapr_vio_bus_info) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (info->hcalls) {
|
||||
info->hcalls(bus);
|
||||
}
|
||||
}
|
||||
|
||||
return bus;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue