public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM MMU: add strongly-ordered memory type
@ 2008-08-04 23:40 Paul Walmsley
  2008-08-05 11:49 ` Ben Dooks
  2008-08-06  9:53 ` Catalin Marinas
  0 siblings, 2 replies; 24+ messages in thread
From: Paul Walmsley @ 2008-08-04 23:40 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: linux-omap, r-woodruff2


Add the MT_MEMORY_STRONGLY_ORDERED memory type for ARM strongly ordered
memory.

This is used on OMAP3 for on-board SRAM.  On OMAP, SRAM is used for code 
that changes the SDRAM controller's clock, temporarily blocking access to 
SDRAM.  During this period, as code executes from SRAM, the ARM cache 
controller can attempt to write dirty cache lines back to SDRAM to make 
room for SRAM cache lines, causing the MPU subsystem to hang.  To avoid 
this, we mark SRAM as strongly- ordered memory.

Problem noted by Richard Woodruff <r-woodruff2@ti.com>.  Fix derived
from the TI CDP codebase.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
---

 arch/arm/mm/mmu.c          |    5 +++++
 include/asm-arm/mach/map.h |   13 +++++++------
 2 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index 2d6d682..5b56539 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -239,6 +239,11 @@ static struct mem_type mem_types[] = {
 		.prot_sect = PMD_TYPE_SECT,
 		.domain    = DOMAIN_KERNEL,
 	},
+	[MT_MEMORY_STRONGLY_ORDERED] = {
+		.prot_sect = PMD_TYPE_SECT | PMD_SECT_AP_WRITE |
+				PMD_SECT_UNCACHED,
+		.domain    = DOMAIN_KERNEL,
+	},
 };
 
 const struct mem_type *get_mem_type(unsigned int type)
diff --git a/include/asm-arm/mach/map.h b/include/asm-arm/mach/map.h
index 7ef3c83..8cb46b7 100644
--- a/include/asm-arm/mach/map.h
+++ b/include/asm-arm/mach/map.h
@@ -19,12 +19,13 @@ struct map_desc {
 };
 
 /* types 0-3 are defined in asm/io.h */
-#define MT_CACHECLEAN		4
-#define MT_MINICLEAN		5
-#define MT_LOW_VECTORS		6
-#define MT_HIGH_VECTORS		7
-#define MT_MEMORY		8
-#define MT_ROM			9
+#define MT_CACHECLEAN			4
+#define MT_MINICLEAN			5
+#define MT_LOW_VECTORS			6
+#define MT_HIGH_VECTORS			7
+#define MT_MEMORY			8
+#define MT_ROM				9
+#define MT_MEMORY_STRONGLY_ORDERED	10
 
 #define MT_NONSHARED_DEVICE	MT_DEVICE_NONSHARED
 #define MT_IXP2000_DEVICE	MT_DEVICE_IXP2000


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

end of thread, other threads:[~2008-08-11  7:50 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-04 23:40 [PATCH] ARM MMU: add strongly-ordered memory type Paul Walmsley
2008-08-05 11:49 ` Ben Dooks
2008-08-05 12:15   ` Woodruff, Richard
2008-08-06 10:20     ` Catalin Marinas
2008-08-06 12:28       ` Woodruff, Richard
2008-08-07 16:55         ` Catalin Marinas
2008-08-07  6:01       ` Paul Walmsley
2008-08-07 16:45         ` Catalin Marinas
2008-08-08  8:45           ` Paul Walmsley
2008-08-06  9:53 ` Catalin Marinas
2008-08-06 12:21   ` Woodruff, Richard
2008-08-07  7:30     ` Russell King - ARM Linux
2008-08-07 16:01       ` Catalin Marinas
2008-08-07 18:56       ` Woodruff, Richard
2008-08-07 19:25         ` Russell King - ARM Linux
2008-08-07 20:38           ` Woodruff, Richard
2008-08-07 21:20             ` Russell King - ARM Linux
2008-08-07 21:59               ` Russell King - ARM Linux
2008-08-07 23:07               ` Woodruff, Richard
2008-08-08  7:16                 ` Russell King - ARM Linux
2008-08-08 11:44               ` Catalin Marinas
2008-08-08 13:19                 ` Russell King - ARM Linux
2008-08-08 16:40                   ` Catalin Marinas
2008-08-11  7:50                 ` Paul Walmsley

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