linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] usbnet: optimize barrier usage for Rmw atomic bitops
@ 2020-01-29 18:16 Davidlohr Bueso
  2020-02-20 15:35 ` Davidlohr Bueso
  0 siblings, 1 reply; 2+ messages in thread
From: Davidlohr Bueso @ 2020-01-29 18:16 UTC (permalink / raw)
  To: oneukum; +Cc: linux-usb, linux-kernel, dave, Davidlohr Bueso

Use smp_mb__before_atomic() instead of smp_mb() and avoid the
unnecessary barrier for non LL/SC architectures, such as x86.

Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
---
 drivers/net/usb/usbnet.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index 5ec97def3513..24c767350e5e 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -1912,7 +1912,7 @@ int usbnet_resume (struct usb_interface *intf)
 			}
 		}
 
-		smp_mb();
+		smp_mb__before_atomic();
 		clear_bit(EVENT_DEV_ASLEEP, &dev->flags);
 		spin_unlock_irq(&dev->txq.lock);
 
-- 
2.16.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] usbnet: optimize barrier usage for Rmw atomic bitops
  2020-01-29 18:16 [PATCH] usbnet: optimize barrier usage for Rmw atomic bitops Davidlohr Bueso
@ 2020-02-20 15:35 ` Davidlohr Bueso
  0 siblings, 0 replies; 2+ messages in thread
From: Davidlohr Bueso @ 2020-02-20 15:35 UTC (permalink / raw)
  To: oneukum; +Cc: linux-usb, linux-kernel, Davidlohr Bueso

ping?

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-02-20 15:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-29 18:16 [PATCH] usbnet: optimize barrier usage for Rmw atomic bitops Davidlohr Bueso
2020-02-20 15:35 ` Davidlohr Bueso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).