linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Millenbach <jmillenbach@gmail.com>
To: "H. Peter Anvin" <hpa@zytor.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>,
	x86@kernel.org, Gokul Caushik <caushik1@gmail.com>,
	Josh Triplett <josh@joshtriplett.org>,
	Joe Millenbach <jmillenbach@gmail.com>,
	linux-kernel@vger.kernel.org
Cc: team-fjord@googlegroups.com, Gokul Caushik <gcaushik@pdx.edu>
Subject: [PATCH 7/7] x86/boot: Exclude cmdline.c if you can't use it
Date: Thu, 19 Jul 2012 18:04:42 -0700	[thread overview]
Message-ID: <1342746282-28497-8-git-send-email-jmillenbach@gmail.com> (raw)
In-Reply-To: <1342746282-28497-1-git-send-email-jmillenbach@gmail.com>

From: Gokul Caushik <gcaushik@pdx.edu>

CONFIG_EARLY_PRINTK is the only feature that might use command line
parsing in the decompression stage.  If it is disabled then we can
exclude the related code to save space. This can result in an estimated
space savings of 2240 bytes from the compressed kernel image.

Signed-off-by: Joe Millenbach <jmillenbach@gmail.com>
Signed-off-by: Gokul Caushik <caushik1@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
---
 arch/x86/boot/compressed/cmdline.c |    4 ++++
 arch/x86/boot/compressed/misc.h    |    5 +++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/arch/x86/boot/compressed/cmdline.c b/arch/x86/boot/compressed/cmdline.c
index cb62f78..10f6b11 100644
--- a/arch/x86/boot/compressed/cmdline.c
+++ b/arch/x86/boot/compressed/cmdline.c
@@ -1,5 +1,7 @@
 #include "misc.h"
 
+#ifdef CONFIG_EARLY_PRINTK
+
 static unsigned long fs;
 static inline void set_fs(unsigned long seg)
 {
@@ -19,3 +21,5 @@ int cmdline_find_option_bool(const char *option)
 {
 	return __cmdline_find_option_bool(real_mode->hdr.cmd_line_ptr, option);
 }
+
+#endif
diff --git a/arch/x86/boot/compressed/misc.h b/arch/x86/boot/compressed/misc.h
index 3ffee6e..0e6dc0e 100644
--- a/arch/x86/boot/compressed/misc.h
+++ b/arch/x86/boot/compressed/misc.h
@@ -38,18 +38,19 @@ static inline void debug_putstr(const char *s)
 
 #endif
 
+#ifdef CONFIG_EARLY_PRINTK
+
 /* cmdline.c */
 int cmdline_find_option(const char *option, char *buffer, int bufsize);
 int cmdline_find_option_bool(const char *option);
 
 /* early_serial_console.c */
-#ifdef CONFIG_EARLY_PRINTK
-
 extern int early_serial_base;
 void console_init(void);
 
 #else
 
+/* early_serial_console.c */
 static const int early_serial_base;
 static inline void console_init(void)
 { }
-- 
1.7.9.5


  parent reply	other threads:[~2012-07-20  1:05 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1342746282-28497-1-git-send-email-jmillenbach@gmail.com>
2012-07-20  1:04 ` [PATCH 1/7] x86/boot: Removed quiet flag and switched quiet output to debug flag Joe Millenbach
2012-07-22  0:53   ` [tip:x86/boot] x86, boot: " tip-bot for Joe Millenbach
2012-07-20  1:04 ` [PATCH 2/7] x86/boot: Wrap debug printing in a new debug_putstr function Joe Millenbach
2012-07-22  0:54   ` [tip:x86/boot] x86, boot: " tip-bot for Joe Millenbach
2012-07-20  1:04 ` [PATCH 3/7] x86/boot: Changed error putstr path to match new debug_putstr format Joe Millenbach
2012-07-22  0:55   ` [tip:x86/boot] x86, boot: " tip-bot for Joe Millenbach
2012-07-20  1:04 ` [PATCH 4/7] x86/boot: Switch output functions from command-line flags to conditional compilation Joe Millenbach
2012-07-22  0:56   ` [tip:x86/boot] x86, boot: " tip-bot for Joe Millenbach
2012-07-20  1:04 ` [PATCH 5/7] x86/boot: Removed unused debug flag and set code Joe Millenbach
2012-07-22  0:57   ` [tip:x86/boot] x86, boot: " tip-bot for Joe Millenbach
2012-07-20  1:04 ` [PATCH 6/7] x86/boot: Exclude early_serial_console.c if can't use it Joe Millenbach
2012-07-22  0:58   ` [tip:x86/boot] x86, boot: Exclude early_serial_console.c if can' t " tip-bot for Joe Millenbach
2012-07-20  1:04 ` Joe Millenbach [this message]
2012-07-22  0:59   ` [tip:x86/boot] x86, boot: Exclude cmdline.c if you can't " tip-bot for Gokul Caushik

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=1342746282-28497-8-git-send-email-jmillenbach@gmail.com \
    --to=jmillenbach@gmail.com \
    --cc=caushik1@gmail.com \
    --cc=gcaushik@pdx.edu \
    --cc=hpa@zytor.com \
    --cc=josh@joshtriplett.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=team-fjord@googlegroups.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).