Skip to content

Commit b4f5bd6

Browse files
hfreudeVasily Gorbik
authored andcommitted
s390/ap: Refine AP bus bindings complete processing
With the rework of the AP bus scan and the introduction of a bindings complete completion also the timing until the userspace finally receives a AP bus binding complete uevent had increased. Unfortunately this event triggers some important jobs for preparation of KVM guests, for example the modification of card/queue masks to reassign AP resources to the alternate AP queue device driver (vfio_ap) which is the precondition for building mediated devices which may be a precondition for starting KVM guests using AP resources. This small fix now triggers the check for binding complete each time an AP device driver has registered. With this patch the bindings complete may be posted up to 30s earlier as there is no need to wait for the next AP bus scan any more. Fixes: 778412a ("s390/ap: rearm APQNs bindings complete completion") Signed-off-by: Harald Freudenberger <[email protected]> Reviewed-by: Holger Dengler <[email protected]> Cc: [email protected] Acked-by: Alexander Gordeev <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
1 parent 32db401 commit b4f5bd6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

drivers/s390/crypto/ap_bus.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -971,11 +971,16 @@ int ap_driver_register(struct ap_driver *ap_drv, struct module *owner,
971971
char *name)
972972
{
973973
struct device_driver *drv = &ap_drv->driver;
974+
int rc;
974975

975976
drv->bus = &ap_bus_type;
976977
drv->owner = owner;
977978
drv->name = name;
978-
return driver_register(drv);
979+
rc = driver_register(drv);
980+
981+
ap_check_bindings_complete();
982+
983+
return rc;
979984
}
980985
EXPORT_SYMBOL(ap_driver_register);
981986

0 commit comments

Comments
 (0)