[patch 09/11] [PATCH 09/11] x86: First step of refactoring, introducing microcode_ops.

From: Peter Oruba
Date: Mon Jul 28 2008 - 12:49:50 EST


Refactoring with the goal of having one general module and separate
vendor specific modules that hook into the general one.

Microcode_ops is a function pointer structure in which vendor
specific modules will enter all functions that differ between
vendors and that need to be accessed from the general module.

Signed-off-by: Peter Oruba <peter.oruba@xxxxxxx>
---
include/asm-x86/microcode.h | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/include/asm-x86/microcode.h b/include/asm-x86/microcode.h
index 4e94172..9231c87 100644
--- a/include/asm-x86/microcode.h
+++ b/include/asm-x86/microcode.h
@@ -1,3 +1,16 @@
+struct microcode_ops {
+ long (*get_next_ucode)(void **mc, long offset);
+ long (*microcode_get_next_ucode)(void **mc, long offset);
+ int (*get_matching_microcode)(void *mc, int cpu);
+ int (*apply_microcode_check_cpu)(int cpu);
+ int (*microcode_sanity_check)(void *mc);
+ int (*cpu_request_microcode)(int cpu);
+ void (*collect_cpu_info)(int cpu_num);
+ void (*apply_microcode)(int cpu);
+ void (*microcode_fini_cpu)(int cpu);
+ void (*clear_patch)(void *data);
+};
+
struct microcode_header_intel {
unsigned int hdrver;
unsigned int rev;
--
1.5.4.5




--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/