diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2007-12-13 19:05:34 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2007-12-14 12:34:30 -0500 |
commit | 4037500ebcfd172a15aed40caa847c52e9906712 (patch) | |
tree | 6957163263ef1e1161d92a8973c69b60031f8011 | |
parent | d20e47e153dcfddca5a066ff0f8da2d1104d08ea (diff) |
[MIPS] time: Delete weak definition of plat_time_init() due to gcc bug.
Frank Rowand <frank.rowand@am.sony.com> reports:
> 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).
[ He 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
[ His patch adds -fno-unit-at-a-time for time.c ]
> 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.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r-- | arch/mips/kernel/time.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/arch/mips/kernel/time.c b/arch/mips/kernel/time.c index 52075426c373..1ecfbb7eba6c 100644 --- a/arch/mips/kernel/time.c +++ b/arch/mips/kernel/time.c | |||
@@ -109,10 +109,6 @@ void __cpuinit clockevent_set_clock(struct clock_event_device *cd, | |||
109 | cd->mult = (u32) temp; | 109 | cd->mult = (u32) temp; |
110 | } | 110 | } |
111 | 111 | ||
112 | void __init __weak plat_time_init(void) | ||
113 | { | ||
114 | } | ||
115 | |||
116 | /* | 112 | /* |
117 | * This function exists in order to cause an error due to a duplicate | 113 | * This function exists in order to cause an error due to a duplicate |
118 | * definition if platform code should have its own implementation. The hook | 114 | * definition if platform code should have its own implementation. The hook |