diff options
author | Andreas Herrmann <herrmann.der.user@googlemail.com> | 2009-11-10 06:09:20 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-11-10 06:15:50 -0500 |
commit | 1a74357066369be91e6f4f431621a00b052df964 (patch) | |
tree | 8cd50933e3d55e1c523726daa8e8e339d7f8e31e | |
parent | 14c569425a0ae12cbeed72fdb8ebe78c48455dfd (diff) |
x86: ucode-amd: Convert printk(KERN_*...) to pr_*(...)
Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Cc: dimm <dmitry.adamushko@gmail.com>
LKML-Reference: <20091110110920.GJ30802@alberich.amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | arch/x86/kernel/microcode_amd.c | 34 |
1 files changed, 15 insertions, 19 deletions
diff --git a/arch/x86/kernel/microcode_amd.c b/arch/x86/kernel/microcode_amd.c index 9f13324054ce..26e33bd8485b 100644 --- a/arch/x86/kernel/microcode_amd.c +++ b/arch/x86/kernel/microcode_amd.c | |||
@@ -78,12 +78,12 @@ static int collect_cpu_info_amd(int cpu, struct cpu_signature *csig) | |||
78 | 78 | ||
79 | memset(csig, 0, sizeof(*csig)); | 79 | memset(csig, 0, sizeof(*csig)); |
80 | if (c->x86_vendor != X86_VENDOR_AMD || c->x86 < 0x10) { | 80 | if (c->x86_vendor != X86_VENDOR_AMD || c->x86 < 0x10) { |
81 | printk(KERN_WARNING "microcode: CPU%d: AMD CPU family 0x%x not " | 81 | pr_warning("microcode: CPU%d: AMD CPU family 0x%x not " |
82 | "supported\n", cpu, c->x86); | 82 | "supported\n", cpu, c->x86); |
83 | return -1; | 83 | return -1; |
84 | } | 84 | } |
85 | rdmsr(MSR_AMD64_PATCH_LEVEL, csig->rev, dummy); | 85 | rdmsr(MSR_AMD64_PATCH_LEVEL, csig->rev, dummy); |
86 | printk(KERN_INFO "microcode: CPU%d: patch_level=0x%x\n", cpu, csig->rev); | 86 | pr_info("microcode: CPU%d: patch_level=0x%x\n", cpu, csig->rev); |
87 | return 0; | 87 | return 0; |
88 | } | 88 | } |
89 | 89 | ||
@@ -113,7 +113,7 @@ static int get_matching_microcode(int cpu, void *mc, int rev) | |||
113 | 113 | ||
114 | /* ucode might be chipset specific -- currently we don't support this */ | 114 | /* ucode might be chipset specific -- currently we don't support this */ |
115 | if (mc_header->nb_dev_id || mc_header->sb_dev_id) { | 115 | if (mc_header->nb_dev_id || mc_header->sb_dev_id) { |
116 | printk(KERN_ERR "microcode: CPU%d: loading of chipset " | 116 | pr_err(KERN_ERR "microcode: CPU%d: loading of chipset " |
117 | "specific code not yet supported\n", cpu); | 117 | "specific code not yet supported\n", cpu); |
118 | return 0; | 118 | return 0; |
119 | } | 119 | } |
@@ -143,14 +143,12 @@ static int apply_microcode_amd(int cpu) | |||
143 | 143 | ||
144 | /* check current patch id and patch's id for match */ | 144 | /* check current patch id and patch's id for match */ |
145 | if (rev != mc_amd->hdr.patch_id) { | 145 | if (rev != mc_amd->hdr.patch_id) { |
146 | printk(KERN_ERR "microcode: CPU%d: update failed " | 146 | pr_err("microcode: CPU%d: update failed " |
147 | "(for patch_level=0x%x)\n", cpu, mc_amd->hdr.patch_id); | 147 | "(for patch_level=0x%x)\n", cpu, mc_amd->hdr.patch_id); |
148 | return -1; | 148 | return -1; |
149 | } | 149 | } |
150 | 150 | ||
151 | printk(KERN_INFO "microcode: CPU%d: updated (new patch_level=0x%x)\n", | 151 | pr_info("microcode: CPU%d: updated (new patch_level=0x%x)\n", cpu, rev); |
152 | cpu, rev); | ||
153 | |||
154 | uci->cpu_sig.rev = rev; | 152 | uci->cpu_sig.rev = rev; |
155 | 153 | ||
156 | return 0; | 154 | return 0; |
@@ -173,7 +171,7 @@ get_next_ucode(const u8 *buf, unsigned int size, unsigned int *mc_size) | |||
173 | return NULL; | 171 | return NULL; |
174 | 172 | ||
175 | if (section_hdr[0] != UCODE_UCODE_TYPE) { | 173 | if (section_hdr[0] != UCODE_UCODE_TYPE) { |
176 | printk(KERN_ERR "microcode: error: invalid type field in " | 174 | pr_err("microcode: error: invalid type field in " |
177 | "container file section header\n"); | 175 | "container file section header\n"); |
178 | return NULL; | 176 | return NULL; |
179 | } | 177 | } |
@@ -181,7 +179,7 @@ get_next_ucode(const u8 *buf, unsigned int size, unsigned int *mc_size) | |||
181 | total_size = (unsigned long) (section_hdr[4] + (section_hdr[5] << 8)); | 179 | total_size = (unsigned long) (section_hdr[4] + (section_hdr[5] << 8)); |
182 | 180 | ||
183 | if (total_size > size || total_size > UCODE_MAX_SIZE) { | 181 | if (total_size > size || total_size > UCODE_MAX_SIZE) { |
184 | printk(KERN_ERR "microcode: error: size mismatch\n"); | 182 | pr_err("microcode: error: size mismatch\n"); |
185 | return NULL; | 183 | return NULL; |
186 | } | 184 | } |
187 | 185 | ||
@@ -210,15 +208,14 @@ static int install_equiv_cpu_table(const u8 *buf) | |||
210 | size = buf_pos[2]; | 208 | size = buf_pos[2]; |
211 | 209 | ||
212 | if (buf_pos[1] != UCODE_EQUIV_CPU_TABLE_TYPE || !size) { | 210 | if (buf_pos[1] != UCODE_EQUIV_CPU_TABLE_TYPE || !size) { |
213 | printk(KERN_ERR "microcode: error: invalid type field in " | 211 | pr_err("microcode: error: invalid type field in " |
214 | "container file section header\n"); | 212 | "container file section header\n"); |
215 | return 0; | 213 | return 0; |
216 | } | 214 | } |
217 | 215 | ||
218 | equiv_cpu_table = (struct equiv_cpu_entry *) vmalloc(size); | 216 | equiv_cpu_table = (struct equiv_cpu_entry *) vmalloc(size); |
219 | if (!equiv_cpu_table) { | 217 | if (!equiv_cpu_table) { |
220 | printk(KERN_ERR "microcode: failed to allocate " | 218 | pr_err("microcode: failed to allocate equivalent CPU table\n"); |
221 | "equivalent CPU table\n"); | ||
222 | return 0; | 219 | return 0; |
223 | } | 220 | } |
224 | 221 | ||
@@ -251,8 +248,7 @@ generic_load_microcode(int cpu, const u8 *data, size_t size) | |||
251 | 248 | ||
252 | offset = install_equiv_cpu_table(ucode_ptr); | 249 | offset = install_equiv_cpu_table(ucode_ptr); |
253 | if (!offset) { | 250 | if (!offset) { |
254 | printk(KERN_ERR "microcode: failed to create " | 251 | pr_err("microcode: failed to create equivalent cpu table\n"); |
255 | "equivalent cpu table\n"); | ||
256 | return UCODE_ERROR; | 252 | return UCODE_ERROR; |
257 | } | 253 | } |
258 | 254 | ||
@@ -306,7 +302,7 @@ static enum ucode_state request_microcode_fw(int cpu, struct device *device) | |||
306 | return UCODE_NFOUND; | 302 | return UCODE_NFOUND; |
307 | 303 | ||
308 | if (*(u32 *)firmware->data != UCODE_MAGIC) { | 304 | if (*(u32 *)firmware->data != UCODE_MAGIC) { |
309 | printk(KERN_ERR "microcode: invalid UCODE_MAGIC (0x%08x)\n", | 305 | pr_err("microcode: invalid UCODE_MAGIC (0x%08x)\n", |
310 | *(u32 *)firmware->data); | 306 | *(u32 *)firmware->data); |
311 | return UCODE_ERROR; | 307 | return UCODE_ERROR; |
312 | } | 308 | } |
@@ -319,8 +315,8 @@ static enum ucode_state request_microcode_fw(int cpu, struct device *device) | |||
319 | static enum ucode_state | 315 | static enum ucode_state |
320 | request_microcode_user(int cpu, const void __user *buf, size_t size) | 316 | request_microcode_user(int cpu, const void __user *buf, size_t size) |
321 | { | 317 | { |
322 | printk(KERN_INFO "microcode: AMD microcode update via " | 318 | pr_info("microcode: AMD microcode update via " |
323 | "/dev/cpu/microcode not supported\n"); | 319 | "/dev/cpu/microcode not supported\n"); |
324 | return UCODE_ERROR; | 320 | return UCODE_ERROR; |
325 | } | 321 | } |
326 | 322 | ||
@@ -336,7 +332,7 @@ void init_microcode_amd(struct device *device) | |||
336 | { | 332 | { |
337 | const char *fw_name = "amd-ucode/microcode_amd.bin"; | 333 | const char *fw_name = "amd-ucode/microcode_amd.bin"; |
338 | if (request_firmware(&firmware, fw_name, device)) | 334 | if (request_firmware(&firmware, fw_name, device)) |
339 | printk(KERN_ERR "microcode: failed to load file %s\n", fw_name); | 335 | pr_err("microcode: failed to load file %s\n", fw_name); |
340 | } | 336 | } |
341 | 337 | ||
342 | void fini_microcode_amd(void) | 338 | void fini_microcode_amd(void) |