lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Thu, 14 Apr 2022 15:45:22 -0700
From:   Palmer Dabbelt <palmer@...osinc.com>
To:     helgaas@...nel.org, macro@...am.me.uk
Cc:     Arnd Bergmann <arnd@...db.de>, linux-arch@...r.kernel.org,
        linux-kernel@...r.kernel.org, Palmer Dabbelt <palmer@...osinc.com>
Subject: [PATCH v1] asm-generic: Describe the logic beind the __io barrier names

From: Palmer Dabbelt <palmer@...osinc.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@...osinc.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ