public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] OMAP2420 IO map: fix IVA map
@ 2009-12-03  8:15 Paul Walmsley
  2009-12-03  8:15 ` [PATCH 1/2] OMAP2xxx IO mapping: mark DSP mappings as being 2420-only Paul Walmsley
  2009-12-03  8:15 ` [PATCH 2/2] OMAP2420 IO mapping: move IVA mapping virtual address out of vmalloc space Paul Walmsley
  0 siblings, 2 replies; 3+ messages in thread
From: Paul Walmsley @ 2009-12-03  8:15 UTC (permalink / raw)
  To: linux-omap

2420 boots currently complain:

[    0.000000] BUG: mapping for 0x58000000 at 0xe0000000 overlaps vmalloc space
[    0.000000] BUG: mapping for 0x59000000 at 0xe1000000 overlaps vmalloc space
[    0.000000] BUG: mapping for 0x5a000000 at 0xe2000000 overlaps vmalloc space

This short series clarifies that the current IVA address macros are 2420-only,
and moves the mapping out of vmalloc space.

Boot-tested on N800.

- Paul

---

Paul Walmsley (2):
      OMAP2xxx IO mapping: mark DSP mappings as being 2420-only
      OMAP2420 IO mapping: move IVA mapping virtual address out of vmalloc space


 arch/arm/mach-omap2/io.c             |   18 +++++++++--------
 arch/arm/plat-omap/include/plat/io.h |   36 +++++++++++++++-------------------
 arch/arm/plat-omap/io.c              |   12 ++++++-----
 3 files changed, 31 insertions(+), 35 deletions(-)


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

* [PATCH 1/2] OMAP2xxx IO mapping: mark DSP mappings as being 2420-only
  2009-12-03  8:15 [PATCH 0/2] OMAP2420 IO map: fix IVA map Paul Walmsley
@ 2009-12-03  8:15 ` Paul Walmsley
  2009-12-03  8:15 ` [PATCH 2/2] OMAP2420 IO mapping: move IVA mapping virtual address out of vmalloc space Paul Walmsley
  1 sibling, 0 replies; 3+ messages in thread
From: Paul Walmsley @ 2009-12-03  8:15 UTC (permalink / raw)
  To: linux-omap

Out of the three major OMAP2 chip types, OMAP2420, OMAP2430, and OMAP3430,
we only map the IVA on OMAP2420.  The memory mapping is not shared between
OMAP2420 and OMAP2430, so it is inappropriate to label those macros as
'24XX'; this patch changes them to '2420'.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
---
 arch/arm/mach-omap2/io.c             |   18 +++++++++---------
 arch/arm/plat-omap/include/plat/io.h |   33 +++++++++++++--------------------
 arch/arm/plat-omap/io.c              |   12 ++++++------
 3 files changed, 28 insertions(+), 35 deletions(-)

diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index 6a4d8e4..cb09e87 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -74,21 +74,21 @@ static struct map_desc omap24xx_io_desc[] __initdata = {
 #ifdef CONFIG_ARCH_OMAP2420
 static struct map_desc omap242x_io_desc[] __initdata = {
 	{
-		.virtual	= DSP_MEM_24XX_VIRT,
-		.pfn		= __phys_to_pfn(DSP_MEM_24XX_PHYS),
-		.length		= DSP_MEM_24XX_SIZE,
+		.virtual	= DSP_MEM_2420_VIRT,
+		.pfn		= __phys_to_pfn(DSP_MEM_2420_PHYS),
+		.length		= DSP_MEM_2420_SIZE,
 		.type		= MT_DEVICE
 	},
 	{
-		.virtual	= DSP_IPI_24XX_VIRT,
-		.pfn		= __phys_to_pfn(DSP_IPI_24XX_PHYS),
-		.length		= DSP_IPI_24XX_SIZE,
+		.virtual	= DSP_IPI_2420_VIRT,
+		.pfn		= __phys_to_pfn(DSP_IPI_2420_PHYS),
+		.length		= DSP_IPI_2420_SIZE,
 		.type		= MT_DEVICE
 	},
 	{
-		.virtual	= DSP_MMU_24XX_VIRT,
-		.pfn		= __phys_to_pfn(DSP_MMU_24XX_PHYS),
-		.length		= DSP_MMU_24XX_SIZE,
+		.virtual	= DSP_MMU_2420_VIRT,
+		.pfn		= __phys_to_pfn(DSP_MMU_2420_PHYS),
+		.length		= DSP_MMU_2420_SIZE,
 		.type		= MT_DEVICE
 	},
 };
diff --git a/arch/arm/plat-omap/include/plat/io.h b/arch/arm/plat-omap/include/plat/io.h
index 7e5319f..7d6f45f 100644
--- a/arch/arm/plat-omap/include/plat/io.h
+++ b/arch/arm/plat-omap/include/plat/io.h
@@ -122,16 +122,18 @@
 #define OMAP243X_SMS_VIRT	(OMAP243X_SMS_PHYS + OMAP2_L3_IO_OFFSET)
 #define OMAP243X_SMS_SIZE	SZ_1M
 
-/* DSP */
-#define DSP_MEM_24XX_PHYS	OMAP2420_DSP_MEM_BASE	/* 0x58000000 */
-#define DSP_MEM_24XX_VIRT	0xe0000000
-#define DSP_MEM_24XX_SIZE	0x28000
-#define DSP_IPI_24XX_PHYS	OMAP2420_DSP_IPI_BASE	/* 0x59000000 */
-#define DSP_IPI_24XX_VIRT	0xe1000000
-#define DSP_IPI_24XX_SIZE	SZ_4K
-#define DSP_MMU_24XX_PHYS	OMAP2420_DSP_MMU_BASE	/* 0x5a000000 */
-#define DSP_MMU_24XX_VIRT	0xe2000000
-#define DSP_MMU_24XX_SIZE	SZ_4K
+/* 2420 IVA */
+#define DSP_MEM_2420_PHYS	OMAP2420_DSP_MEM_BASE	/* 0x58000000 */
+#define DSP_MEM_2420_VIRT	0xe0000000
+#define DSP_MEM_2420_SIZE	0x28000
+#define DSP_IPI_2420_PHYS	OMAP2420_DSP_IPI_BASE	/* 0x59000000 */
+#define DSP_IPI_2420_VIRT	0xe1000000
+#define DSP_IPI_2420_SIZE	SZ_4K
+#define DSP_MMU_2420_PHYS	OMAP2420_DSP_MMU_BASE	/* 0x5a000000 */
+#define DSP_MMU_2420_VIRT	0xe2000000
+#define DSP_MMU_2420_SIZE	SZ_4K
+
+/* 2430 IVA2.1 - currently unmapped */
 
 /*
  * ----------------------------------------------------------------------------
@@ -182,16 +184,7 @@
 #define OMAP343X_SDRC_VIRT	(OMAP343X_SDRC_PHYS + OMAP2_L3_IO_OFFSET)
 #define OMAP343X_SDRC_SIZE	SZ_1M
 
-/* DSP */
-#define DSP_MEM_34XX_PHYS	OMAP34XX_DSP_MEM_BASE	/* 0x58000000 */
-#define DSP_MEM_34XX_VIRT	0xe0000000
-#define DSP_MEM_34XX_SIZE	0x28000
-#define DSP_IPI_34XX_PHYS	OMAP34XX_DSP_IPI_BASE	/* 0x59000000 */
-#define DSP_IPI_34XX_VIRT	0xe1000000
-#define DSP_IPI_34XX_SIZE	SZ_4K
-#define DSP_MMU_34XX_PHYS	OMAP34XX_DSP_MMU_BASE	/* 0x5a000000 */
-#define DSP_MMU_34XX_VIRT	0xe2000000
-#define DSP_MMU_34XX_SIZE	SZ_4K
+/* 3430 IVA - currently unmapped */
 
 /*
  * ----------------------------------------------------------------------------
diff --git a/arch/arm/plat-omap/io.c b/arch/arm/plat-omap/io.c
index 11f5d79..0cfd54f 100644
--- a/arch/arm/plat-omap/io.c
+++ b/arch/arm/plat-omap/io.c
@@ -66,12 +66,12 @@ void __iomem *omap_ioremap(unsigned long p, size_t size, unsigned int type)
 			return XLATE(p, L4_24XX_PHYS, L4_24XX_VIRT);
 	}
 	if (cpu_is_omap2420()) {
-		if (BETWEEN(p, DSP_MEM_24XX_PHYS, DSP_MEM_24XX_SIZE))
-			return XLATE(p, DSP_MEM_24XX_PHYS, DSP_MEM_24XX_VIRT);
-		if (BETWEEN(p, DSP_IPI_24XX_PHYS, DSP_IPI_24XX_SIZE))
-			return XLATE(p, DSP_IPI_24XX_PHYS, DSP_IPI_24XX_SIZE);
-		if (BETWEEN(p, DSP_MMU_24XX_PHYS, DSP_MMU_24XX_SIZE))
-			return XLATE(p, DSP_MMU_24XX_PHYS, DSP_MMU_24XX_VIRT);
+		if (BETWEEN(p, DSP_MEM_2420_PHYS, DSP_MEM_2420_SIZE))
+			return XLATE(p, DSP_MEM_2420_PHYS, DSP_MEM_2420_VIRT);
+		if (BETWEEN(p, DSP_IPI_2420_PHYS, DSP_IPI_2420_SIZE))
+			return XLATE(p, DSP_IPI_2420_PHYS, DSP_IPI_2420_SIZE);
+		if (BETWEEN(p, DSP_MMU_2420_PHYS, DSP_MMU_2420_SIZE))
+			return XLATE(p, DSP_MMU_2420_PHYS, DSP_MMU_2420_VIRT);
 	}
 	if (cpu_is_omap2430()) {
 		if (BETWEEN(p, L4_WK_243X_PHYS, L4_WK_243X_SIZE))



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

* [PATCH 2/2] OMAP2420 IO mapping: move IVA mapping virtual address out of vmalloc space
  2009-12-03  8:15 [PATCH 0/2] OMAP2420 IO map: fix IVA map Paul Walmsley
  2009-12-03  8:15 ` [PATCH 1/2] OMAP2xxx IO mapping: mark DSP mappings as being 2420-only Paul Walmsley
@ 2009-12-03  8:15 ` Paul Walmsley
  1 sibling, 0 replies; 3+ messages in thread
From: Paul Walmsley @ 2009-12-03  8:15 UTC (permalink / raw)
  To: linux-omap; +Cc: Tony Lindgren, Santosh Shilimkar

Commit 10db25fea4c11661070b97832b8cc3d2af495092 causes the following
kernel messages during N800 boot (and presumably all other 2420
boards):

[    0.000000] BUG: mapping for 0x58000000 at 0xe0000000 overlaps vmalloc space
[    0.000000] BUG: mapping for 0x59000000 at 0xe1000000 overlaps vmalloc space
[    0.000000] BUG: mapping for 0x5a000000 at 0xe2000000 overlaps vmalloc space

Fix by remapping the IVA memory areas somewhere outside vmalloc space.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
---
 arch/arm/plat-omap/include/plat/io.h |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/arch/arm/plat-omap/include/plat/io.h b/arch/arm/plat-omap/include/plat/io.h
index 7d6f45f..a3e7b47 100644
--- a/arch/arm/plat-omap/include/plat/io.h
+++ b/arch/arm/plat-omap/include/plat/io.h
@@ -123,14 +123,17 @@
 #define OMAP243X_SMS_SIZE	SZ_1M
 
 /* 2420 IVA */
-#define DSP_MEM_2420_PHYS	OMAP2420_DSP_MEM_BASE	/* 0x58000000 */
-#define DSP_MEM_2420_VIRT	0xe0000000
+#define DSP_MEM_2420_PHYS	OMAP2420_DSP_MEM_BASE
+						/* 0x58000000 --> 0xfc100000 */
+#define DSP_MEM_2420_VIRT	0xfc100000
 #define DSP_MEM_2420_SIZE	0x28000
-#define DSP_IPI_2420_PHYS	OMAP2420_DSP_IPI_BASE	/* 0x59000000 */
-#define DSP_IPI_2420_VIRT	0xe1000000
+#define DSP_IPI_2420_PHYS	OMAP2420_DSP_IPI_BASE
+						/* 0x59000000 --> 0xfc128000 */
+#define DSP_IPI_2420_VIRT	0xfc128000
 #define DSP_IPI_2420_SIZE	SZ_4K
-#define DSP_MMU_2420_PHYS	OMAP2420_DSP_MMU_BASE	/* 0x5a000000 */
-#define DSP_MMU_2420_VIRT	0xe2000000
+#define DSP_MMU_2420_PHYS	OMAP2420_DSP_MMU_BASE
+						/* 0x5a000000 --> 0xfc129000 */
+#define DSP_MMU_2420_VIRT	0xfc129000
 #define DSP_MMU_2420_SIZE	SZ_4K
 
 /* 2430 IVA2.1 - currently unmapped */



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

end of thread, other threads:[~2009-12-03  8:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-03  8:15 [PATCH 0/2] OMAP2420 IO map: fix IVA map Paul Walmsley
2009-12-03  8:15 ` [PATCH 1/2] OMAP2xxx IO mapping: mark DSP mappings as being 2420-only Paul Walmsley
2009-12-03  8:15 ` [PATCH 2/2] OMAP2420 IO mapping: move IVA mapping virtual address out of vmalloc space Paul Walmsley

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