summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNilay Vaish <nilay@cs.wisc.edu>2012-01-05 11:00:32 -0600
committerNilay Vaish <nilay@cs.wisc.edu>2012-01-05 11:00:32 -0600
commitbd23a37198084e10ecd572c6332f71a749abb747 (patch)
tree198129b8f5170de53841714795829de6e3bf5587 /src
parentea94029ea53d793da63e6abcaeec95c5fc9bae22 (diff)
downloadgem5-bd23a37198084e10ecd572c6332f71a749abb747.tar.xz
X86 TLB: Move a DPRINTF to its correct place
The DPRINTF for doing protection checks appears after the checks have been carried out. It is possible that the function returns while the checks are being carried, in which case the printf is missed out. This patch moves the DPRINTF before the checks. --HG-- extra : rebase_source : 172896057e593022444d882ea93323a5d9f77a89
Diffstat (limited to 'src')
-rw-r--r--src/arch/x86/tlb.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/arch/x86/tlb.cc b/src/arch/x86/tlb.cc
index 40c30637d..131909e50 100644
--- a/src/arch/x86/tlb.cc
+++ b/src/arch/x86/tlb.cc
@@ -328,6 +328,9 @@ TLB::translate(RequestPtr req, ThreadContext *tc, Translation *translation,
DPRINTF(TLB, "Miss was serviced.\n");
#endif
}
+
+ DPRINTF(TLB, "Entry found with paddr %#x, "
+ "doing protection checks.\n", entry->paddr);
// Do paging protection checks.
bool inUser = (m5Reg.cpl == 3 &&
!(flags & (CPL0FlagBit << FlagShift)));
@@ -345,9 +348,6 @@ TLB::translate(RequestPtr req, ThreadContext *tc, Translation *translation,
return new PageFault(vaddr, true, Write, inUser, false);
}
-
- DPRINTF(TLB, "Entry found with paddr %#x, "
- "doing protection checks.\n", entry->paddr);
Addr paddr = entry->paddr | (vaddr & (entry->size-1));
DPRINTF(TLB, "Translated %#x -> %#x.\n", vaddr, paddr);
req->setPaddr(paddr);