Skip to content

Commit

Permalink
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/l…
Browse files Browse the repository at this point in the history
…inux/kernel/git/tip/tip

Pull x86 fixes from Peter Anvin:
 "Two very small changes: one fix for the vSMP Foundation platform, and
  one to help LLVM not choke on options it doesn't understand (although
  it probably should)"

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/vsmp: Fix irq routing
  x86: LLVMLinux: Wrap -mno-80387 with cc-option
  • Loading branch information
Linus Torvalds committed May 2, 2014
2 parents e7e6d2a + 39025ba commit 0845e11
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
4 changes: 3 additions & 1 deletion arch/x86/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ else
KBUILD_CFLAGS += -m64

# Don't autogenerate traditional x87, MMX or SSE instructions
KBUILD_CFLAGS += -mno-mmx -mno-sse -mno-80387 -mno-fp-ret-in-387
KBUILD_CFLAGS += -mno-mmx -mno-sse
KBUILD_CFLAGS += $(call cc-option,-mno-80387)
KBUILD_CFLAGS += $(call cc-option,-mno-fp-ret-in-387)

# Use -mpreferred-stack-boundary=3 if supported.
KBUILD_CFLAGS += $(call cc-option,-mpreferred-stack-boundary=3)
Expand Down
11 changes: 10 additions & 1 deletion arch/x86/kernel/vsmp_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@

#define TOPOLOGY_REGISTER_OFFSET 0x10

/* Flag below is initialized once during vSMP PCI initialization. */
static int irq_routing_comply = 1;

#if defined CONFIG_PCI && defined CONFIG_PARAVIRT
/*
* Interrupt control on vSMPowered systems:
Expand Down Expand Up @@ -101,6 +104,10 @@ static void __init set_vsmp_pv_ops(void)
#ifdef CONFIG_SMP
if (cap & ctl & BIT(8)) {
ctl &= ~BIT(8);

/* Interrupt routing set to ignore */
irq_routing_comply = 0;

#ifdef CONFIG_PROC_FS
/* Don't let users change irq affinity via procfs */
no_irq_affinity = 1;
Expand Down Expand Up @@ -218,7 +225,9 @@ static void vsmp_apic_post_init(void)
{
/* need to update phys_pkg_id */
apic->phys_pkg_id = apicid_phys_pkg_id;
apic->vector_allocation_domain = fill_vector_allocation_domain;

if (!irq_routing_comply)
apic->vector_allocation_domain = fill_vector_allocation_domain;
}

void __init vsmp_init(void)
Expand Down

0 comments on commit 0845e11

Please sign in to comment.