KVM: s390: add function unlink_gib_alert_list()
A message that is not in the archive (sent off-list or not yet received): 20181119194707.GB3793@osiris
Quoted 30 lines · Heiko Carstens
Quoted 9 lines · Michael Mueller
The function atomically returns the address of the first GISA of this list and stores a zero address in the origin list field of the GIB instead.
The GIB alert list contains all GISAs that have pending adapter interruptions.
Signed-off-by Michael Mueller <[email protected]>Reviewed-by Pierre Morel <[email protected]>...
Quoted 7 lines
(quoted diff) +7
-0+static struct kvm_s390_gisa __maybe_unused *unlink_gib_alert_list(void) +{ + u32 gisa; + + if (!gib) + return NULL; +...
Review
Quoted 6 lines
(quoted diff) +6
-0+ do { + gisa = READ_ONCE(gib->alert_list_origin); + } while (cmpxchg(&gib->alert_list_origin, gisa, 0) != gisa); + + return (void *)(u64) gisa; +}Please make this shorter:
Quoted 2 lines
return (void *)(u64) xchg(&gib->alert_list_origin, gisa, 0);
Unbelievable... just one macro further down. Thanks for pointing me to.