Port-xen archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: ipi related kpi change review request.
On 2/12/2011 1:22 AM, Cherry G. Mathew wrote:
Hi,
...
Here's the first such patch which alters a MD kpi. I'd be keen to know
if the following ports are affected in any way by this: (they
shouldn't be):
...
Updated patch attached - this should build....
Cheers,
Cherry
diff -r bef0ae3eb8ef -r d4c5d958d98e
trunk/netbsd-src/sys/arch/x86/include/intrdefs.h
--- a/trunk/netbsd-src/sys/arch/x86/include/intrdefs.h Fri Feb 11 16:05:03
2011 +0530
+++ b/trunk/netbsd-src/sys/arch/x86/include/intrdefs.h Sat Feb 12 01:26:41
2011 +0530
@@ -65,6 +65,7 @@
#define X86_IPI_XCALL 0x00000040
#define X86_IPI_ACPI_CPU_SLEEP 0x00000080
#define X86_IPI_KPREEMPT 0x00000100
+#define X86_IPI_TLB 0x00000200
#define X86_NIPI 9
diff -r bef0ae3eb8ef -r d4c5d958d98e trunk/netbsd-src/sys/arch/x86/x86/ipi.c
--- a/trunk/netbsd-src/sys/arch/x86/x86/ipi.c Fri Feb 11 16:05:03 2011 +0530
+++ b/trunk/netbsd-src/sys/arch/x86/x86/ipi.c Sat Feb 12 01:26:41 2011 +0530
@@ -107,6 +107,16 @@
x86_send_ipi(struct cpu_info *ci, int ipimask)
{
int ret;
+
+ KASSERT(ci != NULL);
+
+ if (ipimask & X86_IPI_TLB) { /* Wrapper for TLB event */
+ KASSERT(ipimask == X86_IPI_TLB);
+
+ ret = x86_ipi(LAPIC_TLB_MCAST_VECTOR,
+ ci->ci_cpuid, LAPIC_DLMODE_FIXED);
+ return ret;
+ }
atomic_or_32(&ci->ci_ipis, ipimask);
@@ -132,6 +142,15 @@
int count = 0;
CPU_INFO_ITERATOR cii;
+ if (ipimask & X86_IPI_TLB) { /* Wrapper for TLB event */
+ KASSERT(ipimask == X86_IPI_TLB);
+
+ if (x86_ipi(LAPIC_TLB_BCAST_VECTOR, LAPIC_DEST_ALLEXCL,
+ LAPIC_DLMODE_FIXED)) {
+ panic("x86_ipi() failed on Broadcast via lapic.\n");
+ }
+ }
+
for (CPU_INFO_FOREACH(cii, ci)) {
if (ci == self)
continue;
diff -r bef0ae3eb8ef -r d4c5d958d98e trunk/netbsd-src/sys/arch/x86/x86/pmap.c
--- a/trunk/netbsd-src/sys/arch/x86/x86/pmap.c Fri Feb 11 16:05:03 2011 +0530
+++ b/trunk/netbsd-src/sys/arch/x86/x86/pmap.c Sat Feb 12 01:26:41 2011 +0530
@@ -4542,8 +4542,7 @@
mb->mb_addr1 = sva;
mb->mb_addr2 = eva;
mb->mb_global = pte;
- x86_ipi(LAPIC_TLB_BCAST_VECTOR, LAPIC_DEST_ALLEXCL,
- LAPIC_DLMODE_FIXED);
+ x86_broadcast_ipi(X86_IPI_TLB);
self->ci_need_tlbwait = 1;
splx(s);
} else if ((pm->pm_cpus & ~self->ci_cpumask) != 0 ||
@@ -4581,9 +4580,9 @@
mb->mb_addr1 = sva;
mb->mb_addr2 = eva;
mb->mb_global = pte;
- if (x86_ipi(LAPIC_TLB_MCAST_VECTOR,
- ci->ci_cpuid, LAPIC_DLMODE_FIXED))
+ if (x86_send_ipi(ci, X86_IPI_TLB)) {
panic("pmap_tlb_shootdown: ipi failed");
+ }
}
self->ci_need_tlbwait = 1;
splx(s);
diff -r bef0ae3eb8ef -r d4c5d958d98e
trunk/netbsd-src/sys/arch/xen/include/intr.h
--- a/trunk/netbsd-src/sys/arch/xen/include/intr.h Fri Feb 11 16:05:03
2011 +0530
+++ b/trunk/netbsd-src/sys/arch/xen/include/intr.h Sat Feb 12 01:26:41
2011 +0530
@@ -177,7 +177,7 @@
int x86_send_ipi(struct cpu_info *, int);
void x86_broadcast_ipi(int);
-void x86_multicast_ipi(int, int);
+void x86_ipi_handler(void);
#endif /* !_LOCORE */
Home |
Main Index |
Thread Index |
Old Index