mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] IRQ: no IRQ affinity patch
       [not found] ` <9B14D1490DDECA4E974F6B9FC9EBAB3140CD274368@VMBX108.ihostexchange.net>
@ 2011-10-25 11:49   ` Eial Czerwacki
  0 siblings, 0 replies; only message in thread
From: Eial Czerwacki @ 2011-10-25 11:49 UTC (permalink / raw)
  To: linux-kernel; +Cc: Shai Fultheim (Shai@ScaleMP.com)

Tell vSMP Foundation to ignore IOAPIC irq routing and make the kernel
work in this mode by setting vector_allocation for all CPUs, so IDT
on all processors will accept this interrupt.

Signed-off-by: Eial Czerwacki<eial@scalemp.com>
Signed-off-by: Shai Fultheim<shai@scalemp.com>
Author: Ravikiran Thirumalai<kiran@scalemp.com>
---

Index: b/arch/x86/kernel/vsmp_64.c
===================================================================
--- a/arch/x86/kernel/vsmp_64.c	2010-05-12 14:59:32.000000000 -0700
+++ b/arch/x86/kernel/vsmp_64.c	2010-05-24 11:58:28.000000000 -0700
@@ -15,6 +15,7 @@
   #include<linux/init.h>
   #include<linux/pci_ids.h>
   #include<linux/pci_regs.h>
+#include<linux/irq.h>

   #include<asm/apic.h>
   #include<asm/pci-direct.h>
@@ -92,6 +93,12 @@ static void __init set_vsmp_pv_ops(void)
   	ctl = readl(address + 4);
   	printk(KERN_INFO "vSMP CTL: capabilities:0x%08x  control:0x%08x\n",
   	       cap, ctl);
+	/* Set irqrouting to ignore since this vsmp */
+	if (cap&   ctl&   (1<<   8)) {
+		ctl&= ~(1<<   8);
+		no_irq_affinity = 1;
+	}
+
   	if (cap&   ctl&   (1<<   4)) {
   		/* Setup irq ops and turn on vSMP  IRQ fastpath handling */
   		pv_irq_ops.irq_disable = PV_CALLEE_SAVE(vsmp_irq_disable);
@@ -99,12 +106,11 @@ static void __init set_vsmp_pv_ops(void)
   		pv_irq_ops.save_fl  = PV_CALLEE_SAVE(vsmp_save_fl);
   		pv_irq_ops.restore_fl  = PV_CALLEE_SAVE(vsmp_restore_fl);
   		pv_init_ops.patch = vsmp_patch;
-
   		ctl&= ~(1<<   4);
-		writel(ctl, address + 4);
-		ctl = readl(address + 4);
-		printk(KERN_INFO "vSMP CTL: control set to:0x%08x\n", ctl);
   	}
+	writel(ctl, address + 4);
+	ctl = readl(address + 4);
+	printk(KERN_INFO "vSMP CTL: control set to:0x%08x\n", ctl);

   	early_iounmap(address, 8);
   }

Index: b/arch/x86/kernel/apic/apic_flat_64.c
===================================================================
--- a/arch/x86/kernel/apic/apic_flat_64.c	2010-05-12 14:59:32.000000000 -0700
+++ b/arch/x86/kernel/apic/apic_flat_64.c	2010-05-24 11:58:28.000000000 -0700
@@ -52,7 +52,10 @@
   	 * hyperthread was specified in the interrupt desitination.
   	 */
   	cpumask_clear(retmask);
-	cpumask_bits(retmask)[0] = APIC_ALL_CPUS;
+	if(is_vsmp_box())
+		cpumask_setall(retmask);
+	else
+		cpumask_bits(retmask)[0] = APIC_ALL_CPUS;
   }

   /*
@@ -263,7 +266,10 @@
   static void physflat_vector_allocation_domain(int cpu, struct cpumask *retmask)
   {
   	cpumask_clear(retmask);
-	cpumask_set_cpu(cpu, retmask);
+	if(is_vsmp_box())
+		cpumask_setall(retmask);
+	else
+		cpumask_set_cpu(cpu, retmask);
   }

   static void physflat_send_IPI_mask(const struct cpumask *cpumask, int vector)

Index: b/arch/x86/include/asm/x2apic.h
===================================================================
--- a/arch/x86/include/asm/x2apic.h 	2010-05-12 14:59:32.000000000 -0700
+++ b/arch/x86/include/asm/x2apic.h 	2010-05-24 11:58:28.000000000 -0700
@@ -29,7 +29,10 @@
   static void x2apic_vector_allocation_domain(int cpu, struct cpumask *retmask)
   {
   	cpumask_clear(retmask);
-	cpumask_set_cpu(cpu, retmask);
+	if(is_vsmp_box())
+		cpumask_setall(retmask);
+	else
+		cpumask_set_cpu(cpu, retmask);
   }

   static void




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-10-25 11:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <4EA66964.8050602@scalemp.com>
     [not found] ` <9B14D1490DDECA4E974F6B9FC9EBAB3140CD274368@VMBX108.ihostexchange.net>
2011-10-25 11:49   ` [PATCH] IRQ: no IRQ affinity patch Eial Czerwacki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome