Re: [PATCH v2 06/12] KVM: s390: add function unlink_gib_alert_list()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Nov 19, 2018 at 06:25:30PM +0100, Michael Mueller wrote:
> 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 <mimu@xxxxxxxxxxxxx>
> Reviewed-by: Pierre Morel <pmorel@xxxxxxxxxxxxx>
...
> +static struct kvm_s390_gisa __maybe_unused *unlink_gib_alert_list(void)
> +{
> +	u32 gisa;
> +
> +	if (!gib)
> +		return NULL;
> +

...

> +	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:

	return (void *)(u64) xchg(&gib->alert_list_origin, gisa, 0);




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux