linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] [RFC] ARM: compile fix for DEBUG_LL=y && MMU=n
@ 2013-01-16 14:32 Uwe Kleine-König
  2013-01-16 17:43 ` Stephen Warren
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Uwe Kleine-König @ 2013-01-16 14:32 UTC (permalink / raw)
  To: linux-arm-kernel

debug_ll_addr is only used on machines with an MMU so it can be #ifdef'ed
out safely. This fixes:

arch/arm/kernel/debug.S: Assembler messages:
arch/arm/kernel/debug.S:104: Error: too many positional arguments

Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
Cc: Rob Herring <rob.herring@calxeda.com>
Cc: Stephen Warren <swarren@nvidia.com>
Cc: Olof Johansson <olof@lixom.net>
---
The obvious alternative fix is to make addruart on !MMU take 3
arguments, too.

The problem was introduced in

	e5c5f2a (ARM: implement debug_ll_io_init())

which appeared in v3.8-rc1.
---
 arch/arm/kernel/debug.S |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/kernel/debug.S b/arch/arm/kernel/debug.S
index 6809200..14f7c3b 100644
--- a/arch/arm/kernel/debug.S
+++ b/arch/arm/kernel/debug.S
@@ -100,12 +100,14 @@ ENTRY(printch)
 		b	1b
 ENDPROC(printch)
 
+#ifdef CONFIG_MMU
 ENTRY(debug_ll_addr)
 		addruart r2, r3, ip
 		str	r2, [r0]
 		str	r3, [r1]
 		mov	pc, lr
 ENDPROC(debug_ll_addr)
+#endif
 
 #else
 
-- 
1.7.10.4

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

* [PATCH] [RFC] ARM: compile fix for DEBUG_LL=y && MMU=n
  2013-01-16 14:32 [PATCH] [RFC] ARM: compile fix for DEBUG_LL=y && MMU=n Uwe Kleine-König
@ 2013-01-16 17:43 ` Stephen Warren
  2013-01-16 19:26   ` Uwe Kleine-König
  2013-01-16 19:17 ` Rob Herring
  2013-01-16 22:31 ` Olof Johansson
  2 siblings, 1 reply; 8+ messages in thread
From: Stephen Warren @ 2013-01-16 17:43 UTC (permalink / raw)
  To: linux-arm-kernel

On 01/16/2013 07:32 AM, Uwe Kleine-K?nig wrote:
> debug_ll_addr is only used on machines with an MMU so it can be #ifdef'ed
> out safely. This fixes:
> 
> arch/arm/kernel/debug.S: Assembler messages:
> arch/arm/kernel/debug.S:104: Error: too many positional arguments
> 
> Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
> Cc: Rob Herring <rob.herring@calxeda.com>
> Cc: Stephen Warren <swarren@nvidia.com>
> Cc: Olof Johansson <olof@lixom.net>
> ---
> The obvious alternative fix is to make addruart on !MMU take 3
> arguments, too.
> 
> The problem was introduced in
> 
> 	e5c5f2a (ARM: implement debug_ll_io_init())

It may be useful to mention that in the commit message.

Sorry for the breakage. Are there any ARM defconfigs for !MMU?

Reviewed-by: Stephen Warren <swarren@nvidia.com>

(although should the second copy of debug_ll_addr at the end of the file
be ifdef'd away too; the one for CONFIG_DEBUG_SEMIHOSTING)?

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

* [PATCH] [RFC] ARM: compile fix for DEBUG_LL=y && MMU=n
  2013-01-16 14:32 [PATCH] [RFC] ARM: compile fix for DEBUG_LL=y && MMU=n Uwe Kleine-König
  2013-01-16 17:43 ` Stephen Warren
@ 2013-01-16 19:17 ` Rob Herring
  2013-01-17  8:12   ` Uwe Kleine-König
  2013-01-16 22:31 ` Olof Johansson
  2 siblings, 1 reply; 8+ messages in thread
From: Rob Herring @ 2013-01-16 19:17 UTC (permalink / raw)
  To: linux-arm-kernel

On 01/16/2013 08:32 AM, Uwe Kleine-K?nig wrote:
> debug_ll_addr is only used on machines with an MMU so it can be #ifdef'ed
> out safely. This fixes:
> 
> arch/arm/kernel/debug.S: Assembler messages:
> arch/arm/kernel/debug.S:104: Error: too many positional arguments
> 
> Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
> Cc: Rob Herring <rob.herring@calxeda.com>
> Cc: Stephen Warren <swarren@nvidia.com>
> Cc: Olof Johansson <olof@lixom.net>
> ---
> The obvious alternative fix is to make addruart on !MMU take 3
> arguments, too.

We never envision a need to get the uart address from C code on !MMU?

Either way:

Acked-by: Rob Herring <rob.herring@calxeda.com>

> 
> The problem was introduced in
> 
> 	e5c5f2a (ARM: implement debug_ll_io_init())
> 
> which appeared in v3.8-rc1.
> ---
>  arch/arm/kernel/debug.S |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/arch/arm/kernel/debug.S b/arch/arm/kernel/debug.S
> index 6809200..14f7c3b 100644
> --- a/arch/arm/kernel/debug.S
> +++ b/arch/arm/kernel/debug.S
> @@ -100,12 +100,14 @@ ENTRY(printch)
>  		b	1b
>  ENDPROC(printch)
>  
> +#ifdef CONFIG_MMU
>  ENTRY(debug_ll_addr)
>  		addruart r2, r3, ip
>  		str	r2, [r0]
>  		str	r3, [r1]
>  		mov	pc, lr
>  ENDPROC(debug_ll_addr)
> +#endif
>  
>  #else
>  
> 

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

* [PATCH] [RFC] ARM: compile fix for DEBUG_LL=y && MMU=n
  2013-01-16 17:43 ` Stephen Warren
@ 2013-01-16 19:26   ` Uwe Kleine-König
  0 siblings, 0 replies; 8+ messages in thread
From: Uwe Kleine-König @ 2013-01-16 19:26 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jan 16, 2013 at 10:43:32AM -0700, Stephen Warren wrote:
> On 01/16/2013 07:32 AM, Uwe Kleine-K?nig wrote:
> > debug_ll_addr is only used on machines with an MMU so it can be #ifdef'ed
> > out safely. This fixes:
> > 
> > arch/arm/kernel/debug.S: Assembler messages:
> > arch/arm/kernel/debug.S:104: Error: too many positional arguments
> > 
> > Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
> > Cc: Rob Herring <rob.herring@calxeda.com>
> > Cc: Stephen Warren <swarren@nvidia.com>
> > Cc: Olof Johansson <olof@lixom.net>
> > ---
> > The obvious alternative fix is to make addruart on !MMU take 3
> > arguments, too.
> > 
> > The problem was introduced in
> > 
> > 	e5c5f2a (ARM: implement debug_ll_io_init())
> 
> It may be useful to mention that in the commit message.
right.

> Sorry for the breakage. Are there any ARM defconfigs for !MMU?
I'm not aware of anything in mainline.
 
> Reviewed-by: Stephen Warren <swarren@nvidia.com>
thanks

> (although should the second copy of debug_ll_addr at the end of the file
> be ifdef'd away too; the one for CONFIG_DEBUG_SEMIHOSTING)?
In contrast to the !CONFIG_DEBUG_SEMIHOSTING implementation this one
doesn't call addruart and should compile just fine. I don't care much.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

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

* [PATCH] [RFC] ARM: compile fix for DEBUG_LL=y && MMU=n
  2013-01-16 14:32 [PATCH] [RFC] ARM: compile fix for DEBUG_LL=y && MMU=n Uwe Kleine-König
  2013-01-16 17:43 ` Stephen Warren
  2013-01-16 19:17 ` Rob Herring
@ 2013-01-16 22:31 ` Olof Johansson
  2013-01-17 16:14   ` Uwe Kleine-König
  2 siblings, 1 reply; 8+ messages in thread
From: Olof Johansson @ 2013-01-16 22:31 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jan 16, 2013 at 03:32:06PM +0100, Uwe Kleine-K?nig wrote:
> debug_ll_addr is only used on machines with an MMU so it can be #ifdef'ed
> out safely. This fixes:
> 
> arch/arm/kernel/debug.S: Assembler messages:
> arch/arm/kernel/debug.S:104: Error: too many positional arguments
> 
> Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
> Cc: Rob Herring <rob.herring@calxeda.com>
> Cc: Stephen Warren <swarren@nvidia.com>
> Cc: Olof Johansson <olof@lixom.net>
> ---
> The obvious alternative fix is to make addruart on !MMU take 3
> arguments, too.
> 
> The problem was introduced in
> 
> 	e5c5f2a (ARM: implement debug_ll_io_init())
> 
> which appeared in v3.8-rc1.

Since we introduced the breakage in arm-soc, I've picked up the fix (I guess
it could have gone through Russell's tree as well though).

I've added the reference to the introducing commit, and the acks/review tags.

Adding a defconfig for a !MMU platform seems like a good idea, since there's
several of us who make sure that there is build coverage of the defconfigs and
follow up on most of the breakage. Feel free to send one in for 3.9.


-Olof

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

* [PATCH] [RFC] ARM: compile fix for DEBUG_LL=y && MMU=n
  2013-01-16 19:17 ` Rob Herring
@ 2013-01-17  8:12   ` Uwe Kleine-König
  0 siblings, 0 replies; 8+ messages in thread
From: Uwe Kleine-König @ 2013-01-17  8:12 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jan 16, 2013 at 01:17:20PM -0600, Rob Herring wrote:
> On 01/16/2013 08:32 AM, Uwe Kleine-K?nig wrote:
> > debug_ll_addr is only used on machines with an MMU so it can be #ifdef'ed
> > out safely. This fixes:
> > 
> > arch/arm/kernel/debug.S: Assembler messages:
> > arch/arm/kernel/debug.S:104: Error: too many positional arguments
> > 
> > Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
> > Cc: Rob Herring <rob.herring@calxeda.com>
> > Cc: Stephen Warren <swarren@nvidia.com>
> > Cc: Olof Johansson <olof@lixom.net>
> > ---
> > The obvious alternative fix is to make addruart on !MMU take 3
> > arguments, too.
> 
> We never envision a need to get the uart address from C code on !MMU?
On MMU addruart takes 3 arguments: physical address output, virtual
address output and a tmp. On !MMU physical == virtual, so only one
register for the address is needed.

(BTW, it was commit 639da5e (ARM: add an extra temp register to the low
level debugging addruart macro) that only changed the MMU variants of
addruart.)
 
Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

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

* [PATCH] [RFC] ARM: compile fix for DEBUG_LL=y && MMU=n
  2013-01-16 22:31 ` Olof Johansson
@ 2013-01-17 16:14   ` Uwe Kleine-König
  2013-01-17 22:09     ` Stephen Warren
  0 siblings, 1 reply; 8+ messages in thread
From: Uwe Kleine-König @ 2013-01-17 16:14 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jan 16, 2013 at 02:31:44PM -0800, Olof Johansson wrote:
> On Wed, Jan 16, 2013 at 03:32:06PM +0100, Uwe Kleine-K?nig wrote:
> > debug_ll_addr is only used on machines with an MMU so it can be #ifdef'ed
> > out safely. This fixes:
> > 
> > arch/arm/kernel/debug.S: Assembler messages:
> > arch/arm/kernel/debug.S:104: Error: too many positional arguments
> > 
> > Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
> > Cc: Rob Herring <rob.herring@calxeda.com>
> > Cc: Stephen Warren <swarren@nvidia.com>
> > Cc: Olof Johansson <olof@lixom.net>
> > ---
> > The obvious alternative fix is to make addruart on !MMU take 3
> > arguments, too.
> > 
> > The problem was introduced in
> > 
> > 	e5c5f2a (ARM: implement debug_ll_io_init())
> > 
> > which appeared in v3.8-rc1.
> 
> Since we introduced the breakage in arm-soc, I've picked up the fix (I guess
> it could have gone through Russell's tree as well though).
> 
> I've added the reference to the introducing commit, and the acks/review tags.
> 
> Adding a defconfig for a !MMU platform seems like a good idea, since there's
> several of us who make sure that there is build coverage of the defconfigs and
> follow up on most of the breakage. Feel free to send one in for 3.9.
Jonny just pointed out in irc that there is at91x40_defconfig.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

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

* [PATCH] [RFC] ARM: compile fix for DEBUG_LL=y && MMU=n
  2013-01-17 16:14   ` Uwe Kleine-König
@ 2013-01-17 22:09     ` Stephen Warren
  0 siblings, 0 replies; 8+ messages in thread
From: Stephen Warren @ 2013-01-17 22:09 UTC (permalink / raw)
  To: linux-arm-kernel

On 01/17/2013 09:14 AM, Uwe Kleine-K?nig wrote:
> On Wed, Jan 16, 2013 at 02:31:44PM -0800, Olof Johansson wrote:
>> On Wed, Jan 16, 2013 at 03:32:06PM +0100, Uwe Kleine-K?nig wrote:
>>> debug_ll_addr is only used on machines with an MMU so it can be #ifdef'ed
>>> out safely. This fixes:
...
>> Adding a defconfig for a !MMU platform seems like a good idea, since there's
>> several of us who make sure that there is build coverage of the defconfigs and
>> follow up on most of the breakage. Feel free to send one in for 3.9.
>
> Jonny just pointed out in irc that there is at91x40_defconfig.

Ah. I have built that a few times recently, but since it doesn't enable
DEBUG_LL, this problem didn't show up.

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

end of thread, other threads:[~2013-01-17 22:09 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-16 14:32 [PATCH] [RFC] ARM: compile fix for DEBUG_LL=y && MMU=n Uwe Kleine-König
2013-01-16 17:43 ` Stephen Warren
2013-01-16 19:26   ` Uwe Kleine-König
2013-01-16 19:17 ` Rob Herring
2013-01-17  8:12   ` Uwe Kleine-König
2013-01-16 22:31 ` Olof Johansson
2013-01-17 16:14   ` Uwe Kleine-König
2013-01-17 22:09     ` Stephen Warren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).