From: Anders Roxell <anders.roxell@linaro.org>
To: u-boot@lists.u-boot-project.org
Cc: marek.vasut@mailbox.org, trini@konsulko.com,
ilias.apalodimas@linaro.org, michal.simek@amd.com,
lukma@nabladev.com, alchark@flipper.net,
jerome.forissier@arm.com, dlechner@baylibre.com, anshuld@ti.com,
sjg@chromium.org, Thinh.Nguyen@synopsys.com,
mkorpershoek@kernel.org, love.kumar@amd.com,
quentin.schulz@cherry.de, s-vadapalli@ti.com,
Anders Roxell <anders.roxell@linaro.org>
Subject: [PATCH v10 01/30] x86: asm: io.h: add rmb() and wmb()
Date: Wed, 28 Oct 2026 15:15:25 +0100 [thread overview]
Message-ID: <20261028141554.3073545-2-anders.roxell@linaro.org> (raw)
In-Reply-To: <20261028141554.3073545-1-anders.roxell@linaro.org>
x86 has dmb() and mb(), but no rmb() and no wmb(). Drivers that use them
do not build. drivers/usb/dwc3/gadget.c is one of them. It calls wmb()
around the trb setup.
x86 is total store order, so a compiler barrier is enough for normal
memory. The kernel uses lfence and sfence here, but those need SSE2 and
galileo is i586. dmb() is what __iormb() and __iowmb() already use, so
use that.
Reported-by: Marek Vasut <marek.vasut@mailbox.org>
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
---
arch/x86/include/asm/io.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/x86/include/asm/io.h b/arch/x86/include/asm/io.h
index 1390193f09c7..bd6c3bbfd2f3 100644
--- a/arch/x86/include/asm/io.h
+++ b/arch/x86/include/asm/io.h
@@ -241,6 +241,8 @@ static inline void sync(void)
*/
#define dmb() __asm__ __volatile__ ("" : : : "memory")
#define mb() __asm__ __volatile__ ("mfence" : : : "memory")
+#define rmb() dmb()
+#define wmb() dmb()
#define __iormb() dmb()
#define __iowmb() dmb()
--
2.53.0
next prev parent reply other threads:[~2026-10-28 14:47 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-28 14:15 [PATCH v10 00/30] usb: dwc3: part 2, make the resynced code work Anders Roxell
2026-10-28 14:15 ` Anders Roxell [this message]
2026-10-28 14:15 ` [PATCH v10 02/30] dm: add helpers needed by the resynced DWC3 code Anders Roxell
2026-10-28 14:15 ` [PATCH v10 03/30] phy: cadence: use reset_control_assert() from reset.h Anders Roxell
2026-10-28 14:15 ` [PATCH v10 04/30] usb: phy: add the usb_phy helpers needed by the resynced DWC3 code Anders Roxell
2026-10-28 14:15 ` [PATCH v10 05/30] usb: gadget: adapt the gadget API after the resync Anders Roxell
2026-10-28 14:15 ` [PATCH v10 06/30] usb: gadget: udc: make udc-core build in U-Boot Anders Roxell
2026-10-28 14:15 ` [PATCH v10 07/30] usb: dwc3: core: remove the code U-Boot does not use Anders Roxell
2026-10-28 14:15 ` [PATCH v10 08/30] usb: dwc3: core: bring back the U-Boot entry points Anders Roxell
2026-10-28 14:15 ` [PATCH v10 09/30] usb: dwc3: core: adapt to the U-Boot APIs Anders Roxell
2026-10-28 14:15 ` [PATCH v10 10/30] usb: dwc3: adapt io.h, the Makefile and the TI glue Anders Roxell
2026-10-28 14:15 ` [PATCH v10 11/30] usb: dwc3: make gadget and ep0 build in U-Boot Anders Roxell
2026-10-28 14:15 ` [PATCH v10 12/30] usb: gadget: udc: enable async callbacks on bind Anders Roxell
2026-10-28 14:15 ` [PATCH v10 13/30] usb: dwc3: ep0: flush and invalidate cache around ep0 transfers Anders Roxell
2026-10-28 14:15 ` [PATCH v10 14/30] usb: dwc3: gadget: flush and invalidate cache around transfers Anders Roxell
2026-10-28 14:15 ` [PATCH v10 15/30] usb: dwc3: make the am62 glue build in U-Boot Anders Roxell
2026-10-28 14:15 ` [PATCH v10 16/30] usb: gadget: ci_udc: move to the udc-core registration Anders Roxell
2026-10-28 14:15 ` [PATCH v10 17/30] usb: gadget: ci_udc: set endpoint capabilities Anders Roxell
2026-10-28 14:15 ` [PATCH v10 18/30] usb: gadget: dwc2_udc_otg: fix up after the resync Anders Roxell
2026-10-28 14:15 ` [PATCH v10 19/30] usb: gadget: fix up the function drivers " Anders Roxell
2026-10-28 14:15 ` [PATCH v10 20/30] usb: gadget: fix up the last UDC " Anders Roxell
2026-10-28 14:15 ` [PATCH v10 21/30] usb: gadget: atmel_usba_udc: set endpoint capabilities Anders Roxell
2026-10-28 14:15 ` [PATCH v10 22/30] usb: gadget: at91_udc: register with udc-core Anders Roxell
2026-10-28 14:15 ` [PATCH v10 23/30] usb: gadget: at91_udc: set endpoint capabilities Anders Roxell
2026-10-28 14:15 ` [PATCH v10 24/30] usb: musb-new: fix up after the resync Anders Roxell
2026-10-28 14:15 ` [PATCH v10 25/30] usb: musb-new: set endpoint capabilities Anders Roxell
2026-10-28 14:15 ` [PATCH v10 26/30] usb: mtu3: fix up after the resync Anders Roxell
2026-10-28 14:15 ` [PATCH v10 27/30] usb: mtu3: set endpoint capabilities Anders Roxell
2026-10-28 14:15 ` [PATCH v10 28/30] usb: host: xhci: fix up after the resync Anders Roxell
2026-10-28 14:15 ` [PATCH v10 29/30] usb: cdns3: " Anders Roxell
2026-10-28 14:15 ` [PATCH v10 30/30] usb: dwc3: enable SUSPHY again after xhci is registered Anders Roxell
2026-10-30 14:28 ` [PATCH v10 00/30] usb: dwc3: part 2, make the resynced code work Quentin Schulz
2026-11-03 13:45 ` Anders Roxell
2026-11-04 17:51 ` Quentin Schulz
2026-11-06 10:57 ` Quentin Schulz
2026-11-06 16:04 ` Alexey Charkov
2026-11-07 8:35 ` Anders Roxell
2026-11-07 8:34 ` Anders Roxell
2026-11-03 9:42 ` Love Kumar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261028141554.3073545-2-anders.roxell@linaro.org \
--to=anders.roxell@linaro.org \
--cc=Thinh.Nguyen@synopsys.com \
--cc=alchark@flipper.net \
--cc=anshuld@ti.com \
--cc=dlechner@baylibre.com \
--cc=ilias.apalodimas@linaro.org \
--cc=jerome.forissier@arm.com \
--cc=love.kumar@amd.com \
--cc=lukma@nabladev.com \
--cc=marek.vasut@mailbox.org \
--cc=michal.simek@amd.com \
--cc=mkorpershoek@kernel.org \
--cc=quentin.schulz@cherry.de \
--cc=s-vadapalli@ti.com \
--cc=sjg@chromium.org \
--cc=trini@konsulko.com \
--cc=u-boot@lists.u-boot-project.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.