diff options
-rw-r--r-- | arch/x86/include/asm/processor.h | 1 | ||||
-rw-r--r-- | arch/x86/kernel/acpi/boot.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/common.c | 14 | ||||
-rw-r--r-- | arch/x86/kernel/entry_64.S | 2 | ||||
-rw-r--r-- | arch/x86/kernel/nmi_selftest.c | 37 | ||||
-rw-r--r-- | arch/x86/kernel/smpboot.c | 5 | ||||
-rw-r--r-- | drivers/iommu/amd_iommu.c | 2 |
7 files changed, 33 insertions, 30 deletions
diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h index 58545c97d071..95da14f7ee85 100644 --- a/arch/x86/include/asm/processor.h +++ b/arch/x86/include/asm/processor.h | |||
@@ -162,6 +162,7 @@ extern void early_cpu_init(void); | |||
162 | extern void identify_boot_cpu(void); | 162 | extern void identify_boot_cpu(void); |
163 | extern void identify_secondary_cpu(struct cpuinfo_x86 *); | 163 | extern void identify_secondary_cpu(struct cpuinfo_x86 *); |
164 | extern void print_cpu_info(struct cpuinfo_x86 *); | 164 | extern void print_cpu_info(struct cpuinfo_x86 *); |
165 | void print_cpu_msr(struct cpuinfo_x86 *); | ||
165 | extern void init_scattered_cpuid_features(struct cpuinfo_x86 *c); | 166 | extern void init_scattered_cpuid_features(struct cpuinfo_x86 *c); |
166 | extern unsigned int init_intel_cacheinfo(struct cpuinfo_x86 *c); | 167 | extern unsigned int init_intel_cacheinfo(struct cpuinfo_x86 *c); |
167 | extern unsigned short num_cache_leaves; | 168 | extern unsigned short num_cache_leaves; |
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c index ce664f33ea8e..406ed77216d0 100644 --- a/arch/x86/kernel/acpi/boot.c +++ b/arch/x86/kernel/acpi/boot.c | |||
@@ -593,7 +593,7 @@ void __init acpi_set_irq_model_ioapic(void) | |||
593 | #ifdef CONFIG_ACPI_HOTPLUG_CPU | 593 | #ifdef CONFIG_ACPI_HOTPLUG_CPU |
594 | #include <acpi/processor.h> | 594 | #include <acpi/processor.h> |
595 | 595 | ||
596 | static void acpi_map_cpu2node(acpi_handle handle, int cpu, int physid) | 596 | static void __cpuinitdata acpi_map_cpu2node(acpi_handle handle, int cpu, int physid) |
597 | { | 597 | { |
598 | #ifdef CONFIG_ACPI_NUMA | 598 | #ifdef CONFIG_ACPI_NUMA |
599 | int nid; | 599 | int nid; |
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index c0f7d68d318f..b3e0081f9a2b 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c | |||
@@ -933,7 +933,7 @@ static const struct msr_range msr_range_array[] __cpuinitconst = { | |||
933 | { 0xc0011000, 0xc001103b}, | 933 | { 0xc0011000, 0xc001103b}, |
934 | }; | 934 | }; |
935 | 935 | ||
936 | static void __cpuinit print_cpu_msr(void) | 936 | static void __cpuinit __print_cpu_msr(void) |
937 | { | 937 | { |
938 | unsigned index_min, index_max; | 938 | unsigned index_min, index_max; |
939 | unsigned index; | 939 | unsigned index; |
@@ -997,13 +997,13 @@ void __cpuinit print_cpu_info(struct cpuinfo_x86 *c) | |||
997 | else | 997 | else |
998 | printk(KERN_CONT "\n"); | 998 | printk(KERN_CONT "\n"); |
999 | 999 | ||
1000 | #ifdef CONFIG_SMP | 1000 | __print_cpu_msr(); |
1001 | } | ||
1002 | |||
1003 | void __cpuinit print_cpu_msr(struct cpuinfo_x86 *c) | ||
1004 | { | ||
1001 | if (c->cpu_index < show_msr) | 1005 | if (c->cpu_index < show_msr) |
1002 | print_cpu_msr(); | 1006 | __print_cpu_msr(); |
1003 | #else | ||
1004 | if (show_msr) | ||
1005 | print_cpu_msr(); | ||
1006 | #endif | ||
1007 | } | 1007 | } |
1008 | 1008 | ||
1009 | static __init int setup_disablecpuid(char *arg) | 1009 | static __init int setup_disablecpuid(char *arg) |
diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S index a63dabe153ca..734ebd1d3caa 100644 --- a/arch/x86/kernel/entry_64.S +++ b/arch/x86/kernel/entry_64.S | |||
@@ -812,7 +812,7 @@ ret_from_intr: | |||
812 | 812 | ||
813 | /* Restore saved previous stack */ | 813 | /* Restore saved previous stack */ |
814 | popq %rsi | 814 | popq %rsi |
815 | CFI_DEF_CFA_REGISTER rsi | 815 | CFI_DEF_CFA rsi,SS+8-RBP /* reg/off reset after def_cfa_expr */ |
816 | leaq ARGOFFSET-RBP(%rsi), %rsp | 816 | leaq ARGOFFSET-RBP(%rsi), %rsp |
817 | CFI_DEF_CFA_REGISTER rsp | 817 | CFI_DEF_CFA_REGISTER rsp |
818 | CFI_ADJUST_CFA_OFFSET RBP-ARGOFFSET | 818 | CFI_ADJUST_CFA_OFFSET RBP-ARGOFFSET |
diff --git a/arch/x86/kernel/nmi_selftest.c b/arch/x86/kernel/nmi_selftest.c index 0d01a8ea4e11..2c39dcd510fa 100644 --- a/arch/x86/kernel/nmi_selftest.c +++ b/arch/x86/kernel/nmi_selftest.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/smp.h> | 12 | #include <linux/smp.h> |
13 | #include <linux/cpumask.h> | 13 | #include <linux/cpumask.h> |
14 | #include <linux/delay.h> | 14 | #include <linux/delay.h> |
15 | #include <linux/init.h> | ||
15 | 16 | ||
16 | #include <asm/apic.h> | 17 | #include <asm/apic.h> |
17 | #include <asm/nmi.h> | 18 | #include <asm/nmi.h> |
@@ -20,35 +21,35 @@ | |||
20 | #define FAILURE 1 | 21 | #define FAILURE 1 |
21 | #define TIMEOUT 2 | 22 | #define TIMEOUT 2 |
22 | 23 | ||
23 | static int nmi_fail; | 24 | static int __initdata nmi_fail; |
24 | 25 | ||
25 | /* check to see if NMI IPIs work on this machine */ | 26 | /* check to see if NMI IPIs work on this machine */ |
26 | static DECLARE_BITMAP(nmi_ipi_mask, NR_CPUS) __read_mostly; | 27 | static DECLARE_BITMAP(nmi_ipi_mask, NR_CPUS) __initdata; |
27 | 28 | ||
28 | static int testcase_total; | 29 | static int __initdata testcase_total; |
29 | static int testcase_successes; | 30 | static int __initdata testcase_successes; |
30 | static int expected_testcase_failures; | 31 | static int __initdata expected_testcase_failures; |
31 | static int unexpected_testcase_failures; | 32 | static int __initdata unexpected_testcase_failures; |
32 | static int unexpected_testcase_unknowns; | 33 | static int __initdata unexpected_testcase_unknowns; |
33 | 34 | ||
34 | static int nmi_unk_cb(unsigned int val, struct pt_regs *regs) | 35 | static int __init nmi_unk_cb(unsigned int val, struct pt_regs *regs) |
35 | { | 36 | { |
36 | unexpected_testcase_unknowns++; | 37 | unexpected_testcase_unknowns++; |
37 | return NMI_HANDLED; | 38 | return NMI_HANDLED; |
38 | } | 39 | } |
39 | 40 | ||
40 | static void init_nmi_testsuite(void) | 41 | static void __init init_nmi_testsuite(void) |
41 | { | 42 | { |
42 | /* trap all the unknown NMIs we may generate */ | 43 | /* trap all the unknown NMIs we may generate */ |
43 | register_nmi_handler(NMI_UNKNOWN, nmi_unk_cb, 0, "nmi_selftest_unk"); | 44 | register_nmi_handler(NMI_UNKNOWN, nmi_unk_cb, 0, "nmi_selftest_unk"); |
44 | } | 45 | } |
45 | 46 | ||
46 | static void cleanup_nmi_testsuite(void) | 47 | static void __init cleanup_nmi_testsuite(void) |
47 | { | 48 | { |
48 | unregister_nmi_handler(NMI_UNKNOWN, "nmi_selftest_unk"); | 49 | unregister_nmi_handler(NMI_UNKNOWN, "nmi_selftest_unk"); |
49 | } | 50 | } |
50 | 51 | ||
51 | static int test_nmi_ipi_callback(unsigned int val, struct pt_regs *regs) | 52 | static int __init test_nmi_ipi_callback(unsigned int val, struct pt_regs *regs) |
52 | { | 53 | { |
53 | int cpu = raw_smp_processor_id(); | 54 | int cpu = raw_smp_processor_id(); |
54 | 55 | ||
@@ -58,7 +59,7 @@ static int test_nmi_ipi_callback(unsigned int val, struct pt_regs *regs) | |||
58 | return NMI_DONE; | 59 | return NMI_DONE; |
59 | } | 60 | } |
60 | 61 | ||
61 | static void test_nmi_ipi(struct cpumask *mask) | 62 | static void __init test_nmi_ipi(struct cpumask *mask) |
62 | { | 63 | { |
63 | unsigned long timeout; | 64 | unsigned long timeout; |
64 | 65 | ||
@@ -86,7 +87,7 @@ static void test_nmi_ipi(struct cpumask *mask) | |||
86 | return; | 87 | return; |
87 | } | 88 | } |
88 | 89 | ||
89 | static void remote_ipi(void) | 90 | static void __init remote_ipi(void) |
90 | { | 91 | { |
91 | cpumask_copy(to_cpumask(nmi_ipi_mask), cpu_online_mask); | 92 | cpumask_copy(to_cpumask(nmi_ipi_mask), cpu_online_mask); |
92 | cpumask_clear_cpu(smp_processor_id(), to_cpumask(nmi_ipi_mask)); | 93 | cpumask_clear_cpu(smp_processor_id(), to_cpumask(nmi_ipi_mask)); |
@@ -94,19 +95,19 @@ static void remote_ipi(void) | |||
94 | test_nmi_ipi(to_cpumask(nmi_ipi_mask)); | 95 | test_nmi_ipi(to_cpumask(nmi_ipi_mask)); |
95 | } | 96 | } |
96 | 97 | ||
97 | static void local_ipi(void) | 98 | static void __init local_ipi(void) |
98 | { | 99 | { |
99 | cpumask_clear(to_cpumask(nmi_ipi_mask)); | 100 | cpumask_clear(to_cpumask(nmi_ipi_mask)); |
100 | cpumask_set_cpu(smp_processor_id(), to_cpumask(nmi_ipi_mask)); | 101 | cpumask_set_cpu(smp_processor_id(), to_cpumask(nmi_ipi_mask)); |
101 | test_nmi_ipi(to_cpumask(nmi_ipi_mask)); | 102 | test_nmi_ipi(to_cpumask(nmi_ipi_mask)); |
102 | } | 103 | } |
103 | 104 | ||
104 | static void reset_nmi(void) | 105 | static void __init reset_nmi(void) |
105 | { | 106 | { |
106 | nmi_fail = 0; | 107 | nmi_fail = 0; |
107 | } | 108 | } |
108 | 109 | ||
109 | static void dotest(void (*testcase_fn)(void), int expected) | 110 | static void __init dotest(void (*testcase_fn)(void), int expected) |
110 | { | 111 | { |
111 | testcase_fn(); | 112 | testcase_fn(); |
112 | /* | 113 | /* |
@@ -131,12 +132,12 @@ static void dotest(void (*testcase_fn)(void), int expected) | |||
131 | reset_nmi(); | 132 | reset_nmi(); |
132 | } | 133 | } |
133 | 134 | ||
134 | static inline void print_testname(const char *testname) | 135 | static inline void __init print_testname(const char *testname) |
135 | { | 136 | { |
136 | printk("%12s:", testname); | 137 | printk("%12s:", testname); |
137 | } | 138 | } |
138 | 139 | ||
139 | void nmi_selftest(void) | 140 | void __init nmi_selftest(void) |
140 | { | 141 | { |
141 | init_nmi_testsuite(); | 142 | init_nmi_testsuite(); |
142 | 143 | ||
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index 6d5f54fcd233..dccebbe758ca 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c | |||
@@ -776,9 +776,10 @@ do_rest: | |||
776 | schedule(); | 776 | schedule(); |
777 | } | 777 | } |
778 | 778 | ||
779 | if (cpumask_test_cpu(cpu, cpu_callin_mask)) | 779 | if (cpumask_test_cpu(cpu, cpu_callin_mask)) { |
780 | print_cpu_msr(&cpu_data(cpu)); | ||
780 | pr_debug("CPU%d: has booted.\n", cpu); | 781 | pr_debug("CPU%d: has booted.\n", cpu); |
781 | else { | 782 | } else { |
782 | boot_error = 1; | 783 | boot_error = 1; |
783 | if (*(volatile u32 *)TRAMPOLINE_SYM(trampoline_status) | 784 | if (*(volatile u32 *)TRAMPOLINE_SYM(trampoline_status) |
784 | == 0xA5A5A5A5) | 785 | == 0xA5A5A5A5) |
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index f75e0608be5b..ae2ec929e52f 100644 --- a/drivers/iommu/amd_iommu.c +++ b/drivers/iommu/amd_iommu.c | |||
@@ -2804,7 +2804,7 @@ static int amd_iommu_dma_supported(struct device *dev, u64 mask) | |||
2804 | * we don't need to preallocate the protection domains anymore. | 2804 | * we don't need to preallocate the protection domains anymore. |
2805 | * For now we have to. | 2805 | * For now we have to. |
2806 | */ | 2806 | */ |
2807 | static void prealloc_protection_domains(void) | 2807 | static void __init prealloc_protection_domains(void) |
2808 | { | 2808 | { |
2809 | struct iommu_dev_data *dev_data; | 2809 | struct iommu_dev_data *dev_data; |
2810 | struct dma_ops_domain *dma_dom; | 2810 | struct dma_ops_domain *dma_dom; |