summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrans Kaashoek <[email protected]>2010-07-28 14:38:05 -0400
committerFrans Kaashoek <[email protected]>2010-07-28 14:38:05 -0400
commitb738a4f1a2dd2956123a734327aeaf9d09b5faca (patch)
treebe82845b2c8d46a4744e6ebc26b18cec5979c924
parentde40730dad816ab576f64bf02041bcf812c929e9 (diff)
downloadxv6-labs-b738a4f1a2dd2956123a734327aeaf9d09b5faca.tar.gz
xv6-labs-b738a4f1a2dd2956123a734327aeaf9d09b5faca.tar.bz2
xv6-labs-b738a4f1a2dd2956123a734327aeaf9d09b5faca.zip
kill TLB shoot down code
-rw-r--r--defs.h1
-rw-r--r--lapic.c38
-rw-r--r--trap.c4
-rw-r--r--traps.h1
-rw-r--r--vm.c5
5 files changed, 0 insertions, 49 deletions
diff --git a/defs.h b/defs.h
index 2bf5005..86268b2 100644
--- a/defs.h
+++ b/defs.h
@@ -73,7 +73,6 @@ int cpunum(void);
extern volatile uint* lapic;
void lapiceoi(void);
void lapicinit(int);
-void lapic_tlbflush(uint);
void lapicstartap(uchar, uint);
void microdelay(int);
diff --git a/lapic.c b/lapic.c
index c1cd7f3..e232abc 100644
--- a/lapic.c
+++ b/lapic.c
@@ -47,27 +47,6 @@ lapicw(int index, int value)
lapic[ID]; // wait for write to finish, by reading
}
-static uint
-lapicr(uint off)
-{
- return lapic[off];
-}
-
-static int
-apic_icr_wait()
-{
- uint i = 100000;
- while ((lapicr(ICRLO) & BUSY) != 0) {
- nop_pause();
- i--;
- if (i == 0) {
- cprintf("apic_icr_wait: wedged?\n");
- return -1;
- }
- }
- return 0;
-}
-
//PAGEBREAK!
void
lapicinit(int c)
@@ -151,23 +130,6 @@ microdelay(int us)
{
}
-
-// Send IPI
-void
-lapic_ipi(int cpu, int ino)
-{
- lapicw(ICRHI, cpu << 24);
- lapicw(ICRLO, FIXED | DEASSERT | ino);
- if (apic_icr_wait() < 0)
- panic("lapic_ipi: icr_wait failure");
-}
-
-void
-lapic_tlbflush(uint cpu)
-{
- lapic_ipi(cpu, T_TLBFLUSH);
-}
-
#define IO_RTC 0x70
// Start additional processor running bootstrap code at addr.
diff --git a/trap.c b/trap.c
index f0f016f..1f35708 100644
--- a/trap.c
+++ b/trap.c
@@ -73,10 +73,6 @@ trap(struct trapframe *tf)
cpu->id, tf->cs, tf->eip);
lapiceoi();
break;
- case T_TLBFLUSH:
- lapiceoi();
- lcr3(rcr3());
- break;
//PAGEBREAK: 13
default:
diff --git a/traps.h b/traps.h
index 4422d74..0bd1fd8 100644
--- a/traps.h
+++ b/traps.h
@@ -25,7 +25,6 @@
// These are arbitrarily chosen, but with care not to overlap
// processor defined exceptions or interrupt vectors.
#define T_SYSCALL 64 // system call
-#define T_TLBFLUSH 65 // flush TLB
#define T_DEFAULT 500 // catchall
#define T_IRQ0 32 // IRQ 0 corresponds to int T_IRQ
diff --git a/vm.c b/vm.c
index 5f74079..231e133 100644
--- a/vm.c
+++ b/vm.c
@@ -137,11 +137,6 @@ loadvm(struct proc *p)
lcr3(PADDR(p->pgdir)); // switch to new address space
popcli();
-
- // Conservatively flush other processor's TLBs
- // XXX lazy--just 2 cpus, but xv6 doesn't need shootdown anyway.
- if (cpu->id == 0) lapic_tlbflush(1);
- else lapic_tlbflush(0);
}
// Setup kernel part of a page table. Linear adresses map one-to-one