diff options
author | Joe Millenbach <jmillenbach@gmail.com> | 2012-07-19 21:04:39 -0400 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2012-07-21 14:07:25 -0400 |
commit | 7aac3015b533add3e85222f9fd2ab66216b38746 (patch) | |
tree | a607bd2889f6f21864828920f37741ffd7a16f2f /arch | |
parent | cb454fe10400566214ec690318a0167ff7f5b8ca (diff) |
x86, boot: Switch output functions from command-line flags to conditional compilation
Changed putstr flagging from parameter to conditional compilation for puts,
debug_putstr, and error_putstr. This allows for space savings since most
configurations won't use this feature.
Signed-off-by: Joe Millenbach <jmillenbach@gmail.com>
Link: http://lkml.kernel.org/r/1342746282-28497-5-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')
-rw-r--r-- | arch/x86/boot/compressed/misc.c | 12 | ||||
-rw-r--r-- | arch/x86/boot/compressed/misc.h | 17 |
2 files changed, 14 insertions, 15 deletions
diff --git a/arch/x86/boot/compressed/misc.c b/arch/x86/boot/compressed/misc.c index de1d54d8bddc..8c29f82b15e4 100644 --- a/arch/x86/boot/compressed/misc.c +++ b/arch/x86/boot/compressed/misc.c | |||
@@ -169,15 +169,11 @@ static void serial_putchar(int ch) | |||
169 | outb(ch, early_serial_base + TXR); | 169 | outb(ch, early_serial_base + TXR); |
170 | } | 170 | } |
171 | 171 | ||
172 | void __putstr(int error, const char *s) | 172 | void __putstr(const char *s) |
173 | { | 173 | { |
174 | int x, y, pos; | 174 | int x, y, pos; |
175 | char c; | 175 | char c; |
176 | 176 | ||
177 | #ifndef CONFIG_X86_VERBOSE_BOOTUP | ||
178 | if (!error) | ||
179 | return; | ||
180 | #endif | ||
181 | if (early_serial_base) { | 177 | if (early_serial_base) { |
182 | const char *str = s; | 178 | const char *str = s; |
183 | while (*str) { | 179 | while (*str) { |
@@ -223,12 +219,6 @@ void __putstr(int error, const char *s) | |||
223 | outb(0xff & (pos >> 1), vidport+1); | 219 | outb(0xff & (pos >> 1), vidport+1); |
224 | } | 220 | } |
225 | 221 | ||
226 | static void debug_putstr(const char *s) | ||
227 | { | ||
228 | if (debug) | ||
229 | putstr(s); | ||
230 | } | ||
231 | |||
232 | void *memset(void *s, int c, size_t n) | 222 | void *memset(void *s, int c, size_t n) |
233 | { | 223 | { |
234 | int i; | 224 | int i; |
diff --git a/arch/x86/boot/compressed/misc.h b/arch/x86/boot/compressed/misc.h index 4c1bfb69e0d8..618e5c830f15 100644 --- a/arch/x86/boot/compressed/misc.h +++ b/arch/x86/boot/compressed/misc.h | |||
@@ -24,10 +24,19 @@ | |||
24 | 24 | ||
25 | /* misc.c */ | 25 | /* misc.c */ |
26 | extern struct boot_params *real_mode; /* Pointer to real-mode data */ | 26 | extern struct boot_params *real_mode; /* Pointer to real-mode data */ |
27 | void __putstr(int error, const char *s); | 27 | void __putstr(const char *s); |
28 | #define putstr(__x) __putstr(0, __x) | 28 | #define error_putstr(__x) __putstr(__x) |
29 | #define error_putstr(__x) __putstr(1, __x) | 29 | |
30 | #define puts(__x) __putstr(0, __x) | 30 | #ifdef CONFIG_X86_VERBOSE_BOOTUP |
31 | |||
32 | #define debug_putstr(__x) __putstr(__x) | ||
33 | |||
34 | #else | ||
35 | |||
36 | static inline void debug_putstr(const char *s) | ||
37 | { } | ||
38 | |||
39 | #endif | ||
31 | 40 | ||
32 | /* cmdline.c */ | 41 | /* cmdline.c */ |
33 | int cmdline_find_option(const char *option, char *buffer, int bufsize); | 42 | int cmdline_find_option(const char *option, char *buffer, int bufsize); |