Skip to content

Commit

Permalink
Merge branch 'x86-microcode-for-linus' of git://git.kernel.org/pub/sc…
Browse files Browse the repository at this point in the history
…m/linux/kernel/git/tip/tip

Pull x86/microcode changes from Ingo Molnar:
 "The biggest changes are to AMD microcode patching: add code for
  caching all microcode patches which belong to the current family on
  which we're running, in the kernel.

  We look up the patch needed for each core from the cache at
  patch-application time instead of holding a single patch per-system"

* 'x86-microcode-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86, microcode, AMD: Fix use after free in free_cache()
  x86, microcode, AMD: Rewrite patch application procedure
  x86, microcode, AMD: Add a small, per-family patches cache
  x86, microcode, AMD: Add reverse equiv table search
  x86, microcode: Add a refresh firmware flag to ->request_microcode_fw
  x86, microcode, AMD: Read CPUID(1).EAX on the correct cpu
  x86, microcode, AMD: Check before applying a patch
  x86, microcode, AMD: Remove useless get_ucode_data wrapper
  x86, microcode: Straighten out Kconfig text
  x86, microcode: Cleanup cpu hotplug notifier callback
  x86, microcode: Drop uci->mc check on resume path
  x86, microcode: Save an indentation level in reload_for_cpu
  • Loading branch information
Linus Torvalds committed Oct 1, 2012
2 parents a5fa7b7 + bd13178 commit b3eda8d
Show file tree
Hide file tree
Showing 5 changed files with 273 additions and 184 deletions.
20 changes: 10 additions & 10 deletions arch/x86/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -986,25 +986,25 @@ config X86_REBOOTFIXUPS
Say N otherwise.

config MICROCODE
tristate "/dev/cpu/microcode - microcode support"
tristate "CPU microcode loading support"
select FW_LOADER
---help---

If you say Y here, you will be able to update the microcode on
certain Intel and AMD processors. The Intel support is for the
IA32 family, e.g. Pentium Pro, Pentium II, Pentium III,
Pentium 4, Xeon etc. The AMD support is for family 0x10 and
0x11 processors, e.g. Opteron, Phenom and Turion 64 Ultra.
You will obviously need the actual microcode binary data itself
which is not shipped with the Linux kernel.
IA32 family, e.g. Pentium Pro, Pentium II, Pentium III, Pentium 4,
Xeon etc. The AMD support is for families 0x10 and later. You will
obviously need the actual microcode binary data itself which is not
shipped with the Linux kernel.

This option selects the general module only, you need to select
at least one vendor specific module as well.

To compile this driver as a module, choose M here: the
module will be called microcode.
To compile this driver as a module, choose M here: the module
will be called microcode.

config MICROCODE_INTEL
bool "Intel microcode patch loading support"
bool "Intel microcode loading support"
depends on MICROCODE
default MICROCODE
select FW_LOADER
Expand All @@ -1017,7 +1017,7 @@ config MICROCODE_INTEL
<http://www.urbanmyth.org/microcode/>.

config MICROCODE_AMD
bool "AMD microcode patch loading support"
bool "AMD microcode loading support"
depends on MICROCODE
select FW_LOADER
---help---
Expand Down
10 changes: 2 additions & 8 deletions arch/x86/include/asm/microcode.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ struct microcode_ops {
enum ucode_state (*request_microcode_user) (int cpu,
const void __user *buf, size_t size);

enum ucode_state (*request_microcode_fw) (int cpu,
struct device *device);
enum ucode_state (*request_microcode_fw) (int cpu, struct device *,
bool refresh_fw);

void (*microcode_fini_cpu) (int cpu);

Expand Down Expand Up @@ -49,12 +49,6 @@ static inline struct microcode_ops * __init init_intel_microcode(void)
#ifdef CONFIG_MICROCODE_AMD
extern struct microcode_ops * __init init_amd_microcode(void);
extern void __exit exit_amd_microcode(void);

static inline void get_ucode_data(void *to, const u8 *from, size_t n)
{
memcpy(to, from, n);
}

#else
static inline struct microcode_ops * __init init_amd_microcode(void)
{
Expand Down
Loading

0 comments on commit b3eda8d

Please sign in to comment.