diff options
author | Borislav Petkov <bp@suse.de> | 2016-01-26 16:12:04 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2016-01-30 05:22:17 -0500 |
commit | cd4d09ec6f6c12a2cc3db5b7d8876a325a53545b (patch) | |
tree | 84f048b948d7ab0e7c0064986e5e0e2c0121694a /arch/x86/kernel | |
parent | 78726ee5ff3fc76697c8754e0f546915bd61e7c6 (diff) |
x86/cpufeature: Carve out X86_FEATURE_*
Move them to a separate header and have the following
dependency:
x86/cpufeatures.h <- x86/processor.h <- x86/cpufeature.h
This makes it easier to use the header in asm code and not
include the whole cpufeature.h and add guards for asm.
Suggested-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1453842730-28463-5-git-send-email-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r-- | arch/x86/kernel/cpu/Makefile | 2 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/centaur.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/cyrix.c | 1 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/intel.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/intel_cacheinfo.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/match.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/mkcapflags.sh | 6 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/mtrr/main.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/transmeta.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/e820.c | 1 | ||||
-rw-r--r-- | arch/x86/kernel/head_32.S | 2 | ||||
-rw-r--r-- | arch/x86/kernel/hpet.c | 1 | ||||
-rw-r--r-- | arch/x86/kernel/msr.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/verify_cpu.S | 2 |
14 files changed, 16 insertions, 13 deletions
diff --git a/arch/x86/kernel/cpu/Makefile b/arch/x86/kernel/cpu/Makefile index 58031303e304..faa7b5204129 100644 --- a/arch/x86/kernel/cpu/Makefile +++ b/arch/x86/kernel/cpu/Makefile | |||
@@ -64,7 +64,7 @@ ifdef CONFIG_X86_FEATURE_NAMES | |||
64 | quiet_cmd_mkcapflags = MKCAP $@ | 64 | quiet_cmd_mkcapflags = MKCAP $@ |
65 | cmd_mkcapflags = $(CONFIG_SHELL) $(srctree)/$(src)/mkcapflags.sh $< $@ | 65 | cmd_mkcapflags = $(CONFIG_SHELL) $(srctree)/$(src)/mkcapflags.sh $< $@ |
66 | 66 | ||
67 | cpufeature = $(src)/../../include/asm/cpufeature.h | 67 | cpufeature = $(src)/../../include/asm/cpufeatures.h |
68 | 68 | ||
69 | targets += capflags.c | 69 | targets += capflags.c |
70 | $(obj)/capflags.c: $(cpufeature) $(src)/mkcapflags.sh FORCE | 70 | $(obj)/capflags.c: $(cpufeature) $(src)/mkcapflags.sh FORCE |
diff --git a/arch/x86/kernel/cpu/centaur.c b/arch/x86/kernel/cpu/centaur.c index ae20be6e483c..6608c03c2126 100644 --- a/arch/x86/kernel/cpu/centaur.c +++ b/arch/x86/kernel/cpu/centaur.c | |||
@@ -1,7 +1,7 @@ | |||
1 | #include <linux/bitops.h> | 1 | #include <linux/bitops.h> |
2 | #include <linux/kernel.h> | 2 | #include <linux/kernel.h> |
3 | 3 | ||
4 | #include <asm/processor.h> | 4 | #include <asm/cpufeature.h> |
5 | #include <asm/e820.h> | 5 | #include <asm/e820.h> |
6 | #include <asm/mtrr.h> | 6 | #include <asm/mtrr.h> |
7 | #include <asm/msr.h> | 7 | #include <asm/msr.h> |
diff --git a/arch/x86/kernel/cpu/cyrix.c b/arch/x86/kernel/cpu/cyrix.c index aaf152e79637..15e47c1cd412 100644 --- a/arch/x86/kernel/cpu/cyrix.c +++ b/arch/x86/kernel/cpu/cyrix.c | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <linux/timer.h> | 8 | #include <linux/timer.h> |
9 | #include <asm/pci-direct.h> | 9 | #include <asm/pci-direct.h> |
10 | #include <asm/tsc.h> | 10 | #include <asm/tsc.h> |
11 | #include <asm/cpufeature.h> | ||
11 | 12 | ||
12 | #include "cpu.h" | 13 | #include "cpu.h" |
13 | 14 | ||
diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c index 565648bc1a0a..9299e3bdfad6 100644 --- a/arch/x86/kernel/cpu/intel.c +++ b/arch/x86/kernel/cpu/intel.c | |||
@@ -8,7 +8,7 @@ | |||
8 | #include <linux/module.h> | 8 | #include <linux/module.h> |
9 | #include <linux/uaccess.h> | 9 | #include <linux/uaccess.h> |
10 | 10 | ||
11 | #include <asm/processor.h> | 11 | #include <asm/cpufeature.h> |
12 | #include <asm/pgtable.h> | 12 | #include <asm/pgtable.h> |
13 | #include <asm/msr.h> | 13 | #include <asm/msr.h> |
14 | #include <asm/bugs.h> | 14 | #include <asm/bugs.h> |
diff --git a/arch/x86/kernel/cpu/intel_cacheinfo.c b/arch/x86/kernel/cpu/intel_cacheinfo.c index 0b6c52388cf4..341449c49f34 100644 --- a/arch/x86/kernel/cpu/intel_cacheinfo.c +++ b/arch/x86/kernel/cpu/intel_cacheinfo.c | |||
@@ -14,7 +14,7 @@ | |||
14 | #include <linux/sysfs.h> | 14 | #include <linux/sysfs.h> |
15 | #include <linux/pci.h> | 15 | #include <linux/pci.h> |
16 | 16 | ||
17 | #include <asm/processor.h> | 17 | #include <asm/cpufeature.h> |
18 | #include <asm/amd_nb.h> | 18 | #include <asm/amd_nb.h> |
19 | #include <asm/smp.h> | 19 | #include <asm/smp.h> |
20 | 20 | ||
diff --git a/arch/x86/kernel/cpu/match.c b/arch/x86/kernel/cpu/match.c index afa9f0d487ea..fbb5e90557a5 100644 --- a/arch/x86/kernel/cpu/match.c +++ b/arch/x86/kernel/cpu/match.c | |||
@@ -1,5 +1,5 @@ | |||
1 | #include <asm/cpu_device_id.h> | 1 | #include <asm/cpu_device_id.h> |
2 | #include <asm/processor.h> | 2 | #include <asm/cpufeature.h> |
3 | #include <linux/cpu.h> | 3 | #include <linux/cpu.h> |
4 | #include <linux/module.h> | 4 | #include <linux/module.h> |
5 | #include <linux/slab.h> | 5 | #include <linux/slab.h> |
diff --git a/arch/x86/kernel/cpu/mkcapflags.sh b/arch/x86/kernel/cpu/mkcapflags.sh index 3f20710a5b23..6988c74409a8 100644 --- a/arch/x86/kernel/cpu/mkcapflags.sh +++ b/arch/x86/kernel/cpu/mkcapflags.sh | |||
@@ -1,6 +1,6 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | # | 2 | # |
3 | # Generate the x86_cap/bug_flags[] arrays from include/asm/cpufeature.h | 3 | # Generate the x86_cap/bug_flags[] arrays from include/asm/cpufeatures.h |
4 | # | 4 | # |
5 | 5 | ||
6 | IN=$1 | 6 | IN=$1 |
@@ -49,8 +49,8 @@ dump_array() | |||
49 | trap 'rm "$OUT"' EXIT | 49 | trap 'rm "$OUT"' EXIT |
50 | 50 | ||
51 | ( | 51 | ( |
52 | echo "#ifndef _ASM_X86_CPUFEATURE_H" | 52 | echo "#ifndef _ASM_X86_CPUFEATURES_H" |
53 | echo "#include <asm/cpufeature.h>" | 53 | echo "#include <asm/cpufeatures.h>" |
54 | echo "#endif" | 54 | echo "#endif" |
55 | echo "" | 55 | echo "" |
56 | 56 | ||
diff --git a/arch/x86/kernel/cpu/mtrr/main.c b/arch/x86/kernel/cpu/mtrr/main.c index 5c3d149ee91c..74f1d90f9c29 100644 --- a/arch/x86/kernel/cpu/mtrr/main.c +++ b/arch/x86/kernel/cpu/mtrr/main.c | |||
@@ -47,7 +47,7 @@ | |||
47 | #include <linux/smp.h> | 47 | #include <linux/smp.h> |
48 | #include <linux/syscore_ops.h> | 48 | #include <linux/syscore_ops.h> |
49 | 49 | ||
50 | #include <asm/processor.h> | 50 | #include <asm/cpufeature.h> |
51 | #include <asm/e820.h> | 51 | #include <asm/e820.h> |
52 | #include <asm/mtrr.h> | 52 | #include <asm/mtrr.h> |
53 | #include <asm/msr.h> | 53 | #include <asm/msr.h> |
diff --git a/arch/x86/kernel/cpu/transmeta.c b/arch/x86/kernel/cpu/transmeta.c index 252da7aceca6..a19a663282b5 100644 --- a/arch/x86/kernel/cpu/transmeta.c +++ b/arch/x86/kernel/cpu/transmeta.c | |||
@@ -1,6 +1,6 @@ | |||
1 | #include <linux/kernel.h> | 1 | #include <linux/kernel.h> |
2 | #include <linux/mm.h> | 2 | #include <linux/mm.h> |
3 | #include <asm/processor.h> | 3 | #include <asm/cpufeature.h> |
4 | #include <asm/msr.h> | 4 | #include <asm/msr.h> |
5 | #include "cpu.h" | 5 | #include "cpu.h" |
6 | 6 | ||
diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c index 569c1e4f96fe..b3c2a697820a 100644 --- a/arch/x86/kernel/e820.c +++ b/arch/x86/kernel/e820.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <asm/e820.h> | 24 | #include <asm/e820.h> |
25 | #include <asm/proto.h> | 25 | #include <asm/proto.h> |
26 | #include <asm/setup.h> | 26 | #include <asm/setup.h> |
27 | #include <asm/cpufeature.h> | ||
27 | 28 | ||
28 | /* | 29 | /* |
29 | * The e820 map is the map that gets modified e.g. with command line parameters | 30 | * The e820 map is the map that gets modified e.g. with command line parameters |
diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S index 6bc9ae24b6d2..af1112980dd4 100644 --- a/arch/x86/kernel/head_32.S +++ b/arch/x86/kernel/head_32.S | |||
@@ -19,7 +19,7 @@ | |||
19 | #include <asm/setup.h> | 19 | #include <asm/setup.h> |
20 | #include <asm/processor-flags.h> | 20 | #include <asm/processor-flags.h> |
21 | #include <asm/msr-index.h> | 21 | #include <asm/msr-index.h> |
22 | #include <asm/cpufeature.h> | 22 | #include <asm/cpufeatures.h> |
23 | #include <asm/percpu.h> | 23 | #include <asm/percpu.h> |
24 | #include <asm/nops.h> | 24 | #include <asm/nops.h> |
25 | #include <asm/bootparam.h> | 25 | #include <asm/bootparam.h> |
diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c index b8e6ff5cd5d0..be0ebbb6d1d1 100644 --- a/arch/x86/kernel/hpet.c +++ b/arch/x86/kernel/hpet.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/pm.h> | 12 | #include <linux/pm.h> |
13 | #include <linux/io.h> | 13 | #include <linux/io.h> |
14 | 14 | ||
15 | #include <asm/cpufeature.h> | ||
15 | #include <asm/irqdomain.h> | 16 | #include <asm/irqdomain.h> |
16 | #include <asm/fixmap.h> | 17 | #include <asm/fixmap.h> |
17 | #include <asm/hpet.h> | 18 | #include <asm/hpet.h> |
diff --git a/arch/x86/kernel/msr.c b/arch/x86/kernel/msr.c index 64f9616f93f1..7f3550acde1b 100644 --- a/arch/x86/kernel/msr.c +++ b/arch/x86/kernel/msr.c | |||
@@ -40,7 +40,7 @@ | |||
40 | #include <linux/uaccess.h> | 40 | #include <linux/uaccess.h> |
41 | #include <linux/gfp.h> | 41 | #include <linux/gfp.h> |
42 | 42 | ||
43 | #include <asm/processor.h> | 43 | #include <asm/cpufeature.h> |
44 | #include <asm/msr.h> | 44 | #include <asm/msr.h> |
45 | 45 | ||
46 | static struct class *msr_class; | 46 | static struct class *msr_class; |
diff --git a/arch/x86/kernel/verify_cpu.S b/arch/x86/kernel/verify_cpu.S index 07efb35ee4bc..014ea59aa153 100644 --- a/arch/x86/kernel/verify_cpu.S +++ b/arch/x86/kernel/verify_cpu.S | |||
@@ -30,7 +30,7 @@ | |||
30 | * appropriately. Either display a message or halt. | 30 | * appropriately. Either display a message or halt. |
31 | */ | 31 | */ |
32 | 32 | ||
33 | #include <asm/cpufeature.h> | 33 | #include <asm/cpufeatures.h> |
34 | #include <asm/msr-index.h> | 34 | #include <asm/msr-index.h> |
35 | 35 | ||
36 | verify_cpu: | 36 | verify_cpu: |