Thread (134 messages) 134 messages, 10 authors, 2021-04-01

Re: [RFT PATCH v3 08/27] asm-generic/io.h: Add a non-posted variant of ioremap()

From: Andy Shevchenko <hidden>
Date: 2021-03-05 14:47:21
Also in: linux-arch, linux-arm-kernel, linux-doc, linux-samsung-soc, linux-serial, lkml

On Thu, Mar 4, 2021 at 11:40 PM Hector Martin [off-list ref] wrote:
ARM64 currently defaults to posted MMIO (nGnRnE), but some devices
require the use of non-posted MMIO (nGnRE). Introduce a new ioremap()
variant to handle this case. ioremap_np() is aliased to ioremap() by
default on arches that do not implement this variant.
Hmm... But isn't it basically a requirement to those device drivers to
use readX()/writeX() instead of readX_relaxed() / writeX_relaxed()?

...
 #define IORESOURCE_MEM_32BIT           (3<<3)
 #define IORESOURCE_MEM_SHADOWABLE      (1<<5)  /* dup: IORESOURCE_SHADOWABLE */
 #define IORESOURCE_MEM_EXPANSIONROM    (1<<6)
+#define IORESOURCE_MEM_NONPOSTED       (1<<7)
Not sure it's the right location (in a bit field) for this flag.

-- 
With Best Regards,
Andy Shevchenko
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help