Commit caf1aaf6 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fixes from Ingo Molnar:
 "This tree contains assorted fixlets: an alternatives patching crash
  fix, an irq migration/hotplug interaction fix, a fix for large AMD
  microcode images and a comment fixlet."

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86, microcode, AMD: Fix broken ucode patch size check
  x86/alternatives: Fix p6 nops on non-modular kernels
  x86/fixup_irq: Use cpu_online_mask instead of cpu_all_mask
  x86/spinlocks: Fix comment in spinlock.h
parents b5bc0c70 36bf50d7
...@@ -12,8 +12,7 @@ ...@@ -12,8 +12,7 @@
* Simple spin lock operations. There are two variants, one clears IRQ's * Simple spin lock operations. There are two variants, one clears IRQ's
* on the local processor, one does not. * on the local processor, one does not.
* *
* These are fair FIFO ticket locks, which are currently limited to 256 * These are fair FIFO ticket locks, which support up to 2^16 CPUs.
* CPUs.
* *
* (the type definitions are in asm/spinlock_types.h) * (the type definitions are in asm/spinlock_types.h)
*/ */
......
...@@ -165,7 +165,7 @@ static const unsigned char * const k7_nops[ASM_NOP_MAX+2] = ...@@ -165,7 +165,7 @@ static const unsigned char * const k7_nops[ASM_NOP_MAX+2] =
#endif #endif
#ifdef P6_NOP1 #ifdef P6_NOP1
static const unsigned char __initconst_or_module p6nops[] = static const unsigned char p6nops[] =
{ {
P6_NOP1, P6_NOP1,
P6_NOP2, P6_NOP2,
......
...@@ -270,7 +270,7 @@ void fixup_irqs(void) ...@@ -270,7 +270,7 @@ void fixup_irqs(void)
if (cpumask_any_and(affinity, cpu_online_mask) >= nr_cpu_ids) { if (cpumask_any_and(affinity, cpu_online_mask) >= nr_cpu_ids) {
break_affinity = 1; break_affinity = 1;
affinity = cpu_all_mask; affinity = cpu_online_mask;
} }
chip = irq_data_get_irq_chip(data); chip = irq_data_get_irq_chip(data);
......
...@@ -143,11 +143,12 @@ static int get_matching_microcode(int cpu, const u8 *ucode_ptr, ...@@ -143,11 +143,12 @@ static int get_matching_microcode(int cpu, const u8 *ucode_ptr,
unsigned int *current_size) unsigned int *current_size)
{ {
struct microcode_header_amd *mc_hdr; struct microcode_header_amd *mc_hdr;
unsigned int actual_size; unsigned int actual_size, patch_size;
u16 equiv_cpu_id; u16 equiv_cpu_id;
/* size of the current patch we're staring at */ /* size of the current patch we're staring at */
*current_size = *(u32 *)(ucode_ptr + 4) + SECTION_HDR_SIZE; patch_size = *(u32 *)(ucode_ptr + 4);
*current_size = patch_size + SECTION_HDR_SIZE;
equiv_cpu_id = find_equiv_id(); equiv_cpu_id = find_equiv_id();
if (!equiv_cpu_id) if (!equiv_cpu_id)
...@@ -174,7 +175,7 @@ static int get_matching_microcode(int cpu, const u8 *ucode_ptr, ...@@ -174,7 +175,7 @@ static int get_matching_microcode(int cpu, const u8 *ucode_ptr,
/* /*
* now that the header looks sane, verify its size * now that the header looks sane, verify its size
*/ */
actual_size = verify_ucode_size(cpu, *current_size, leftover_size); actual_size = verify_ucode_size(cpu, patch_size, leftover_size);
if (!actual_size) if (!actual_size)
return 0; return 0;
......
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