Commit f26483ea authored by Ingo Molnar's avatar Ingo Molnar

Merge branch 'x86/urgent' into x86/microcode, to resolve conflicts

 Conflicts:
  arch/x86/kernel/cpu/microcode/amd.c
  arch/x86/kernel/cpu/microcode/core.c
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parents da0aa3dd 24c25032
...@@ -139,6 +139,7 @@ extern void __init load_ucode_bsp(void); ...@@ -139,6 +139,7 @@ extern void __init load_ucode_bsp(void);
extern void load_ucode_ap(void); extern void load_ucode_ap(void);
void reload_early_microcode(void); void reload_early_microcode(void);
extern bool get_builtin_firmware(struct cpio_data *cd, const char *name); extern bool get_builtin_firmware(struct cpio_data *cd, const char *name);
extern bool initrd_gone;
#else #else
static inline int __init microcode_init(void) { return 0; }; static inline int __init microcode_init(void) { return 0; };
static inline void __init load_ucode_bsp(void) { } static inline void __init load_ucode_bsp(void) { }
......
...@@ -46,6 +46,8 @@ ...@@ -46,6 +46,8 @@
static struct microcode_ops *microcode_ops; static struct microcode_ops *microcode_ops;
static bool dis_ucode_ldr = true; static bool dis_ucode_ldr = true;
bool initrd_gone;
LIST_HEAD(microcode_cache); LIST_HEAD(microcode_cache);
/* /*
...@@ -219,11 +221,12 @@ void load_ucode_ap(void) ...@@ -219,11 +221,12 @@ void load_ucode_ap(void)
static int __init save_microcode_in_initrd(void) static int __init save_microcode_in_initrd(void)
{ {
struct cpuinfo_x86 *c = &boot_cpu_data; struct cpuinfo_x86 *c = &boot_cpu_data;
int ret = -EINVAL;
switch (c->x86_vendor) { switch (c->x86_vendor) {
case X86_VENDOR_INTEL: case X86_VENDOR_INTEL:
if (c->x86 >= 6) if (c->x86 >= 6)
return save_microcode_in_initrd_intel(); ret = save_microcode_in_initrd_intel();
break; break;
case X86_VENDOR_AMD: case X86_VENDOR_AMD:
if (c->x86 >= 0x10) if (c->x86 >= 0x10)
...@@ -233,7 +236,9 @@ static int __init save_microcode_in_initrd(void) ...@@ -233,7 +236,9 @@ static int __init save_microcode_in_initrd(void)
break; break;
} }
return -EINVAL; initrd_gone = true;
return ret;
} }
struct cpio_data find_microcode_in_initrd(const char *path, bool use_pa) struct cpio_data find_microcode_in_initrd(const char *path, bool use_pa)
...@@ -276,9 +281,16 @@ struct cpio_data find_microcode_in_initrd(const char *path, bool use_pa) ...@@ -276,9 +281,16 @@ struct cpio_data find_microcode_in_initrd(const char *path, bool use_pa)
* has the virtual address of the beginning of the initrd. It also * has the virtual address of the beginning of the initrd. It also
* possibly relocates the ramdisk. In either case, initrd_start contains * possibly relocates the ramdisk. In either case, initrd_start contains
* the updated address so use that instead. * the updated address so use that instead.
*
* initrd_gone is for the hotplug case where we've thrown out initrd
* already.
*/ */
if (!use_pa && initrd_start) if (!use_pa) {
start = initrd_start; if (initrd_gone)
return (struct cpio_data){ NULL, 0, "" };
if (initrd_start)
start = initrd_start;
}
return find_cpio_data(path, (void *)start, size, NULL); return find_cpio_data(path, (void *)start, size, NULL);
#else /* !CONFIG_BLK_DEV_INITRD */ #else /* !CONFIG_BLK_DEV_INITRD */
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include <asm/fpu/regset.h> #include <asm/fpu/regset.h>
#include <asm/fpu/signal.h> #include <asm/fpu/signal.h>
#include <asm/fpu/types.h> #include <asm/fpu/types.h>
#include <asm/fpu/xstate.h>
#include <asm/traps.h> #include <asm/traps.h>
#include <linux/hardirq.h> #include <linux/hardirq.h>
...@@ -183,7 +184,8 @@ void fpstate_init(union fpregs_state *state) ...@@ -183,7 +184,8 @@ void fpstate_init(union fpregs_state *state)
* it will #GP. Make sure it is replaced after the memset(). * it will #GP. Make sure it is replaced after the memset().
*/ */
if (static_cpu_has(X86_FEATURE_XSAVES)) if (static_cpu_has(X86_FEATURE_XSAVES))
state->xsave.header.xcomp_bv = XCOMP_BV_COMPACTED_FORMAT; state->xsave.header.xcomp_bv = XCOMP_BV_COMPACTED_FORMAT |
xfeatures_mask;
if (static_cpu_has(X86_FEATURE_FXSR)) if (static_cpu_has(X86_FEATURE_FXSR))
fpstate_init_fxstate(&state->fxsave); fpstate_init_fxstate(&state->fxsave);
......
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