mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/6] resource: mark normal memory as supporting being uncacheable
@ 2025-06-16  7:16 Ahmad Fatoum
  2025-06-16  7:16 ` [PATCH 2/6] lib: display_options: constify pointer to static size_human_readable buf Ahmad Fatoum
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Ahmad Fatoum @ 2025-06-16  7:16 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

The attributes report what the underlying memory is capable of,
so if we can configure it as WT/WC/WB, it's likely we can configure it
as uncached as well. This doesn't hold true for all architectures, but
it does for ARM, so add it to the MEMATTRS_NORMAL bitfield for now.

Signed-off-by: Ahmad Fatoum <a.fatoum@barebox.org>
---
 include/linux/ioport.h | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/include/linux/ioport.h b/include/linux/ioport.h
index 425928df3bfe..ceff1bb7e5ac 100644
--- a/include/linux/ioport.h
+++ b/include/linux/ioport.h
@@ -133,11 +133,11 @@ enum resource_memtype {
 #define MEMATTR_RO	0x00020000	/* read-only */
 #define MEMATTR_SP	0x00040000	/* specific-purpose */
 
-#define MEMATTRS_CACHEABLE	(MEMATTR_WT | MEMATTR_WC | MEMATTR_WB)
-#define MEMATTRS_RW		(MEMATTRS_CACHEABLE | MEMATTR_XP)
-#define MEMATTRS_RO		(MEMATTRS_CACHEABLE | MEMATTR_XP | MEMATTR_RO)
-#define MEMATTRS_RX		(MEMATTRS_CACHEABLE | MEMATTR_RO)
-#define MEMATTRS_RWX		(MEMATTRS_CACHEABLE)	/* TODO: remove all */
+#define MEMATTRS_NORMAL		(MEMATTR_UC | MEMATTR_WT | MEMATTR_WC | MEMATTR_WB)
+#define MEMATTRS_RW		(MEMATTRS_NORMAL | MEMATTR_XP)
+#define MEMATTRS_RO		(MEMATTRS_NORMAL | MEMATTR_XP | MEMATTR_RO)
+#define MEMATTRS_RX		(MEMATTRS_NORMAL | MEMATTR_RO)
+#define MEMATTRS_RWX		(MEMATTRS_NORMAL)	/* TODO: remove all */
 #define MEMATTRS_RW_DEVICE	(MEMATTR_UC | MEMATTR_XP)
 #define MEMATTRS_FAULT		(MEMATTR_UC | MEMATTR_XP | MEMATTR_RP | MEMATTR_RO)
 
-- 
2.39.5




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

end of thread, other threads:[~2025-06-17  7:14 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-06-16  7:16 [PATCH 1/6] resource: mark normal memory as supporting being uncacheable Ahmad Fatoum
2025-06-16  7:16 ` [PATCH 2/6] lib: display_options: constify pointer to static size_human_readable buf Ahmad Fatoum
2025-06-16  7:16 ` [PATCH 3/6] commands: iomem: print human readable sizes by default Ahmad Fatoum
2025-06-16  7:16 ` [PATCH 4/6] commands: iomemport: support showing info for particular argument Ahmad Fatoum
2025-06-16  7:16 ` [PATCH 5/6] commands: iomem: add support for printing type/attributes Ahmad Fatoum
2025-06-16  7:16 ` [PATCH 6/6] efi: payload: iomem: populate resource type/attributes Ahmad Fatoum
2025-06-17  7:13 ` [PATCH 1/6] resource: mark normal memory as supporting being uncacheable Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox