mem-cache: Add multiple eviction stats
[gem5.git] / src / arch / x86 / vtophys.cc
index 4bbeb7119a77a3590f5373f98b2c892389624416..d0287f2ce7d46270c2ddf01ae8a81cae76a99f02 100644 (file)
  * Authors: Gabe Black
  */
 
+#include "arch/x86/vtophys.hh"
+
 #include <string>
 
 #include "arch/x86/pagetable_walker.hh"
 #include "arch/x86/tlb.hh"
-#include "arch/x86/vtophys.hh"
 #include "base/trace.hh"
 #include "cpu/thread_context.hh"
 #include "debug/VtoPhys.hh"
@@ -59,7 +60,7 @@ namespace X86ISA
     Addr
     vtophys(ThreadContext *tc, Addr vaddr)
     {
-        Walker *walker = tc->getDTBPtr()->getWalker();
+        Walker *walker = dynamic_cast<TLB *>(tc->getDTBPtr())->getWalker();
         unsigned logBytes;
         Addr addr = vaddr;
         Fault fault = walker->startFunctional(