Skip to content

Commit 7726b55

Browse files
committed
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 <[email protected]> Acked-by: Alexander Gordeev <[email protected]> Signed-off-by: Heiko Carstens <[email protected]>
1 parent ff123eb commit 7726b55

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/s390/crypto/ap_bus.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ static void ap_tasklet_fn(unsigned long dummy)
453453
* important that no requests on any AP get lost.
454454
*/
455455
if (ap_irq_flag)
456-
xchg(ap_airq.lsi_ptr, 0);
456+
WRITE_ONCE(*ap_airq.lsi_ptr, 0);
457457

458458
spin_lock_bh(&ap_queues_lock);
459459
hash_for_each(ap_queues, bkt, aq, hnode) {

0 commit comments

Comments
 (0)