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
This commit is contained in:
Linus Torvalds 2012-08-23 21:47:54 -07:00
Родитель b5bc0c7054 36bf50d769
Коммит caf1aaf6d2
4 изменённых файлов: 7 добавлений и 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] =
#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)
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,
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,
/* /*
* 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;