From: Heiko Carstens Date: Mon, 25 Nov 2024 11:54:30 +0000 (+0100) Subject: s390/ap: Replace xchg() with WRITE_ONCE() X-Git-Tag: microblaze-v6.16~498^2~17 X-Git-Url: http://git.monstr.eu/?a=commitdiff_plain;h=7726b55b5d6c22dc0e66570597bf6e43d410d093;p=linux-2.6-microblaze.git s390/ap: Replace xchg() with WRITE_ONCE() The result of xchg() is not used, and in addition it is used on a one byte memory area which leads to inefficient code. Use WRITE_ONCE() instead to achieve the same result with much less generated code. Acked-by: Harald Freudenberger Acked-by: Alexander Gordeev Signed-off-by: Heiko Carstens --- diff --git a/drivers/s390/crypto/ap_bus.c b/drivers/s390/crypto/ap_bus.c index e14638936de6..26e1ea1940ec 100644 --- a/drivers/s390/crypto/ap_bus.c +++ b/drivers/s390/crypto/ap_bus.c @@ -453,7 +453,7 @@ static void ap_tasklet_fn(unsigned long dummy) * important that no requests on any AP get lost. */ if (ap_irq_flag) - xchg(ap_airq.lsi_ptr, 0); + WRITE_ONCE(*ap_airq.lsi_ptr, 0); spin_lock_bh(&ap_queues_lock); hash_for_each(ap_queues, bkt, aq, hnode) {