summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu/proc.c
diff options
context:
space:
mode:
authorBorislav Petkov <bp@suse.de>2014-06-24 13:25:03 +0200
committerH. Peter Anvin <hpa@linux.intel.com>2014-07-14 12:21:39 -0700
commit80a208bd3948aceddf0429bd9f9b4cd858d526df (patch)
tree06bd3dd2f9f6d73ce63da9852ca7d8d57f9599c6 /arch/x86/kernel/cpu/proc.c
parent9b13a93df267af681a66a6a738bf1af10102da7d (diff)
downloadlinux-80a208bd3948aceddf0429bd9f9b4cd858d526df.tar.bz2
x86/cpufeature: Add bug flags to /proc/cpuinfo
Dump the flags which denote we have detected and/or have applied bug workarounds to the CPU we're executing on, in a similar manner to the feature flags. The advantage is that those are not accumulating over time like the CPU features. Signed-off-by: Borislav Petkov <bp@suse.de> Link: http://lkml.kernel.org/r/1403609105-8332-2-git-send-email-bp@alien8.de Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch/x86/kernel/cpu/proc.c')
-rw-r--r--arch/x86/kernel/cpu/proc.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/proc.c b/arch/x86/kernel/cpu/proc.c
index 06fe3ed8b851..5433658e598d 100644
--- a/arch/x86/kernel/cpu/proc.c
+++ b/arch/x86/kernel/cpu/proc.c
@@ -97,6 +97,14 @@ static int show_cpuinfo(struct seq_file *m, void *v)
if (cpu_has(c, i) && x86_cap_flags[i] != NULL)
seq_printf(m, " %s", x86_cap_flags[i]);
+ seq_printf(m, "\nbugs\t\t:");
+ for (i = 0; i < 32*NBUGINTS; i++) {
+ unsigned int bug_bit = 32*NCAPINTS + i;
+
+ if (cpu_has_bug(c, bug_bit) && x86_bug_flags[i])
+ seq_printf(m, " %s", x86_bug_flags[i]);
+ }
+
seq_printf(m, "\nbogomips\t: %lu.%02lu\n",
c->loops_per_jiffy/(500000/HZ),
(c->loops_per_jiffy/(5000/HZ)) % 100);