From a51fee215dd0070b6d71a0264738c64e47f66bb3 Mon Sep 17 00:00:00 2001 From: Borislav Petkov Date: Fri, 2 Dec 2011 17:16:55 +0100 Subject: [PATCH] --- yaml --- r: 277481 b: refs/heads/master c: 96b0ee4588036b6fa7cf38c17a9e40531241e895 h: refs/heads/master i: 277479: a02bad0bb5ebdbea65d2aa4ad225c2a4f40806b9 v: v3 --- [refs] | 2 +- trunk/arch/x86/kernel/microcode_amd.c | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index fac54d275ef9..285b3ca14db2 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f72c1a576565a4927d650218e183ab5053ab8c3a +refs/heads/master: 96b0ee4588036b6fa7cf38c17a9e40531241e895 diff --git a/trunk/arch/x86/kernel/microcode_amd.c b/trunk/arch/x86/kernel/microcode_amd.c index e8a68c2a4364..9129c6981c5b 100644 --- a/trunk/arch/x86/kernel/microcode_amd.c +++ b/trunk/arch/x86/kernel/microcode_amd.c @@ -71,6 +71,9 @@ struct microcode_amd { static struct equiv_cpu_entry *equiv_cpu_table; +/* page-sized ucode patch buffer */ +void *patch; + static int collect_cpu_info_amd(int cpu, struct cpu_signature *csig) { struct cpuinfo_x86 *c = &cpu_data(cpu); @@ -351,9 +354,14 @@ static struct microcode_ops microcode_amd_ops = { struct microcode_ops * __init init_amd_microcode(void) { + patch = (void *)get_zeroed_page(GFP_KERNEL); + if (!patch) + return NULL; + return µcode_amd_ops; } void __exit exit_amd_microcode(void) { + free_page((unsigned long)patch); }