[<prev] [next>] [day] [month] [year] [list]
Message-ID: <4EA6A23D.3080605@scalemp.com>
Date: Tue, 25 Oct 2011 13:49:17 +0200
From: Eial Czerwacki <eial@...lemp.com>
To: linux-kernel@...r.kernel.org
CC: "Shai Fultheim (Shai@...leMP.com)" <Shai@...leMP.com>
Subject: [PATCH] IRQ: no IRQ affinity patch
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@...lemp.com>
Signed-off-by: Shai Fultheim<shai@...lemp.com>
Author: Ravikiran Thirumalai<kiran@...lemp.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists