Commit bd448d4d authored by Gokul Caushik's avatar Gokul Caushik Committed by H. Peter Anvin

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: default avatarJoe Millenbach <jmillenbach@gmail.com>
Link: http://lkml.kernel.org/r/1342746282-28497-8-git-send-email-jmillenbach@gmail.comSigned-off-by: default avatarGokul Caushik <caushik1@gmail.com>
Reviewed-by: default avatarJosh Triplett <josh@joshtriplett.org>
Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
parent cec49df9
#include "misc.h" #include "misc.h"
#ifdef CONFIG_EARLY_PRINTK
static unsigned long fs; static unsigned long fs;
static inline void set_fs(unsigned long seg) static inline void set_fs(unsigned long seg)
{ {
...@@ -19,3 +21,5 @@ int cmdline_find_option_bool(const char *option) ...@@ -19,3 +21,5 @@ int cmdline_find_option_bool(const char *option)
{ {
return __cmdline_find_option_bool(real_mode->hdr.cmd_line_ptr, option); return __cmdline_find_option_bool(real_mode->hdr.cmd_line_ptr, option);
} }
#endif
...@@ -38,18 +38,19 @@ static inline void debug_putstr(const char *s) ...@@ -38,18 +38,19 @@ static inline void debug_putstr(const char *s)
#endif #endif
#ifdef CONFIG_EARLY_PRINTK
/* cmdline.c */ /* cmdline.c */
int cmdline_find_option(const char *option, char *buffer, int bufsize); int cmdline_find_option(const char *option, char *buffer, int bufsize);
int cmdline_find_option_bool(const char *option); int cmdline_find_option_bool(const char *option);
/* early_serial_console.c */ /* early_serial_console.c */
#ifdef CONFIG_EARLY_PRINTK
extern int early_serial_base; extern int early_serial_base;
void console_init(void); void console_init(void);
#else #else
/* early_serial_console.c */
static const int early_serial_base; static const int early_serial_base;
static inline void console_init(void) static inline void console_init(void)
{ } { }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment