linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: smp_twd: change WARN() to pr_warn() on local timer register failure
@ 2013-02-21  8:37 Shawn Guo
  2013-02-21 11:31 ` Russell King - ARM Linux
  0 siblings, 1 reply; 2+ messages in thread
From: Shawn Guo @ 2013-02-21  8:37 UTC (permalink / raw)
  To: linux-arm-kernel

When booting a SMP build kernel with nosmp on kernel cmdline, the
following fat warning will be hit.  Since the local timer registeration
failure is expected for such boot condition, a normal pr_warn message
should be good enough for the failure.

------------[ cut here ]------------
WARNING: at arch/arm/kernel/smp_twd.c:345
twd_local_timer_of_register+0x7c/0x90()
twd_local_timer_of_register failed (-6)
Modules linked in:
Backtrace:
[<80011f14>] (dump_backtrace+0x0/0x10c) from [<8044dd30>]
(dump_stack+0x18/0x1c)
 r7:805e9f58 r6:805ba84c r5:80539331 r4:00000159
[<8044dd18>] (dump_stack+0x0/0x1c) from [<80020fbc>]
(warn_slowpath_common+0x54/0x6c)
[<80020f68>] (warn_slowpath_common+0x0/0x6c) from [<80021078>]
(warn_slowpath_fmt+0x38/0x40)
 r9:412fc09a r8:8fffffff r7:ffffffff r6:00000001 r5:80633b8c
r4:80b32da8
[<80021040>] (warn_slowpath_fmt+0x0/0x40) from [<805ba84c>]
(twd_local_timer_of_register+0x7c/0x90)
 r3:fffffffa r2:8053934b
[<805ba7d0>] (twd_local_timer_of_register+0x0/0x90) from [<805c0bec>]
(imx6q_timer_init+0x18/0x4c)
 r5:80633800 r4:8053b701
[<805c0bd4>] (imx6q_timer_init+0x0/0x4c) from [<805ba4e8>]
(time_init+0x28/0x38)
 r5:80633800 r4:805dc0f4
[<805ba4c0>] (time_init+0x0/0x38) from [<805b6854>]
(start_kernel+0x1a0/0x310)
[<805b66b4>] (start_kernel+0x0/0x310) from [<10008044>] (0x10008044)
 r8:1000406a r7:805f3f8c r6:805dc0c4 r5:805f0518 r4:10c5387d
---[ end trace 1b75b31a2719ed1c ]---

Reported-by: Dirk Behme <dirk.behme@de.bosch.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
---
 arch/arm/kernel/smp_twd.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/kernel/smp_twd.c b/arch/arm/kernel/smp_twd.c
index c092115..f796b83 100644
--- a/arch/arm/kernel/smp_twd.c
+++ b/arch/arm/kernel/smp_twd.c
@@ -392,6 +392,6 @@ void __init twd_local_timer_of_register(void)
 	err = twd_local_timer_common_register(np);
 
 out:
-	WARN(err, "twd_local_timer_of_register failed (%d)\n", err);
+	pr_warn("twd_local_timer_of_register failed (%d)\n", err);
 }
 #endif
-- 
1.7.9.5

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

* [PATCH] ARM: smp_twd: change WARN() to pr_warn() on local timer register failure
  2013-02-21  8:37 [PATCH] ARM: smp_twd: change WARN() to pr_warn() on local timer register failure Shawn Guo
@ 2013-02-21 11:31 ` Russell King - ARM Linux
  0 siblings, 0 replies; 2+ messages in thread
From: Russell King - ARM Linux @ 2013-02-21 11:31 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Feb 21, 2013 at 04:37:57PM +0800, Shawn Guo wrote:
> When booting a SMP build kernel with nosmp on kernel cmdline, the
> following fat warning will be hit.  Since the local timer registeration
> failure is expected for such boot condition, a normal pr_warn message
> should be good enough for the failure.

Yes, a pr_warn here would be better.  However, you're still going to end
up with a warning because we don't support this on UP.

The reason you don't get a warning when you build for UP is this:

#ifdef CONFIG_HAVE_ARM_TWD
void twd_local_timer_of_register(void);
#else
static inline void twd_local_timer_of_register(void)
{
}
#endif

twd_local_timer_of_register() becomes a no-op.

I think a better solution may be to also replicate this check:

	if (!is_smp() || !setup_max_cpus)

in twd_local_timer_of_register() so that it also becomes a no-op.

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

end of thread, other threads:[~2013-02-21 11:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-21  8:37 [PATCH] ARM: smp_twd: change WARN() to pr_warn() on local timer register failure Shawn Guo
2013-02-21 11:31 ` Russell King - ARM Linux

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).