mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: rusty@rustcorp.com.au
Cc: dhowells@redhat.com, linux-kernel@vger.kernel.org
Subject: [PATCH 2/3] [PATCH] param: Stop gcc from inlining empty weak functions
Date: Wed, 03 Dec 2008 16:32:12 +0000	[thread overview]
Message-ID: <20081203163212.13965.80352.stgit@warthog.procyon.org.uk> (raw)
In-Reply-To: <20081203163207.13965.56517.stgit@warthog.procyon.org.uk>

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. */


  reply	other threads:[~2008-12-03 16:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-03 16:32 [PATCH 1/3] param: Adapt MN10300 to the new parameter handling regime David Howells
2008-12-03 16:32 ` David Howells [this message]
2008-12-05  8:28   ` [PATCH 2/3] [PATCH] param: Stop gcc from inlining empty weak functions Rusty Russell
2008-12-05 12:02   ` David Howells
2008-12-03 16:32 ` [PATCH 3/3] [PATCH] param: Adapt FRV to the new parameter handling regime David Howells
2008-12-05  8:25 ` [PATCH 1/3] param: Adapt MN10300 " Rusty Russell
2008-12-05 11:58 ` David Howells
2008-12-05 12:55   ` Rusty Russell
2008-12-07  9:21     ` Rusty Russell
2008-12-10 10:39     ` David Howells
2008-12-05 13:07   ` David Howells

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081203163212.13965.80352.stgit@warthog.procyon.org.uk \
    --to=dhowells@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®