lkml.org 
[lkml]   [2008]   [Dec]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/3] [PATCH] param: Stop gcc from inlining empty weak functions
Date
Stop gcc from inlining empty weak functions by making them non-empty.  The gcc
I have for FRV (4.1.2) will inline empty weak functions that are in the same
file, even if those functions are marked 'noinline'.

Without this patch, the default arch_get_boot_command_line() is rolled into
start_kernel(), and the arch specific one is not called, thus making the
kernel unbootable.

Signed-off-by: David Howells <dhowells@redhat.com>
---

init/main.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)


diff --git a/init/main.c b/init/main.c
index 92ad2fe..665993b 100644
--- a/init/main.c
+++ b/init/main.c
@@ -522,15 +522,18 @@ static void __init boot_cpu_init(void)

void __init __weak smp_setup_processor_id(void)
{
+ barrier();
}

void __init __weak thread_info_cache_init(void)
{
+ barrier();
}

/* If the arch already sets boot_command_line, we need do nothing. */
void __init __weak arch_get_boot_command_line(void)
{
+ barrier();
}

/* Ideally, this would take a 'const char *cmdline' param. */


\
 
 \ /
  Last update: 2008-12-03 17:35    [W:0.239 / U:0.428 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site