diff options
Diffstat (limited to 'arch/x86/kernel/vsmp_64.c')
| -rw-r--r-- | arch/x86/kernel/vsmp_64.c | 19 | 
1 files changed, 14 insertions, 5 deletions
diff --git a/arch/x86/kernel/vsmp_64.c b/arch/x86/kernel/vsmp_64.c index 992f890283e..b99b9ad8540 100644 --- a/arch/x86/kernel/vsmp_64.c +++ b/arch/x86/kernel/vsmp_64.c @@ -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: @@ -33,7 +36,7 @@   * and vice versa.   */ -static unsigned long vsmp_save_fl(void) +asmlinkage __visible unsigned long vsmp_save_fl(void)  {  	unsigned long flags = native_save_fl(); @@ -43,7 +46,7 @@ static unsigned long vsmp_save_fl(void)  }  PV_CALLEE_SAVE_REGS_THUNK(vsmp_save_fl); -static void vsmp_restore_fl(unsigned long flags) +__visible void vsmp_restore_fl(unsigned long flags)  {  	if (flags & X86_EFLAGS_IF)  		flags &= ~X86_EFLAGS_AC; @@ -53,7 +56,7 @@ static void vsmp_restore_fl(unsigned long flags)  }  PV_CALLEE_SAVE_REGS_THUNK(vsmp_restore_fl); -static void vsmp_irq_disable(void) +asmlinkage __visible void vsmp_irq_disable(void)  {  	unsigned long flags = native_save_fl(); @@ -61,7 +64,7 @@ static void vsmp_irq_disable(void)  }  PV_CALLEE_SAVE_REGS_THUNK(vsmp_irq_disable); -static void vsmp_irq_enable(void) +asmlinkage __visible void vsmp_irq_enable(void)  {  	unsigned long flags = native_save_fl(); @@ -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; @@ -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)  | 
