aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include
diff options
context:
space:
mode:
authorJosh Triplett <josh@joshtriplett.org>2013-10-30 11:09:45 -0400
committerJosh Triplett <josh@joshtriplett.org>2014-08-17 18:54:00 -0400
commit9def39be4e960917fcb80514ff23651f9ec97193 (patch)
treefc898efcdaf87f15e70576481111291a4b8ed3ef /arch/x86/include
parent39f838e06f46576694d425ac30fe8ff1e214fc0b (diff)
x86: Support compiling out human-friendly processor feature names
The table mapping CPUID bits to human-readable strings takes up a non-trivial amount of space, and only exists to support /proc/cpuinfo and a couple of kernel messages. Since programs depend on the format of /proc/cpuinfo, force inclusion of the table when building with /proc support; otherwise, support omitting that table to save space, in which case the kernel messages will print features numerically instead. In addition to saving 1408 bytes out of vmlinux, this also saves 1373 bytes out of the uncompressed setup code, which contributes directly to the size of bzImage. Signed-off-by: Josh Triplett <josh@joshtriplett.org>
Diffstat (limited to 'arch/x86/include')
-rw-r--r--arch/x86/include/asm/cpufeature.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/x86/include/asm/cpufeature.h b/arch/x86/include/asm/cpufeature.h
index bb9b258d60e7..516903b98e06 100644
--- a/arch/x86/include/asm/cpufeature.h
+++ b/arch/x86/include/asm/cpufeature.h
@@ -250,8 +250,15 @@
250#include <asm/asm.h> 250#include <asm/asm.h>
251#include <linux/bitops.h> 251#include <linux/bitops.h>
252 252
253#ifdef CONFIG_X86_FEATURE_NAMES
253extern const char * const x86_cap_flags[NCAPINTS*32]; 254extern const char * const x86_cap_flags[NCAPINTS*32];
254extern const char * const x86_power_flags[32]; 255extern const char * const x86_power_flags[32];
256#define X86_CAP_FMT "%s"
257#define x86_cap_flag(flag) x86_cap_flags[flag]
258#else
259#define X86_CAP_FMT "%d:%d"
260#define x86_cap_flag(flag) ((flag) >> 5), ((flag) & 31)
261#endif
255 262
256/* 263/*
257 * In order to save room, we index into this array by doing 264 * In order to save room, we index into this array by doing