diff options
author | Dmitry Adamushko <dmitry.adamushko@gmail.com> | 2008-08-19 18:22:26 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-08-20 06:18:57 -0400 |
commit | d45de40934897c6ee5b05141f7895bbb28512395 (patch) | |
tree | 1b4c4a011071d188a08d0f5bce8caf6b2b0a93c2 /include/asm-x86/microcode.h | |
parent | 8343ef2437c599d30568e6b5a257a40bf2f4902b (diff) |
x86-microcode: generic interface refactoring
This is the 1st patch in the series. Here the aim was to avoid any
significant changes, logically-wise.
So it's mainly about generic interface refactoring: e.g. make
microcode_{intel,amd}.c more about arch-specific details and less
about policies like make-sure-we-run-on-a-target-cpu
(no more set_cpus_allowed_ptr() here) and generic synchronization (no
more microcode_mutex here).
All in all, more line have been deleted than added.
4 files changed, 145 insertions(+), 198 deletions(-)
Signed-off-by: Dmitry Adamushko <dmitry.adamushko@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/asm-x86/microcode.h')
-rw-r--r-- | include/asm-x86/microcode.h | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/include/asm-x86/microcode.h b/include/asm-x86/microcode.h index 18b2aeec2adf..7ceff48fa657 100644 --- a/include/asm-x86/microcode.h +++ b/include/asm-x86/microcode.h | |||
@@ -1,14 +1,18 @@ | |||
1 | #ifndef ASM_X86__MICROCODE_H | ||
2 | #define ASM_X86__MICROCODE_H | ||
3 | |||
1 | extern int microcode_init(void *opaque, struct module *module); | 4 | extern int microcode_init(void *opaque, struct module *module); |
2 | extern void microcode_exit(void); | 5 | extern void microcode_exit(void); |
3 | 6 | ||
7 | struct cpu_signature; | ||
8 | |||
4 | struct microcode_ops { | 9 | struct microcode_ops { |
5 | long (*get_next_ucode)(void **mc, long offset); | 10 | long (*get_next_ucode)(void **mc, long offset); |
6 | long (*microcode_get_next_ucode)(void **mc, long offset); | 11 | long (*microcode_get_next_ucode)(void **mc, long offset); |
7 | int (*get_matching_microcode)(void *mc, int cpu); | 12 | int (*get_matching_microcode)(void *mc, int cpu); |
8 | int (*apply_microcode_check_cpu)(int cpu); | ||
9 | int (*microcode_sanity_check)(void *mc); | 13 | int (*microcode_sanity_check)(void *mc); |
10 | int (*cpu_request_microcode)(int cpu); | 14 | int (*cpu_request_microcode)(int cpu); |
11 | void (*collect_cpu_info)(int cpu_num); | 15 | int (*collect_cpu_info)(int cpu_num, struct cpu_signature *csig); |
12 | void (*apply_microcode)(int cpu); | 16 | void (*apply_microcode)(int cpu); |
13 | void (*microcode_fini_cpu)(int cpu); | 17 | void (*microcode_fini_cpu)(int cpu); |
14 | void (*clear_patch)(void *data); | 18 | void (*clear_patch)(void *data); |
@@ -75,13 +79,21 @@ struct microcode_amd { | |||
75 | unsigned int mpb[0]; | 79 | unsigned int mpb[0]; |
76 | }; | 80 | }; |
77 | 81 | ||
78 | struct ucode_cpu_info { | 82 | struct cpu_signature { |
79 | int valid; | ||
80 | unsigned int sig; | 83 | unsigned int sig; |
81 | unsigned int pf; | 84 | unsigned int pf; |
82 | unsigned int rev; | 85 | unsigned int rev; |
86 | }; | ||
87 | |||
88 | struct ucode_cpu_info { | ||
89 | struct cpu_signature cpu_sig; | ||
90 | int valid; | ||
83 | union { | 91 | union { |
84 | struct microcode_intel *mc_intel; | 92 | struct microcode_intel *mc_intel; |
85 | struct microcode_amd *mc_amd; | 93 | struct microcode_amd *mc_amd; |
94 | void *valid_mc; | ||
86 | } mc; | 95 | } mc; |
87 | }; | 96 | }; |
97 | extern struct ucode_cpu_info ucode_cpu_info[]; | ||
98 | |||
99 | #endif /* ASM_X86__MICROCODE_H */ | ||