diff options
| author | Andreas Herrmann <andreas.herrmann3@amd.com> | 2008-12-16 13:21:30 -0500 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2008-12-16 13:58:07 -0500 |
| commit | 5549b94bc74c3e7edd44e0aeb7d9f773e82d2d20 (patch) | |
| tree | 648fbbf246ab89e2e2b6df975dc591dd19da1dbe | |
| parent | 98415301ea2dd389539ab429bcfa9da07219eabc (diff) | |
x86: microcode_amd: use 'packed' attribute for structs
Impact: cleanup
Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
| -rw-r--r-- | arch/x86/kernel/microcode_amd.c | 45 |
1 files changed, 23 insertions, 22 deletions
diff --git a/arch/x86/kernel/microcode_amd.c b/arch/x86/kernel/microcode_amd.c index 2e8af6ef3da9..e1ce650f276b 100644 --- a/arch/x86/kernel/microcode_amd.c +++ b/arch/x86/kernel/microcode_amd.c | |||
| @@ -47,28 +47,29 @@ MODULE_LICENSE("GPL v2"); | |||
| 47 | #define UCODE_UCODE_TYPE 0x00000001 | 47 | #define UCODE_UCODE_TYPE 0x00000001 |
| 48 | 48 | ||
| 49 | struct equiv_cpu_entry { | 49 | struct equiv_cpu_entry { |
| 50 | unsigned int installed_cpu; | 50 | u32 installed_cpu; |
| 51 | unsigned int fixed_errata_mask; | 51 | u32 fixed_errata_mask; |
| 52 | unsigned int fixed_errata_compare; | 52 | u32 fixed_errata_compare; |
| 53 | unsigned int equiv_cpu; | 53 | u16 equiv_cpu; |
| 54 | }; | 54 | u16 res; |
| 55 | } __attribute__((packed)); | ||
| 55 | 56 | ||
| 56 | struct microcode_header_amd { | 57 | struct microcode_header_amd { |
| 57 | unsigned int data_code; | 58 | u32 data_code; |
| 58 | unsigned int patch_id; | 59 | u32 patch_id; |
| 59 | unsigned char mc_patch_data_id[2]; | 60 | u16 mc_patch_data_id; |
| 60 | unsigned char mc_patch_data_len; | 61 | u8 mc_patch_data_len; |
| 61 | unsigned char init_flag; | 62 | u8 init_flag; |
| 62 | unsigned int mc_patch_data_checksum; | 63 | u32 mc_patch_data_checksum; |
| 63 | unsigned int nb_dev_id; | 64 | u32 nb_dev_id; |
| 64 | unsigned int sb_dev_id; | 65 | u32 sb_dev_id; |
| 65 | u16 processor_rev_id; | 66 | u16 processor_rev_id; |
| 66 | unsigned char nb_rev_id; | 67 | u8 nb_rev_id; |
| 67 | unsigned char sb_rev_id; | 68 | u8 sb_rev_id; |
| 68 | unsigned char bios_api_rev; | 69 | u8 bios_api_rev; |
| 69 | unsigned char reserved1[3]; | 70 | u8 reserved1[3]; |
| 70 | unsigned int match_reg[8]; | 71 | u32 match_reg[8]; |
| 71 | }; | 72 | } __attribute__((packed)); |
| 72 | 73 | ||
| 73 | struct microcode_amd { | 74 | struct microcode_amd { |
| 74 | struct microcode_header_amd hdr; | 75 | struct microcode_header_amd hdr; |
| @@ -109,7 +110,7 @@ static int get_matching_microcode(int cpu, void *mc, int rev) | |||
| 109 | { | 110 | { |
| 110 | struct microcode_header_amd *mc_header = mc; | 111 | struct microcode_header_amd *mc_header = mc; |
| 111 | unsigned int current_cpu_id; | 112 | unsigned int current_cpu_id; |
| 112 | unsigned int equiv_cpu_id = 0x00; | 113 | u16 equiv_cpu_id = 0; |
| 113 | unsigned int i = 0; | 114 | unsigned int i = 0; |
| 114 | 115 | ||
| 115 | BUG_ON(equiv_cpu_table == NULL); | 116 | BUG_ON(equiv_cpu_table == NULL); |
| @@ -117,7 +118,7 @@ static int get_matching_microcode(int cpu, void *mc, int rev) | |||
| 117 | 118 | ||
| 118 | while (equiv_cpu_table[i].installed_cpu != 0) { | 119 | while (equiv_cpu_table[i].installed_cpu != 0) { |
| 119 | if (current_cpu_id == equiv_cpu_table[i].installed_cpu) { | 120 | if (current_cpu_id == equiv_cpu_table[i].installed_cpu) { |
| 120 | equiv_cpu_id = equiv_cpu_table[i].equiv_cpu & 0xffff; | 121 | equiv_cpu_id = equiv_cpu_table[i].equiv_cpu; |
| 121 | break; | 122 | break; |
| 122 | } | 123 | } |
| 123 | i++; | 124 | i++; |
