Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 299626
b: refs/heads/master
c: 283c1f2
h: refs/heads/master
v: v3
  • Loading branch information
Andreas Herrmann authored and Borislav Petkov committed Apr 13, 2012
1 parent aaa033b commit cfd2e6c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a956bd6f8583326b18348ab1452b4686778f785d
refs/heads/master: 283c1f2558ef4a4411fe908364b15b73b6ab44cf
12 changes: 7 additions & 5 deletions trunk/arch/x86/kernel/microcode_amd.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,6 @@ static int collect_cpu_info_amd(int cpu, struct cpu_signature *csig)
{
struct cpuinfo_x86 *c = &cpu_data(cpu);

if (c->x86_vendor != X86_VENDOR_AMD || c->x86 < 0x10) {
pr_warning("CPU%d: family %d not supported\n", cpu, c->x86);
return -1;
}

csig->rev = c->microcode;
pr_info("CPU%d: patch_level=0x%08x\n", cpu, csig->rev);

Expand Down Expand Up @@ -380,6 +375,13 @@ static struct microcode_ops microcode_amd_ops = {

struct microcode_ops * __init init_amd_microcode(void)
{
struct cpuinfo_x86 *c = &cpu_data(0);

if (c->x86_vendor != X86_VENDOR_AMD || c->x86 < 0x10) {
pr_warning("AMD CPU family 0x%x not supported\n", c->x86);
return NULL;
}

patch = (void *)get_zeroed_page(GFP_KERNEL);
if (!patch)
return NULL;
Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/x86/kernel/microcode_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -526,11 +526,11 @@ static int __init microcode_init(void)
microcode_ops = init_intel_microcode();
else if (c->x86_vendor == X86_VENDOR_AMD)
microcode_ops = init_amd_microcode();

if (!microcode_ops) {
else
pr_err("no support for this CPU vendor\n");

if (!microcode_ops)
return -ENODEV;
}

microcode_pdev = platform_device_register_simple("microcode", -1,
NULL, 0);
Expand Down

0 comments on commit cfd2e6c

Please sign in to comment.