aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/boot/compressed/cmdline.c
diff options
context:
space:
mode:
authorGokul Caushik <gcaushik@pdx.edu>2012-07-19 18:04:42 -0700
committerH. Peter Anvin <hpa@zytor.com>2012-07-21 11:07:39 -0700
commitbd448d4d0a1bd88dc6fdc41217b2c25383fa8529 (patch)
tree35996835d7d184e9628dfa53e02126a0b2405d5d /arch/x86/boot/compressed/cmdline.c
parentcec49df9d331feaa2fea3d24c07147c7659940d1 (diff)
x86, boot: Exclude cmdline.c if you can't use it
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> Link: http://lkml.kernel.org/r/1342746282-28497-8-git-send-email-jmillenbach@gmail.com Signed-off-by: Gokul Caushik <caushik1@gmail.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch/x86/boot/compressed/cmdline.c')
-rw-r--r--arch/x86/boot/compressed/cmdline.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/boot/compressed/cmdline.c b/arch/x86/boot/compressed/cmdline.c
index cb62f786990..10f6b1178c6 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