All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] asm-generic: Describe the logic beind the __io barrier names
@ 2022-04-14 22:45 Palmer Dabbelt
  0 siblings, 0 replies; only message in thread
From: Palmer Dabbelt @ 2022-04-14 22:45 UTC (permalink / raw
  To: helgaas, macro; +Cc: Arnd Bergmann, linux-arch, linux-kernel, Palmer Dabbelt

From: Palmer Dabbelt <palmer@rivosinc.com>

These names are very terse, as they weren't originally designed to be
this spread out.  There was recently some confusion as to how this fits
together, hopefully this comment makes them easier to understand.

Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>

---

Maybe we should use 'm', instead of '', for the MMIO barriers?
---
 include/asm-generic/io.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h
index 7ce93aaf69f8..1297807b5831 100644
--- a/include/asm-generic/io.h
+++ b/include/asm-generic/io.h
@@ -18,6 +18,15 @@
 #include <asm/mmiowb.h>
 #include <asm-generic/pci_iomap.h>
 
+/*
+ * These generic IO helpers provide a handful of architecture hooks, which are
+ * the Cartesian product over three dimensions:
+ *   - Memory (the empty character) and port ('p').  The memory flavor is used
+ *     for MMIO (read/write), the ports are used for port IO (in/out).
+ *   - Before ('b') and after ('a'), which are inserted before/after the raw
+ *     access.
+ *   - Read ('r') and write ('w'), for the direction of the access.
+ */
 #ifndef __io_br
 #define __io_br()      barrier()
 #endif
-- 
2.34.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-04-14 22:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-14 22:45 [PATCH v1] asm-generic: Describe the logic beind the __io barrier names Palmer Dabbelt

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.