diff options
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r-- | arch/x86/kernel/Makefile | 3 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/addon_cpuid_features.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/common.c | 6 | ||||
-rw-r--r-- | arch/x86/kernel/entry_32.S | 4 | ||||
-rw-r--r-- | arch/x86/kernel/entry_64.S | 4 | ||||
-rw-r--r-- | arch/x86/kernel/ftrace.c | 50 | ||||
-rw-r--r-- | arch/x86/kernel/genx2apic_uv_x.c | 7 | ||||
-rw-r--r-- | arch/x86/kernel/i386_ksyms_32.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/k8.c | 1 | ||||
-rw-r--r-- | arch/x86/kernel/machine_kexec_32.c | 5 | ||||
-rw-r--r-- | arch/x86/kernel/microcode_amd.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/microcode_core.c | 4 | ||||
-rw-r--r-- | arch/x86/kernel/pci-dma.c | 16 | ||||
-rw-r--r-- | arch/x86/kernel/pci-gart_64.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/pci-swiotlb_64.c | 14 | ||||
-rw-r--r-- | arch/x86/kernel/tsc.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/vsmp_64.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/x8664_ksyms_64.c | 2 |
18 files changed, 77 insertions, 51 deletions
diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile index d7e5a58ee22f..e489ff9cb3e2 100644 --- a/arch/x86/kernel/Makefile +++ b/arch/x86/kernel/Makefile | |||
@@ -6,11 +6,12 @@ extra-y := head_$(BITS).o head$(BITS).o head.o init_task.o vmlinu | |||
6 | 6 | ||
7 | CPPFLAGS_vmlinux.lds += -U$(UTS_MACHINE) | 7 | CPPFLAGS_vmlinux.lds += -U$(UTS_MACHINE) |
8 | 8 | ||
9 | ifdef CONFIG_FTRACE | 9 | ifdef CONFIG_FUNCTION_TRACER |
10 | # Do not profile debug and lowlevel utilities | 10 | # Do not profile debug and lowlevel utilities |
11 | CFLAGS_REMOVE_tsc.o = -pg | 11 | CFLAGS_REMOVE_tsc.o = -pg |
12 | CFLAGS_REMOVE_rtc.o = -pg | 12 | CFLAGS_REMOVE_rtc.o = -pg |
13 | CFLAGS_REMOVE_paravirt-spinlocks.o = -pg | 13 | CFLAGS_REMOVE_paravirt-spinlocks.o = -pg |
14 | CFLAGS_REMOVE_ftrace.o = -pg | ||
14 | endif | 15 | endif |
15 | 16 | ||
16 | # | 17 | # |
diff --git a/arch/x86/kernel/cpu/addon_cpuid_features.c b/arch/x86/kernel/cpu/addon_cpuid_features.c index 0d9c993aa93e..ef8f831af823 100644 --- a/arch/x86/kernel/cpu/addon_cpuid_features.c +++ b/arch/x86/kernel/cpu/addon_cpuid_features.c | |||
@@ -69,7 +69,7 @@ void __cpuinit init_scattered_cpuid_features(struct cpuinfo_x86 *c) | |||
69 | */ | 69 | */ |
70 | void __cpuinit detect_extended_topology(struct cpuinfo_x86 *c) | 70 | void __cpuinit detect_extended_topology(struct cpuinfo_x86 *c) |
71 | { | 71 | { |
72 | #ifdef CONFIG_SMP | 72 | #ifdef CONFIG_X86_SMP |
73 | unsigned int eax, ebx, ecx, edx, sub_index; | 73 | unsigned int eax, ebx, ecx, edx, sub_index; |
74 | unsigned int ht_mask_width, core_plus_mask_width; | 74 | unsigned int ht_mask_width, core_plus_mask_width; |
75 | unsigned int core_select_mask, core_level_siblings; | 75 | unsigned int core_select_mask, core_level_siblings; |
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index 25581dcb280e..003a65395bd5 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c | |||
@@ -549,6 +549,10 @@ static void __init early_identify_cpu(struct cpuinfo_x86 *c) | |||
549 | this_cpu->c_early_init(c); | 549 | this_cpu->c_early_init(c); |
550 | 550 | ||
551 | validate_pat_support(c); | 551 | validate_pat_support(c); |
552 | |||
553 | #ifdef CONFIG_SMP | ||
554 | c->cpu_index = boot_cpu_id; | ||
555 | #endif | ||
552 | } | 556 | } |
553 | 557 | ||
554 | void __init early_cpu_init(void) | 558 | void __init early_cpu_init(void) |
@@ -1134,7 +1138,7 @@ void __cpuinit cpu_init(void) | |||
1134 | /* | 1138 | /* |
1135 | * Boot processor to setup the FP and extended state context info. | 1139 | * Boot processor to setup the FP and extended state context info. |
1136 | */ | 1140 | */ |
1137 | if (!smp_processor_id()) | 1141 | if (smp_processor_id() == boot_cpu_id) |
1138 | init_thread_xstate(); | 1142 | init_thread_xstate(); |
1139 | 1143 | ||
1140 | xsave_init(); | 1144 | xsave_init(); |
diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S index dd65143941a8..28b597ef9ca1 100644 --- a/arch/x86/kernel/entry_32.S +++ b/arch/x86/kernel/entry_32.S | |||
@@ -1149,7 +1149,7 @@ ENDPROC(xen_failsafe_callback) | |||
1149 | 1149 | ||
1150 | #endif /* CONFIG_XEN */ | 1150 | #endif /* CONFIG_XEN */ |
1151 | 1151 | ||
1152 | #ifdef CONFIG_FTRACE | 1152 | #ifdef CONFIG_FUNCTION_TRACER |
1153 | #ifdef CONFIG_DYNAMIC_FTRACE | 1153 | #ifdef CONFIG_DYNAMIC_FTRACE |
1154 | 1154 | ||
1155 | ENTRY(mcount) | 1155 | ENTRY(mcount) |
@@ -1204,7 +1204,7 @@ trace: | |||
1204 | jmp ftrace_stub | 1204 | jmp ftrace_stub |
1205 | END(mcount) | 1205 | END(mcount) |
1206 | #endif /* CONFIG_DYNAMIC_FTRACE */ | 1206 | #endif /* CONFIG_DYNAMIC_FTRACE */ |
1207 | #endif /* CONFIG_FTRACE */ | 1207 | #endif /* CONFIG_FUNCTION_TRACER */ |
1208 | 1208 | ||
1209 | .section .rodata,"a" | 1209 | .section .rodata,"a" |
1210 | #include "syscall_table_32.S" | 1210 | #include "syscall_table_32.S" |
diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S index 09e7145484c5..b86f332c96a6 100644 --- a/arch/x86/kernel/entry_64.S +++ b/arch/x86/kernel/entry_64.S | |||
@@ -61,7 +61,7 @@ | |||
61 | 61 | ||
62 | .code64 | 62 | .code64 |
63 | 63 | ||
64 | #ifdef CONFIG_FTRACE | 64 | #ifdef CONFIG_FUNCTION_TRACER |
65 | #ifdef CONFIG_DYNAMIC_FTRACE | 65 | #ifdef CONFIG_DYNAMIC_FTRACE |
66 | ENTRY(mcount) | 66 | ENTRY(mcount) |
67 | retq | 67 | retq |
@@ -138,7 +138,7 @@ trace: | |||
138 | jmp ftrace_stub | 138 | jmp ftrace_stub |
139 | END(mcount) | 139 | END(mcount) |
140 | #endif /* CONFIG_DYNAMIC_FTRACE */ | 140 | #endif /* CONFIG_DYNAMIC_FTRACE */ |
141 | #endif /* CONFIG_FTRACE */ | 141 | #endif /* CONFIG_FUNCTION_TRACER */ |
142 | 142 | ||
143 | #ifndef CONFIG_PREEMPT | 143 | #ifndef CONFIG_PREEMPT |
144 | #define retint_kernel retint_restore_args | 144 | #define retint_kernel retint_restore_args |
diff --git a/arch/x86/kernel/ftrace.c b/arch/x86/kernel/ftrace.c index d073d981a730..50ea0ac8c9bf 100644 --- a/arch/x86/kernel/ftrace.c +++ b/arch/x86/kernel/ftrace.c | |||
@@ -21,8 +21,7 @@ | |||
21 | #include <asm/nops.h> | 21 | #include <asm/nops.h> |
22 | 22 | ||
23 | 23 | ||
24 | /* Long is fine, even if it is only 4 bytes ;-) */ | 24 | static unsigned char ftrace_nop[MCOUNT_INSN_SIZE]; |
25 | static unsigned long *ftrace_nop; | ||
26 | 25 | ||
27 | union ftrace_code_union { | 26 | union ftrace_code_union { |
28 | char code[MCOUNT_INSN_SIZE]; | 27 | char code[MCOUNT_INSN_SIZE]; |
@@ -33,17 +32,17 @@ union ftrace_code_union { | |||
33 | }; | 32 | }; |
34 | 33 | ||
35 | 34 | ||
36 | static int notrace ftrace_calc_offset(long ip, long addr) | 35 | static int ftrace_calc_offset(long ip, long addr) |
37 | { | 36 | { |
38 | return (int)(addr - ip); | 37 | return (int)(addr - ip); |
39 | } | 38 | } |
40 | 39 | ||
41 | notrace unsigned char *ftrace_nop_replace(void) | 40 | unsigned char *ftrace_nop_replace(void) |
42 | { | 41 | { |
43 | return (char *)ftrace_nop; | 42 | return ftrace_nop; |
44 | } | 43 | } |
45 | 44 | ||
46 | notrace unsigned char *ftrace_call_replace(unsigned long ip, unsigned long addr) | 45 | unsigned char *ftrace_call_replace(unsigned long ip, unsigned long addr) |
47 | { | 46 | { |
48 | static union ftrace_code_union calc; | 47 | static union ftrace_code_union calc; |
49 | 48 | ||
@@ -57,7 +56,7 @@ notrace unsigned char *ftrace_call_replace(unsigned long ip, unsigned long addr) | |||
57 | return calc.code; | 56 | return calc.code; |
58 | } | 57 | } |
59 | 58 | ||
60 | notrace int | 59 | int |
61 | ftrace_modify_code(unsigned long ip, unsigned char *old_code, | 60 | ftrace_modify_code(unsigned long ip, unsigned char *old_code, |
62 | unsigned char *new_code) | 61 | unsigned char *new_code) |
63 | { | 62 | { |
@@ -66,26 +65,31 @@ ftrace_modify_code(unsigned long ip, unsigned char *old_code, | |||
66 | /* | 65 | /* |
67 | * Note: Due to modules and __init, code can | 66 | * Note: Due to modules and __init, code can |
68 | * disappear and change, we need to protect against faulting | 67 | * disappear and change, we need to protect against faulting |
69 | * as well as code changing. | 68 | * as well as code changing. We do this by using the |
69 | * probe_kernel_* functions. | ||
70 | * | 70 | * |
71 | * No real locking needed, this code is run through | 71 | * No real locking needed, this code is run through |
72 | * kstop_machine, or before SMP starts. | 72 | * kstop_machine, or before SMP starts. |
73 | */ | 73 | */ |
74 | if (__copy_from_user_inatomic(replaced, (char __user *)ip, MCOUNT_INSN_SIZE)) | ||
75 | return 1; | ||
76 | 74 | ||
75 | /* read the text we want to modify */ | ||
76 | if (probe_kernel_read(replaced, (void *)ip, MCOUNT_INSN_SIZE)) | ||
77 | return -EFAULT; | ||
78 | |||
79 | /* Make sure it is what we expect it to be */ | ||
77 | if (memcmp(replaced, old_code, MCOUNT_INSN_SIZE) != 0) | 80 | if (memcmp(replaced, old_code, MCOUNT_INSN_SIZE) != 0) |
78 | return 2; | 81 | return -EINVAL; |
79 | 82 | ||
80 | WARN_ON_ONCE(__copy_to_user_inatomic((char __user *)ip, new_code, | 83 | /* replace the text with the new text */ |
81 | MCOUNT_INSN_SIZE)); | 84 | if (probe_kernel_write((void *)ip, new_code, MCOUNT_INSN_SIZE)) |
85 | return -EPERM; | ||
82 | 86 | ||
83 | sync_core(); | 87 | sync_core(); |
84 | 88 | ||
85 | return 0; | 89 | return 0; |
86 | } | 90 | } |
87 | 91 | ||
88 | notrace int ftrace_update_ftrace_func(ftrace_func_t func) | 92 | int ftrace_update_ftrace_func(ftrace_func_t func) |
89 | { | 93 | { |
90 | unsigned long ip = (unsigned long)(&ftrace_call); | 94 | unsigned long ip = (unsigned long)(&ftrace_call); |
91 | unsigned char old[MCOUNT_INSN_SIZE], *new; | 95 | unsigned char old[MCOUNT_INSN_SIZE], *new; |
@@ -98,13 +102,6 @@ notrace int ftrace_update_ftrace_func(ftrace_func_t func) | |||
98 | return ret; | 102 | return ret; |
99 | } | 103 | } |
100 | 104 | ||
101 | notrace int ftrace_mcount_set(unsigned long *data) | ||
102 | { | ||
103 | /* mcount is initialized as a nop */ | ||
104 | *data = 0; | ||
105 | return 0; | ||
106 | } | ||
107 | |||
108 | int __init ftrace_dyn_arch_init(void *data) | 105 | int __init ftrace_dyn_arch_init(void *data) |
109 | { | 106 | { |
110 | extern const unsigned char ftrace_test_p6nop[]; | 107 | extern const unsigned char ftrace_test_p6nop[]; |
@@ -127,9 +124,6 @@ int __init ftrace_dyn_arch_init(void *data) | |||
127 | * TODO: check the cpuid to determine the best nop. | 124 | * TODO: check the cpuid to determine the best nop. |
128 | */ | 125 | */ |
129 | asm volatile ( | 126 | asm volatile ( |
130 | "jmp ftrace_test_jmp\n" | ||
131 | /* This code needs to stay around */ | ||
132 | ".section .text, \"ax\"\n" | ||
133 | "ftrace_test_jmp:" | 127 | "ftrace_test_jmp:" |
134 | "jmp ftrace_test_p6nop\n" | 128 | "jmp ftrace_test_p6nop\n" |
135 | "nop\n" | 129 | "nop\n" |
@@ -140,8 +134,6 @@ int __init ftrace_dyn_arch_init(void *data) | |||
140 | "jmp 1f\n" | 134 | "jmp 1f\n" |
141 | "ftrace_test_nop5:" | 135 | "ftrace_test_nop5:" |
142 | ".byte 0x66,0x66,0x66,0x66,0x90\n" | 136 | ".byte 0x66,0x66,0x66,0x66,0x90\n" |
143 | "jmp 1f\n" | ||
144 | ".previous\n" | ||
145 | "1:" | 137 | "1:" |
146 | ".section .fixup, \"ax\"\n" | 138 | ".section .fixup, \"ax\"\n" |
147 | "2: movl $1, %0\n" | 139 | "2: movl $1, %0\n" |
@@ -156,15 +148,15 @@ int __init ftrace_dyn_arch_init(void *data) | |||
156 | switch (faulted) { | 148 | switch (faulted) { |
157 | case 0: | 149 | case 0: |
158 | pr_info("ftrace: converting mcount calls to 0f 1f 44 00 00\n"); | 150 | pr_info("ftrace: converting mcount calls to 0f 1f 44 00 00\n"); |
159 | ftrace_nop = (unsigned long *)ftrace_test_p6nop; | 151 | memcpy(ftrace_nop, ftrace_test_p6nop, MCOUNT_INSN_SIZE); |
160 | break; | 152 | break; |
161 | case 1: | 153 | case 1: |
162 | pr_info("ftrace: converting mcount calls to 66 66 66 66 90\n"); | 154 | pr_info("ftrace: converting mcount calls to 66 66 66 66 90\n"); |
163 | ftrace_nop = (unsigned long *)ftrace_test_nop5; | 155 | memcpy(ftrace_nop, ftrace_test_nop5, MCOUNT_INSN_SIZE); |
164 | break; | 156 | break; |
165 | case 2: | 157 | case 2: |
166 | pr_info("ftrace: converting mcount calls to jmp . + 5\n"); | 158 | pr_info("ftrace: converting mcount calls to jmp . + 5\n"); |
167 | ftrace_nop = (unsigned long *)ftrace_test_jmp; | 159 | memcpy(ftrace_nop, ftrace_test_jmp, MCOUNT_INSN_SIZE); |
168 | break; | 160 | break; |
169 | } | 161 | } |
170 | 162 | ||
diff --git a/arch/x86/kernel/genx2apic_uv_x.c b/arch/x86/kernel/genx2apic_uv_x.c index 680a06557c5e..2c7dbdb98278 100644 --- a/arch/x86/kernel/genx2apic_uv_x.c +++ b/arch/x86/kernel/genx2apic_uv_x.c | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <linux/ctype.h> | 15 | #include <linux/ctype.h> |
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/sched.h> | 17 | #include <linux/sched.h> |
18 | #include <linux/bootmem.h> | ||
19 | #include <linux/module.h> | 18 | #include <linux/module.h> |
20 | #include <linux/hardirq.h> | 19 | #include <linux/hardirq.h> |
21 | #include <asm/smp.h> | 20 | #include <asm/smp.h> |
@@ -398,16 +397,16 @@ void __init uv_system_init(void) | |||
398 | printk(KERN_DEBUG "UV: Found %d blades\n", uv_num_possible_blades()); | 397 | printk(KERN_DEBUG "UV: Found %d blades\n", uv_num_possible_blades()); |
399 | 398 | ||
400 | bytes = sizeof(struct uv_blade_info) * uv_num_possible_blades(); | 399 | bytes = sizeof(struct uv_blade_info) * uv_num_possible_blades(); |
401 | uv_blade_info = alloc_bootmem_pages(bytes); | 400 | uv_blade_info = kmalloc(bytes, GFP_KERNEL); |
402 | 401 | ||
403 | get_lowmem_redirect(&lowmem_redir_base, &lowmem_redir_size); | 402 | get_lowmem_redirect(&lowmem_redir_base, &lowmem_redir_size); |
404 | 403 | ||
405 | bytes = sizeof(uv_node_to_blade[0]) * num_possible_nodes(); | 404 | bytes = sizeof(uv_node_to_blade[0]) * num_possible_nodes(); |
406 | uv_node_to_blade = alloc_bootmem_pages(bytes); | 405 | uv_node_to_blade = kmalloc(bytes, GFP_KERNEL); |
407 | memset(uv_node_to_blade, 255, bytes); | 406 | memset(uv_node_to_blade, 255, bytes); |
408 | 407 | ||
409 | bytes = sizeof(uv_cpu_to_blade[0]) * num_possible_cpus(); | 408 | bytes = sizeof(uv_cpu_to_blade[0]) * num_possible_cpus(); |
410 | uv_cpu_to_blade = alloc_bootmem_pages(bytes); | 409 | uv_cpu_to_blade = kmalloc(bytes, GFP_KERNEL); |
411 | memset(uv_cpu_to_blade, 255, bytes); | 410 | memset(uv_cpu_to_blade, 255, bytes); |
412 | 411 | ||
413 | blade = 0; | 412 | blade = 0; |
diff --git a/arch/x86/kernel/i386_ksyms_32.c b/arch/x86/kernel/i386_ksyms_32.c index dd7ebee446af..43cec6bdda63 100644 --- a/arch/x86/kernel/i386_ksyms_32.c +++ b/arch/x86/kernel/i386_ksyms_32.c | |||
@@ -5,7 +5,7 @@ | |||
5 | #include <asm/desc.h> | 5 | #include <asm/desc.h> |
6 | #include <asm/ftrace.h> | 6 | #include <asm/ftrace.h> |
7 | 7 | ||
8 | #ifdef CONFIG_FTRACE | 8 | #ifdef CONFIG_FUNCTION_TRACER |
9 | /* mcount is defined in assembly */ | 9 | /* mcount is defined in assembly */ |
10 | EXPORT_SYMBOL(mcount); | 10 | EXPORT_SYMBOL(mcount); |
11 | #endif | 11 | #endif |
diff --git a/arch/x86/kernel/k8.c b/arch/x86/kernel/k8.c index 304d8bad6559..cbc4332a77b2 100644 --- a/arch/x86/kernel/k8.c +++ b/arch/x86/kernel/k8.c | |||
@@ -18,7 +18,6 @@ static u32 *flush_words; | |||
18 | struct pci_device_id k8_nb_ids[] = { | 18 | struct pci_device_id k8_nb_ids[] = { |
19 | { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_K8_NB_MISC) }, | 19 | { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_K8_NB_MISC) }, |
20 | { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_10H_NB_MISC) }, | 20 | { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_10H_NB_MISC) }, |
21 | { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_11H_NB_MISC) }, | ||
22 | {} | 21 | {} |
23 | }; | 22 | }; |
24 | EXPORT_SYMBOL(k8_nb_ids); | 23 | EXPORT_SYMBOL(k8_nb_ids); |
diff --git a/arch/x86/kernel/machine_kexec_32.c b/arch/x86/kernel/machine_kexec_32.c index 0732adba05ca..7a385746509a 100644 --- a/arch/x86/kernel/machine_kexec_32.c +++ b/arch/x86/kernel/machine_kexec_32.c | |||
@@ -162,7 +162,10 @@ void machine_kexec(struct kimage *image) | |||
162 | page_list[VA_PTE_0] = (unsigned long)kexec_pte0; | 162 | page_list[VA_PTE_0] = (unsigned long)kexec_pte0; |
163 | page_list[PA_PTE_1] = __pa(kexec_pte1); | 163 | page_list[PA_PTE_1] = __pa(kexec_pte1); |
164 | page_list[VA_PTE_1] = (unsigned long)kexec_pte1; | 164 | page_list[VA_PTE_1] = (unsigned long)kexec_pte1; |
165 | page_list[PA_SWAP_PAGE] = (page_to_pfn(image->swap_page) << PAGE_SHIFT); | 165 | |
166 | if (image->type == KEXEC_TYPE_DEFAULT) | ||
167 | page_list[PA_SWAP_PAGE] = (page_to_pfn(image->swap_page) | ||
168 | << PAGE_SHIFT); | ||
166 | 169 | ||
167 | /* The segment registers are funny things, they have both a | 170 | /* The segment registers are funny things, they have both a |
168 | * visible and an invisible part. Whenever the visible part is | 171 | * visible and an invisible part. Whenever the visible part is |
diff --git a/arch/x86/kernel/microcode_amd.c b/arch/x86/kernel/microcode_amd.c index 7a1f8eeac2c7..5f8e5d75a254 100644 --- a/arch/x86/kernel/microcode_amd.c +++ b/arch/x86/kernel/microcode_amd.c | |||
@@ -39,7 +39,7 @@ | |||
39 | #include <asm/microcode.h> | 39 | #include <asm/microcode.h> |
40 | 40 | ||
41 | MODULE_DESCRIPTION("AMD Microcode Update Driver"); | 41 | MODULE_DESCRIPTION("AMD Microcode Update Driver"); |
42 | MODULE_AUTHOR("Peter Oruba <peter.oruba@amd.com>"); | 42 | MODULE_AUTHOR("Peter Oruba"); |
43 | MODULE_LICENSE("GPL v2"); | 43 | MODULE_LICENSE("GPL v2"); |
44 | 44 | ||
45 | #define UCODE_MAGIC 0x00414d44 | 45 | #define UCODE_MAGIC 0x00414d44 |
diff --git a/arch/x86/kernel/microcode_core.c b/arch/x86/kernel/microcode_core.c index 936d8d55f230..82fb2809ce32 100644 --- a/arch/x86/kernel/microcode_core.c +++ b/arch/x86/kernel/microcode_core.c | |||
@@ -480,8 +480,8 @@ static int __init microcode_init(void) | |||
480 | 480 | ||
481 | printk(KERN_INFO | 481 | printk(KERN_INFO |
482 | "Microcode Update Driver: v" MICROCODE_VERSION | 482 | "Microcode Update Driver: v" MICROCODE_VERSION |
483 | " <tigran@aivazian.fsnet.co.uk>" | 483 | " <tigran@aivazian.fsnet.co.uk>," |
484 | " <peter.oruba@amd.com>\n"); | 484 | " Peter Oruba\n"); |
485 | 485 | ||
486 | return 0; | 486 | return 0; |
487 | } | 487 | } |
diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c index 1972266e8ba5..192624820217 100644 --- a/arch/x86/kernel/pci-dma.c +++ b/arch/x86/kernel/pci-dma.c | |||
@@ -9,6 +9,8 @@ | |||
9 | #include <asm/calgary.h> | 9 | #include <asm/calgary.h> |
10 | #include <asm/amd_iommu.h> | 10 | #include <asm/amd_iommu.h> |
11 | 11 | ||
12 | static int forbid_dac __read_mostly; | ||
13 | |||
12 | struct dma_mapping_ops *dma_ops; | 14 | struct dma_mapping_ops *dma_ops; |
13 | EXPORT_SYMBOL(dma_ops); | 15 | EXPORT_SYMBOL(dma_ops); |
14 | 16 | ||
@@ -291,3 +293,17 @@ void pci_iommu_shutdown(void) | |||
291 | } | 293 | } |
292 | /* Must execute after PCI subsystem */ | 294 | /* Must execute after PCI subsystem */ |
293 | fs_initcall(pci_iommu_init); | 295 | fs_initcall(pci_iommu_init); |
296 | |||
297 | #ifdef CONFIG_PCI | ||
298 | /* Many VIA bridges seem to corrupt data for DAC. Disable it here */ | ||
299 | |||
300 | static __devinit void via_no_dac(struct pci_dev *dev) | ||
301 | { | ||
302 | if ((dev->class >> 8) == PCI_CLASS_BRIDGE_PCI && forbid_dac == 0) { | ||
303 | printk(KERN_INFO "PCI: VIA PCI bridge detected." | ||
304 | "Disabling DAC.\n"); | ||
305 | forbid_dac = 1; | ||
306 | } | ||
307 | } | ||
308 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_ANY_ID, via_no_dac); | ||
309 | #endif | ||
diff --git a/arch/x86/kernel/pci-gart_64.c b/arch/x86/kernel/pci-gart_64.c index e3f75bbcedea..a42b02b4df68 100644 --- a/arch/x86/kernel/pci-gart_64.c +++ b/arch/x86/kernel/pci-gart_64.c | |||
@@ -744,7 +744,7 @@ void __init gart_iommu_init(void) | |||
744 | long i; | 744 | long i; |
745 | 745 | ||
746 | if (cache_k8_northbridges() < 0 || num_k8_northbridges == 0) { | 746 | if (cache_k8_northbridges() < 0 || num_k8_northbridges == 0) { |
747 | printk(KERN_INFO "PCI-GART: No AMD northbridge found.\n"); | 747 | printk(KERN_INFO "PCI-GART: No AMD GART found.\n"); |
748 | return; | 748 | return; |
749 | } | 749 | } |
750 | 750 | ||
diff --git a/arch/x86/kernel/pci-swiotlb_64.c b/arch/x86/kernel/pci-swiotlb_64.c index c4ce0332759e..3c539d111abb 100644 --- a/arch/x86/kernel/pci-swiotlb_64.c +++ b/arch/x86/kernel/pci-swiotlb_64.c | |||
@@ -18,9 +18,21 @@ swiotlb_map_single_phys(struct device *hwdev, phys_addr_t paddr, size_t size, | |||
18 | return swiotlb_map_single(hwdev, phys_to_virt(paddr), size, direction); | 18 | return swiotlb_map_single(hwdev, phys_to_virt(paddr), size, direction); |
19 | } | 19 | } |
20 | 20 | ||
21 | static void *x86_swiotlb_alloc_coherent(struct device *hwdev, size_t size, | ||
22 | dma_addr_t *dma_handle, gfp_t flags) | ||
23 | { | ||
24 | void *vaddr; | ||
25 | |||
26 | vaddr = dma_generic_alloc_coherent(hwdev, size, dma_handle, flags); | ||
27 | if (vaddr) | ||
28 | return vaddr; | ||
29 | |||
30 | return swiotlb_alloc_coherent(hwdev, size, dma_handle, flags); | ||
31 | } | ||
32 | |||
21 | struct dma_mapping_ops swiotlb_dma_ops = { | 33 | struct dma_mapping_ops swiotlb_dma_ops = { |
22 | .mapping_error = swiotlb_dma_mapping_error, | 34 | .mapping_error = swiotlb_dma_mapping_error, |
23 | .alloc_coherent = swiotlb_alloc_coherent, | 35 | .alloc_coherent = x86_swiotlb_alloc_coherent, |
24 | .free_coherent = swiotlb_free_coherent, | 36 | .free_coherent = swiotlb_free_coherent, |
25 | .map_single = swiotlb_map_single_phys, | 37 | .map_single = swiotlb_map_single_phys, |
26 | .unmap_single = swiotlb_unmap_single, | 38 | .unmap_single = swiotlb_unmap_single, |
diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c index 161bb850fc47..62348e4fd8d1 100644 --- a/arch/x86/kernel/tsc.c +++ b/arch/x86/kernel/tsc.c | |||
@@ -759,7 +759,7 @@ __cpuinit int unsynchronized_tsc(void) | |||
759 | if (!cpu_has_tsc || tsc_unstable) | 759 | if (!cpu_has_tsc || tsc_unstable) |
760 | return 1; | 760 | return 1; |
761 | 761 | ||
762 | #ifdef CONFIG_SMP | 762 | #ifdef CONFIG_X86_SMP |
763 | if (apic_is_clustered_box()) | 763 | if (apic_is_clustered_box()) |
764 | return 1; | 764 | return 1; |
765 | #endif | 765 | #endif |
diff --git a/arch/x86/kernel/vsmp_64.c b/arch/x86/kernel/vsmp_64.c index 7766d36983fc..a688f3bfaec2 100644 --- a/arch/x86/kernel/vsmp_64.c +++ b/arch/x86/kernel/vsmp_64.c | |||
@@ -78,7 +78,7 @@ static unsigned __init_or_module vsmp_patch(u8 type, u16 clobbers, void *ibuf, | |||
78 | 78 | ||
79 | static void __init set_vsmp_pv_ops(void) | 79 | static void __init set_vsmp_pv_ops(void) |
80 | { | 80 | { |
81 | void *address; | 81 | void __iomem *address; |
82 | unsigned int cap, ctl, cfg; | 82 | unsigned int cap, ctl, cfg; |
83 | 83 | ||
84 | /* set vSMP magic bits to indicate vSMP capable kernel */ | 84 | /* set vSMP magic bits to indicate vSMP capable kernel */ |
diff --git a/arch/x86/kernel/x8664_ksyms_64.c b/arch/x86/kernel/x8664_ksyms_64.c index b545f371b5f5..695e426aa354 100644 --- a/arch/x86/kernel/x8664_ksyms_64.c +++ b/arch/x86/kernel/x8664_ksyms_64.c | |||
@@ -12,7 +12,7 @@ | |||
12 | #include <asm/desc.h> | 12 | #include <asm/desc.h> |
13 | #include <asm/ftrace.h> | 13 | #include <asm/ftrace.h> |
14 | 14 | ||
15 | #ifdef CONFIG_FTRACE | 15 | #ifdef CONFIG_FUNCTION_TRACER |
16 | /* mcount is defined in assembly */ | 16 | /* mcount is defined in assembly */ |
17 | EXPORT_SYMBOL(mcount); | 17 | EXPORT_SYMBOL(mcount); |
18 | #endif | 18 | #endif |