Commit 19e0d5f1 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

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

Pull x86 fixes from Ingo Molnar:
 "Fixes from all around the place:

   - hyper-V 32-bit PAE guest kernel fix
   - two IRQ allocation fixes on certain x86 boards
   - intel-mid boot crash fix
   - intel-quark quirk
   - /proc/interrupts duplicate irq chip name fix
   - cma boot crash fix
   - syscall audit fix
   - boot crash fix with certain TSC configurations (seen on Qemu)
   - smpboot.c build warning fix"

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86, pageattr: Prevent overflow in slow_virt_to_phys() for X86_PAE
  ACPI, irq, x86: Return IRQ instead of GSI in mp_register_gsi()
  x86, intel-mid: Create IRQs for APB timers and RTC timers
  x86: Don't enable F00F workaround on Intel Quark processors
  x86/irq: Fix XT-PIC-XT-PIC in /proc/interrupts
  x86, cma: Reserve DMA contiguous area after initmem_init()
  i386/audit: stop scribbling on the stack frame
  x86, apic: Handle a bad TSC more gracefully
  x86: ACPI: Do not translate GSI number if IOAPIC is disabled
  x86/smpboot: Move data structure to its primary usage scope
parents f5fa3630 d1cd1210
Loading
Loading
Loading
Loading
+10 −6
Original line number Diff line number Diff line
@@ -397,7 +397,7 @@ static int mp_register_gsi(struct device *dev, u32 gsi, int trigger,

	/* Don't set up the ACPI SCI because it's already set up */
	if (acpi_gbl_FADT.sci_interrupt == gsi)
		return gsi;
		return mp_map_gsi_to_irq(gsi, IOAPIC_MAP_ALLOC);

	trigger = trigger == ACPI_EDGE_SENSITIVE ? 0 : 1;
	polarity = polarity == ACPI_ACTIVE_HIGH ? 0 : 1;
@@ -604,14 +604,18 @@ void __init acpi_pic_sci_set_trigger(unsigned int irq, u16 trigger)

int acpi_gsi_to_irq(u32 gsi, unsigned int *irqp)
{
	int irq = mp_map_gsi_to_irq(gsi, IOAPIC_MAP_ALLOC | IOAPIC_MAP_CHECK);
	int irq;

	if (irq >= 0) {
	if (acpi_irq_model == ACPI_IRQ_MODEL_PIC) {
		*irqp = gsi;
	} else {
		irq = mp_map_gsi_to_irq(gsi,
					IOAPIC_MAP_ALLOC | IOAPIC_MAP_CHECK);
		if (irq < 0)
			return -1;
		*irqp = irq;
		return 0;
	}

	return -1;
	return 0;
}
EXPORT_SYMBOL_GPL(acpi_gsi_to_irq);

+0 −2
Original line number Diff line number Diff line
@@ -185,8 +185,6 @@ static void apbt_setup_irq(struct apbt_dev *adev)

	irq_modify_status(adev->irq, 0, IRQ_MOVE_PCNTXT);
	irq_set_affinity(adev->irq, cpumask_of(adev->cpu));
	/* APB timer irqs are set up as mp_irqs, timer is edge type */
	__irq_set_handler(adev->irq, handle_edge_irq, 0, "edge");
}

/* Should be called with per cpu */
+2 −2
Original line number Diff line number Diff line
@@ -1297,7 +1297,7 @@ void setup_local_APIC(void)
	unsigned int value, queued;
	int i, j, acked = 0;
	unsigned long long tsc = 0, ntsc;
	long long max_loops = cpu_khz;
	long long max_loops = cpu_khz ? cpu_khz : 1000000;

	if (cpu_has_tsc)
		rdtscll(tsc);
@@ -1383,7 +1383,7 @@ void setup_local_APIC(void)
			break;
		}
		if (queued) {
			if (cpu_has_tsc) {
			if (cpu_has_tsc && cpu_khz) {
				rdtscll(ntsc);
				max_loops = (cpu_khz << 10) - (ntsc - tsc);
			} else
+3 −2
Original line number Diff line number Diff line
@@ -213,12 +213,13 @@ static void intel_workarounds(struct cpuinfo_x86 *c)
{
#ifdef CONFIG_X86_F00F_BUG
	/*
	 * All current models of Pentium and Pentium with MMX technology CPUs
	 * All models of Pentium and Pentium with MMX technology CPUs
	 * have the F0 0F bug, which lets nonprivileged users lock up the
	 * system. Announce that the fault handler will be checking for it.
	 * The Quark is also family 5, but does not have the same bug.
	 */
	clear_cpu_bug(c, X86_BUG_F00F);
	if (!paravirt_enabled() && c->x86 == 5) {
	if (!paravirt_enabled() && c->x86 == 5 && c->x86_model < 9) {
		static int f00f_workaround_enabled;

		set_cpu_bug(c, X86_BUG_F00F);
+7 −8
Original line number Diff line number Diff line
@@ -447,15 +447,14 @@ sysenter_exit:
sysenter_audit:
	testl $(_TIF_WORK_SYSCALL_ENTRY & ~_TIF_SYSCALL_AUDIT),TI_flags(%ebp)
	jnz syscall_trace_entry
	addl $4,%esp
	CFI_ADJUST_CFA_OFFSET -4
	movl %esi,4(%esp)		/* 5th arg: 4th syscall arg */
	movl %edx,(%esp)		/* 4th arg: 3rd syscall arg */
	/* %ecx already in %ecx		   3rd arg: 2nd syscall arg */
	movl %ebx,%edx			/* 2nd arg: 1st syscall arg */
	/* %eax already in %eax		   1st arg: syscall number */
	/* movl PT_EAX(%esp), %eax	already set, syscall number: 1st arg to audit */
	movl PT_EBX(%esp), %edx		/* ebx/a0: 2nd arg to audit */
	/* movl PT_ECX(%esp), %ecx	already set, a1: 3nd arg to audit */
	pushl_cfi PT_ESI(%esp)		/* a3: 5th arg */
	pushl_cfi PT_EDX+4(%esp)	/* a2: 4th arg */
	call __audit_syscall_entry
	pushl_cfi %ebx
	popl_cfi %ecx /* get that remapped edx off the stack */
	popl_cfi %ecx /* get that remapped esi off the stack */
	movl PT_EAX(%esp),%eax		/* reload syscall number */
	jmp sysenter_do_call

Loading