]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
x86: first step of refactoring, introducing microcode_ops
authorPeter Oruba <peter.oruba@amd.com>
Mon, 28 Jul 2008 16:44:20 +0000 (18:44 +0200)
committerIngo Molnar <mingo@elte.hu>
Mon, 28 Jul 2008 17:57:57 +0000 (19:57 +0200)
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@amd.com>
Cc: Tigran Aivazian <tigran@aivazian.fsnet.co.uk>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
include/asm-x86/microcode.h

index 4e941721c0d1afccdc80e3c21d811666233b7ec0..9231c876e374e503b51bef240345c521304ccdb6 100644 (file)
@@ -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;