All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: fix v7M build for !CONFIG_PRINTK
@ 2015-01-12  4:25 Rob Herring
  2015-01-12  8:29 ` Arnd Bergmann
  0 siblings, 1 reply; 3+ messages in thread
From: Rob Herring @ 2015-01-12  4:25 UTC (permalink / raw)
  To: linux-arm-kernel

Minimal builds for v7M are broken when printk is disabled. The caller is
assembly so add the necessary ifdef around the call.

Signed-off-by: Rob Herring <robh@kernel.org>
---
 arch/arm/kernel/entry-v7m.S | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/kernel/entry-v7m.S b/arch/arm/kernel/entry-v7m.S
index 2260f18..8944f49 100644
--- a/arch/arm/kernel/entry-v7m.S
+++ b/arch/arm/kernel/entry-v7m.S
@@ -22,10 +22,12 @@
 
 __invalid_entry:
 	v7m_exception_entry
+#ifdef CONFIG_PRINTK
 	adr	r0, strerr
 	mrs	r1, ipsr
 	mov	r2, lr
 	bl	printk
+#endif
 	mov	r0, sp
 	bl	show_regs
 1:	b	1b
-- 
2.1.0

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

* [PATCH] ARM: fix v7M build for !CONFIG_PRINTK
  2015-01-12  4:25 [PATCH] ARM: fix v7M build for !CONFIG_PRINTK Rob Herring
@ 2015-01-12  8:29 ` Arnd Bergmann
  2015-01-12 15:38   ` Rob Herring
  0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2015-01-12  8:29 UTC (permalink / raw)
  To: linux-arm-kernel

On Sunday 11 January 2015 22:25:49 Rob Herring wrote:
> 
>  __invalid_entry:
>         v7m_exception_entry
> +#ifdef CONFIG_PRINTK
>         adr     r0, strerr
>         mrs     r1, ipsr
>         mov     r2, lr
>         bl      printk
> +#endif
>         mov     r0, sp
>         bl      show_regs
>  1:     b       1b
> 

Should the show_regs call be commented out as well? While
the function is still there without printk support, I believe
it doesn't actually do anything.

	Arnd

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

* [PATCH] ARM: fix v7M build for !CONFIG_PRINTK
  2015-01-12  8:29 ` Arnd Bergmann
@ 2015-01-12 15:38   ` Rob Herring
  0 siblings, 0 replies; 3+ messages in thread
From: Rob Herring @ 2015-01-12 15:38 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Jan 12, 2015 at 2:29 AM, Arnd Bergmann <arnd@arndb.de> wrote:
> On Sunday 11 January 2015 22:25:49 Rob Herring wrote:
>>
>>  __invalid_entry:
>>         v7m_exception_entry
>> +#ifdef CONFIG_PRINTK
>>         adr     r0, strerr
>>         mrs     r1, ipsr
>>         mov     r2, lr
>>         bl      printk
>> +#endif
>>         mov     r0, sp
>>         bl      show_regs
>>  1:     b       1b
>>
>
> Should the show_regs call be commented out as well? While
> the function is still there without printk support, I believe
> it doesn't actually do anything.

It does still call unwind_backtrace which still constructs the
backtrace from looking at the disassembly output. That's probably not
too useful unless it is saved to memory that could be examined with a
debugger. One would probably just enable printk at that point though.

Rob

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

end of thread, other threads:[~2015-01-12 15:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-12  4:25 [PATCH] ARM: fix v7M build for !CONFIG_PRINTK Rob Herring
2015-01-12  8:29 ` Arnd Bergmann
2015-01-12 15:38   ` Rob Herring

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.