git.openpandora.org
/
pandora-kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9841530
)
x86: microcode_amd: use 'packed' attribute for structs
author
Andreas Herrmann
<andreas.herrmann3@amd.com>
Tue, 16 Dec 2008 18:21:30 +0000
(19:21 +0100)
committer
Ingo Molnar
<mingo@elte.hu>
Tue, 16 Dec 2008 18:58:07 +0000
(19:58 +0100)
Impact: cleanup
Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/microcode_amd.c
patch
|
blob
|
history
diff --git
a/arch/x86/kernel/microcode_amd.c
b/arch/x86/kernel/microcode_amd.c
index
2e8af6e
..
e1ce650
100644
(file)
--- a/
arch/x86/kernel/microcode_amd.c
+++ b/
arch/x86/kernel/microcode_amd.c
@@
-47,28
+47,29
@@
MODULE_LICENSE("GPL v2");
#define UCODE_UCODE_TYPE 0x00000001
struct equiv_cpu_entry {
#define UCODE_UCODE_TYPE 0x00000001
struct equiv_cpu_entry {
- unsigned int installed_cpu;
- unsigned int fixed_errata_mask;
- unsigned int fixed_errata_compare;
- unsigned int equiv_cpu;
-};
+ u32 installed_cpu;
+ u32 fixed_errata_mask;
+ u32 fixed_errata_compare;
+ u16 equiv_cpu;
+ u16 res;
+} __attribute__((packed));
struct microcode_header_amd {
struct microcode_header_amd {
- u
nsigned int
data_code;
- u
nsigned int
patch_id;
- u
nsigned char mc_patch_data_id[2]
;
- u
nsigned char
mc_patch_data_len;
- u
nsigned char
init_flag;
- u
nsigned int
mc_patch_data_checksum;
- u
nsigned int
nb_dev_id;
- u
nsigned int
sb_dev_id;
- u16 processor_rev_id;
- u
nsigned char
nb_rev_id;
- u
nsigned char
sb_rev_id;
- u
nsigned char
bios_api_rev;
- u
nsigned char
reserved1[3];
- u
nsigned int
match_reg[8];
-};
+ u
32
data_code;
+ u
32
patch_id;
+ u
16 mc_patch_data_id
;
+ u
8
mc_patch_data_len;
+ u
8
init_flag;
+ u
32
mc_patch_data_checksum;
+ u
32
nb_dev_id;
+ u
32
sb_dev_id;
+ u16
processor_rev_id;
+ u
8
nb_rev_id;
+ u
8
sb_rev_id;
+ u
8
bios_api_rev;
+ u
8
reserved1[3];
+ u
32
match_reg[8];
+}
__attribute__((packed))
;
struct microcode_amd {
struct microcode_header_amd hdr;
struct microcode_amd {
struct microcode_header_amd hdr;
@@
-109,7
+110,7
@@
static int get_matching_microcode(int cpu, void *mc, int rev)
{
struct microcode_header_amd *mc_header = mc;
unsigned int current_cpu_id;
{
struct microcode_header_amd *mc_header = mc;
unsigned int current_cpu_id;
- u
nsigned int equiv_cpu_id = 0x0
0;
+ u
16 equiv_cpu_id =
0;
unsigned int i = 0;
BUG_ON(equiv_cpu_table == NULL);
unsigned int i = 0;
BUG_ON(equiv_cpu_table == NULL);
@@
-117,7
+118,7
@@
static int get_matching_microcode(int cpu, void *mc, int rev)
while (equiv_cpu_table[i].installed_cpu != 0) {
if (current_cpu_id == equiv_cpu_table[i].installed_cpu) {
while (equiv_cpu_table[i].installed_cpu != 0) {
if (current_cpu_id == equiv_cpu_table[i].installed_cpu) {
- equiv_cpu_id = equiv_cpu_table[i].equiv_cpu
& 0xffff
;
+ equiv_cpu_id = equiv_cpu_table[i].equiv_cpu;
break;
}
i++;
break;
}
i++;