Commit 7b179b8f authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Ingo Molnar

x86/microcode: Correct CPU family related variable types

Change the type of variables and function prototypes to be in
alignment with what the x86_*() / __x86_*() family/model
functions return.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1433436928-31903-21-git-send-email-bp@alien8.deSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent ee38a907
...@@ -65,12 +65,12 @@ extern enum ucode_state load_microcode_amd(int cpu, u8 family, const u8 *data, s ...@@ -65,12 +65,12 @@ extern enum ucode_state load_microcode_amd(int cpu, u8 family, const u8 *data, s
extern u8 amd_ucode_patch[PATCH_MAX_SIZE]; extern u8 amd_ucode_patch[PATCH_MAX_SIZE];
#ifdef CONFIG_MICROCODE_AMD_EARLY #ifdef CONFIG_MICROCODE_AMD_EARLY
extern void __init load_ucode_amd_bsp(int family); extern void __init load_ucode_amd_bsp(unsigned int family);
extern void load_ucode_amd_ap(void); extern void load_ucode_amd_ap(void);
extern int __init save_microcode_in_initrd_amd(void); extern int __init save_microcode_in_initrd_amd(void);
void reload_ucode_amd(void); void reload_ucode_amd(void);
#else #else
static inline void __init load_ucode_amd_bsp(int family) {} static inline void __init load_ucode_amd_bsp(unsigned int family) {}
static inline void load_ucode_amd_ap(void) {} static inline void load_ucode_amd_ap(void) {}
static inline int __init save_microcode_in_initrd_amd(void) { return -EINVAL; } static inline int __init save_microcode_in_initrd_amd(void) { return -EINVAL; }
void reload_ucode_amd(void) {} void reload_ucode_amd(void) {}
......
...@@ -228,7 +228,8 @@ static void apply_ucode_in_initrd(void *ucode, size_t size, bool save_patch) ...@@ -228,7 +228,8 @@ static void apply_ucode_in_initrd(void *ucode, size_t size, bool save_patch)
} }
} }
static bool __init load_builtin_amd_microcode(struct cpio_data *cp, int family) static bool __init load_builtin_amd_microcode(struct cpio_data *cp,
unsigned int family)
{ {
#ifdef CONFIG_X86_64 #ifdef CONFIG_X86_64
char fw_name[36] = "amd-ucode/microcode_amd.bin"; char fw_name[36] = "amd-ucode/microcode_amd.bin";
...@@ -243,7 +244,7 @@ static bool __init load_builtin_amd_microcode(struct cpio_data *cp, int family) ...@@ -243,7 +244,7 @@ static bool __init load_builtin_amd_microcode(struct cpio_data *cp, int family)
#endif #endif
} }
void __init load_ucode_amd_bsp(int family) void __init load_ucode_amd_bsp(unsigned int family)
{ {
struct cpio_data cp; struct cpio_data cp;
void **data; void **data;
......
...@@ -66,7 +66,8 @@ bool get_builtin_firmware(struct cpio_data *cd, const char *name) ...@@ -66,7 +66,8 @@ bool get_builtin_firmware(struct cpio_data *cd, const char *name)
void __init load_ucode_bsp(void) void __init load_ucode_bsp(void)
{ {
int vendor, family; int vendor;
unsigned int family;
if (check_loader_disabled_bsp()) if (check_loader_disabled_bsp())
return; return;
......
...@@ -524,8 +524,8 @@ EXPORT_SYMBOL_GPL(save_mc_for_early); ...@@ -524,8 +524,8 @@ EXPORT_SYMBOL_GPL(save_mc_for_early);
static bool __init load_builtin_intel_microcode(struct cpio_data *cp) static bool __init load_builtin_intel_microcode(struct cpio_data *cp)
{ {
#ifdef CONFIG_X86_64 #ifdef CONFIG_X86_64
u32 eax = 0x00000001, ebx, ecx = 0, edx; unsigned int eax = 0x00000001, ebx, ecx = 0, edx;
int family, model, stepping; unsigned int family, model, stepping;
char name[30]; char name[30];
native_cpuid(&eax, &ebx, &ecx, &edx); native_cpuid(&eax, &ebx, &ecx, &edx);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment