Skip to contentSkip to conversation

debug macro fixups

PATCH New Jeremy Kerr 5 participants 19 messages Jul 14, 2010 – Jul 22, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover debug macro fixups

As part of the DEBUG_LL mapping changes, I ran all of the defconfigs with DEBUG_LL=y. Some of the configs are broken, so I'm posting the fixups.

mx1 is still broken, as IMX_IO_ADDRESS() (used by the mx1 debug macros) uses C syntax, and so it not suitable for asm.

These changes are on top of the DEBUG_LL mapping changes.

Cheers,

Jeremy

---
Jeremy Kerr (6):
arm/clps711x: fix debug macro compilation failure arm/h720x: fix debug macro compilation failure arm/l7200: fix debug macro compilation failure arm/plat-spear: fix debug macro compilation failure arm/ns9xxx: fix debug macro compilation failure arm/shark: fix debug macro compilation failure

#1 lore raw

PATCH 1/6 arm/clps711x: fix debug macro compilation failure

We need mach/hardware.h for CLPS7111_VIRT_BASE.

---
 arch/arm/mach-clps711x/include/mach/debug-macro.S |    1 +
 1 file changed, 1 insertion(+)
arch/arm/mach-clps711x/include/mach/debug-macro.S +1 -0
index 2d61679..507c687 100644
@@ -11,6 +11,7 @@
  *
 */
 
+#include <mach/hardware.h>
 #include <asm/hardware/clps7111.h>
 
 		.macro	addruart, rp, rv
#2 lore raw

PATCH 2/6 arm/h720x: fix debug macro compilation failure

In reply to Jeremy Kerr

IO_BASE shoule be IO_VIRT, and IO_START should be IO_PHYS. We also need mach/hardware.h for these definitions.

---
 arch/arm/mach-h720x/include/mach/debug-macro.S |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
arch/arm/mach-h720x/include/mach/debug-macro.S +4 -2
index 60c0c43..c2093e8 100644
@@ -11,8 +11,10 @@
  *
 */
 
-		.equ    io_virt, IO_BASE
-		.equ    io_phys, IO_START
+#include <mach/hardware.h>
+
+		.equ    io_virt, IO_VIRT
+		.equ    io_phys, IO_PHYS
 
 		.macro  addruart, rp, rv
 		mov     \rp, #0x00020000	@ UART1
#3 lore raw

PATCH 3/6 arm/l7200: fix debug macro compilation failure

In reply to Jeremy Kerr

We need mach/hardware.h for IO_BASE and IO_START.

---
 arch/arm/mach-l7200/include/mach/debug-macro.S |    2 ++
 1 file changed, 2 insertions(+)
arch/arm/mach-l7200/include/mach/debug-macro.S +2 -0
index b0a2db7..31be104 100644
@@ -11,6 +11,8 @@
  *
 */
 
+#include <mach/hardware.h>
+
 		.equ	io_virt, IO_BASE
 		.equ	io_phys, IO_START
 
#4 lore raw

PATCH 4/6 arm/plat-spear: fix debug macro compilation failure

In reply to Jeremy Kerr

mov rx, =<immediate> isn't valid, use #<immediate> instead.

---
 arch/arm/plat-spear/include/plat/debug-macro.S |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/plat-spear/include/plat/debug-macro.S +2 -2
index d922310..e91270e 100644
@@ -15,8 +15,8 @@
 #include <mach/spear.h>
 
 		.macro	addruart, rp, rv
-		mov	\rp, =SPEAR_DBG_UART_BASE		@ Physical base
-		mov	\rv, =VA_SPEAR_DBG_UART_BASE		@ Virtual base
+		mov	\rp, #SPEAR_DBG_UART_BASE		@ Physical base
+		mov	\rv, #VA_SPEAR_DBG_UART_BASE		@ Virtual base
 		.endm
 
 		.macro	senduart, rd, rx
#5 lore raw

PATCH 5/6 arm/ns9xxx: fix debug macro compilation failure

In reply to Jeremy Kerr

We need mach/memory.h for NS9XXX_CSxSTAT_PHYS, and mach/memory.h needs asm/memory.h for UL().

---
 arch/arm/mach-ns9xxx/include/mach/debug-macro.S |    1 +
 arch/arm/mach-ns9xxx/include/mach/memory.h      |    2 ++
 2 files changed, 3 insertions(+)
arch/arm/mach-ns9xxx/include/mach/debug-macro.S +1 -0
index ae770fd..06f41f7 100644
@@ -8,6 +8,7 @@
  * the Free Software Foundation.
  */
 #include <mach/hardware.h>
+#include <mach/memory.h>
 
 #include <mach/regs-board-a9m9750dev.h>
 
arch/arm/mach-ns9xxx/include/mach/memory.h +2 -0
index 6107193..b5bbda5 100644
@@ -11,6 +11,8 @@
 #ifndef __ASM_ARCH_MEMORY_H
 #define __ASM_ARCH_MEMORY_H
 
+#include <asm/memory.h>
+
 /* x in [0..3] */
 #define NS9XXX_CSxSTAT_PHYS(x)	UL(((x) + 4) << 28)
 
#6 lore raw

PATCH 5/6 arm/ns9xxx: fix debug macro compilation failure

Quoted 2 lines · Jeremy Kerr

We need mach/memory.h for NS9XXX_CSxSTAT_PHYS, and mach/memory.h needs asm/memory.h for UL().

NAK. Definitely NAK. You haven't checked what includes whatelse.

asm/memory.h includes mach/memory.h to pick up the platform specific parts, and provides mach/memory.h with its pre-requisits. Use asm/memory.h _everywhere_ rather than mach/memory.h.

Doing otherwise will create include loops, which leads to unreliability in defined symbols.

#7 lore raw

PATCH 5/6 arm/ns9xxx: fix debug macro compilation failure

Quoted 10 lines · Russell King - ARM Linux
Quoted 2 lines · Jeremy Kerr

We need mach/memory.h for NS9XXX_CSxSTAT_PHYS, and mach/memory.h needs asm/memory.h for UL().

NAK. ?Definitely NAK. ?You haven't checked what includes whatelse.

asm/memory.h includes mach/memory.h to pick up the platform specific parts, and provides mach/memory.h with its pre-requisits. ?Use asm/memory.h _everywhere_ rather than mach/memory.h.

I think it would be just fine to encode PHYS_OFFSET as 0xNNNNNNNNUL instead of using UL() if there is no specific reason. So we don't need to include
asm/memory.h any more in machine specific code.

Quoted 8 lines

Doing otherwise will create include loops, which leads to unreliability in defined symbols.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#8 lore raw

PATCH 5/6 arm/ns9xxx: fix debug macro compilation failure

Quoted 8 lines · Eric Miao
Quoted 6 lines · Russell King - ARM Linux
Quoted 2 lines · Jeremy Kerr

We need mach/memory.h for NS9XXX_CSxSTAT_PHYS, and mach/memory.h needs asm/memory.h for UL().

NAK. ?Definitely NAK. ?You haven't checked what includes whatelse.

Quoted 8 lines
Quoted 4 lines

asm/memory.h includes mach/memory.h to pick up the platform specific parts, and provides mach/memory.h with its pre-requisits. ?Use asm/memory.h _everywhere_ rather than mach/memory.h.

I think it would be just fine to encode PHYS_OFFSET as 0xNNNNNNNNUL instead of using UL() if there is no specific reason. So we don't need to include asm/memory.h any more in machine specific code.

No it's not. 0xNNNNNNNNUL isn't able to be parsed by the assembler. That's the whole reason for UL() existing.

#9 lore raw

PATCH v2 1/1 arm/ns9xxx: fix debug macro compilation failure

In reply to Russell King - ARM Linux

We need asm/memory.h for NS9XXX_CSxSTAT_PHYS (via mach/memory.h).

---
v2: use asm/memory.h directly

---
 arch/arm/mach-ns9xxx/include/mach/debug-macro.S |    1 +
 1 file changed, 1 insertion(+)
arch/arm/mach-ns9xxx/include/mach/debug-macro.S +1 -0
index 0859336..5c934bd 100644
@@ -8,6 +8,7 @@
  * the Free Software Foundation.
  */
 #include <mach/hardware.h>
+#include <asm/memory.h>
 
 #include <mach/regs-board-a9m9750dev.h>
 
#10 lore raw

PATCH v2 1/1 arm/ns9xxx: fix debug macro compilation failure

Quoted 1 line · Jeremy Kerr

We need asm/memory.h for NS9XXX_CSxSTAT_PHYS (via mach/memory.h).

Ok.

#11 lore raw

PATCH 6/6 arm/shark: fix debug macro compilation failure

In reply to Jeremy Kerr

We need a waituart macro.

---
 arch/arm/mach-shark/include/mach/debug-macro.S |    5 +++++
 1 file changed, 5 insertions(+)
arch/arm/mach-shark/include/mach/debug-macro.S +5 -0
index 269281f..3c46860 100644
@@ -21,6 +21,9 @@
 		strb	\rd, [\rx]
 		.endm
 
+		.macro waituart,rd,rx
+		.endm
+
 		.macro	busyuart,rd,rx
 		mov	\rd, #0
 1001:		add	\rd, \rd, #1
@@ -28,3 +31,5 @@
 		bne	1001b
 		.endm
 
+
+
#12 lore raw

PATCH 6/6 arm/shark: fix debug macro compilation failure

Quoted 23 lines · Jeremy Kerr

We need a waituart macro.

---
 arch/arm/mach-shark/include/mach/debug-macro.S |    5 +++++
 1 file changed, 5 insertions(+)
arch/arm/mach-shark/include/mach/debug-macro.S +3 -0
index 269281f..3c46860 100644
@@ -21,6 +21,9 @@
 		strb	\rd, [\rx]
 		.endm
 
+		.macro waituart,rd,rx
+		.endm
+
 		.macro	busyuart,rd,rx
 		mov	\rd, #0
 1001:		add	\rd, \rd, #1

arch/arm/mach-shark/include/mach/debug-macro.S line 35

Quoted 5 lines
arch/arm/mach-shark/include/mach/debug-macro.S +2 -0
@@ -28,3 +31,5 @@
 		bne	1001b
 		.endm
 
+
+

This last hunk isn't required!

#13 lore raw

cover debug macro fixups

In reply to Jeremy Kerr

Hi all,

Quoted 1 line

These changes are on top of the DEBUG_LL mapping changes.

Let me know if these would be better off the other way around - fixes first, then the mapping changes on top of that.

Cheers,

Jeremy

#14 lore raw

cover debug macro fixups

Quoted 6 lines · Jeremy Kerr

Hi all,

Quoted 1 line

These changes are on top of the DEBUG_LL mapping changes.

Let me know if these would be better off the other way around - fixes first, then the mapping changes on top of that.

Having fixes first would be preferable indeed.

Nicolas

#15 lore raw

cover debug macro fixups

Hi Nicolas,

Quoted 4 lines
Quoted 2 lines

Let me know if these would be better off the other way around - fixes first, then the mapping changes on top of that.

Having fixes first would be preferable indeed.

OK, done & sent. I'll hold off on re-sending the (rebased) addruart changes, as I expect there'll be more feedback on those that I can roll into one update.

Cheers,

Jeremy

#16 lore raw

cover debug macro fixups

In reply to Jeremy Kerr

Hi Jeremy,

Quoted 6 lines · Jeremy Kerr

As part of the DEBUG_LL mapping changes, I ran all of the defconfigs with DEBUG_LL=y. Some of the configs are broken, so I'm posting the fixups.

mx1 is still broken, as IMX_IO_ADDRESS() (used by the mx1 debug macros) uses C syntax, and so it not suitable for asm.

You can use the patches from
http://thread.gmane.org/gmane.linux.ports.arm.kernel/75691 to make mx1 (and mx25) pass your tests.

baruch

Quoted 15 lines

These changes are on top of the DEBUG_LL mapping changes.

Cheers,

Jeremy

---
Jeremy Kerr (6):
arm/clps711x: fix debug macro compilation failure arm/h720x: fix debug macro compilation failure arm/l7200: fix debug macro compilation failure arm/plat-spear: fix debug macro compilation failure arm/ns9xxx: fix debug macro compilation failure arm/shark: fix debug macro compilation failure

Signature · 3 lines
                                                     ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
#17 lore raw

cover debug macro fixups

In reply to Jeremy Kerr
Quoted 3 lines · Jeremy Kerr

As part of the DEBUG_LL mapping changes, I ran all of the defconfigs with DEBUG_LL=y. Some of the configs are broken, so I'm posting the fixups.

Apart from the two comments, the rest is fine, and should be merged in -rc. Please send the fixed patches to the patch system.

#18 lore raw

cover debug macro fixups

Hi Russell,

Quoted 2 lines

Apart from the two comments, the rest is fine, and should be merged in -rc. Please send the fixed patches to the patch system.

OK, done. Do you want a pull request for the 'debug maping via addruart'?

Cheers,

Jeremy