linux-mips
[Top] [All Lists]

Re: [PATCH] RBTX4927: linux-2.6.24-rc4 hang on boot

To: Frank Rowand <frank.rowand@am.sony.com>
Subject: Re: [PATCH] RBTX4927: linux-2.6.24-rc4 hang on boot
From: Ralf Baechle <ralf@linux-mips.org>
Date: Fri, 14 Dec 2007 00:03:48 +0000
Cc: linux-mips@linux-mips.org
In-reply-to: <1197386187.5610.18.camel@localhost.localdomain>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1197386187.5610.18.camel@localhost.localdomain>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.17 (2007-11-01)
On Tue, Dec 11, 2007 at 10:16:27AM -0500, Frank Rowand wrote:

> In linux-2.6.24-rc4 the Toshiba RBTX4927 hangs on boot.
> 
> The cause is that plat_time_init() from arch/mips/tx4927/common/tx4927_setup.c
> does not override the __weak plat_time_init() from arch/mips/kernel/time.c.
> This is due to a compiler bug in gcc 4.1.1.  The bug is reported to not exist
> in earlier versions of gcc, and to be fixed in 4.1.2.  The problem is that
> the __weak plat_time_init() is empty and thus gets optimized out of
> existence (thus the linker is never given the option to replace the
> __weak function).

You meant the call to plat_time_init() from time_init() gets optimized away.

> For more info on the gcc bug see
> 
>    http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27781
> 
> The attached patch is one workaround.  Another possible workaround
> would be to change the __weak plat_time_init() to be a non-empty
> function.

The __weak definition of plat_time_init was only ever meant to be a
migration helper to keep platforms that don't have a plat_time_init
compiling.  A few greps says that all platforms now supply their own
plat_time_init() so the weak definition is no longer needed.  So I
instead delete it.

  Ralf

<Prev in Thread] Current Thread [Next in Thread>