projects
/
gem5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8bf9232
)
ARM: Fix memset on TLB flush and initialization
author
Chander Sudanthi
<Chander.Sudanthi@ARM.com>
Thu, 16 Jun 2011 20:08:11 +0000
(15:08 -0500)
committer
Chander Sudanthi
<Chander.Sudanthi@ARM.com>
Thu, 16 Jun 2011 20:08:11 +0000
(15:08 -0500)
Instead of clearing the entire TLB on initialization and flush, the code was
clearing only one element. This patch corrects the memsets in the init and
flush routines.
src/arch/arm/tlb.cc
patch
|
blob
|
history
diff --git
a/src/arch/arm/tlb.cc
b/src/arch/arm/tlb.cc
index ca2b68b3b6dac9cbb771afe9b85a6a31d84335fa..a2b1a9d8a0c162ebb8c6a05554ed7d9b4bc43bb1 100644
(file)
--- a/
src/arch/arm/tlb.cc
+++ b/
src/arch/arm/tlb.cc
@@
-75,7
+75,7
@@
TLB::TLB(const Params *p)
, rangeMRU(1), miscRegValid(false)
{
table = new TlbEntry[size];
- memset(table, 0, sizeof(TlbEntry
[size])
);
+ memset(table, 0, sizeof(TlbEntry
) * size
);
#if FULL_SYSTEM
tableWalker->setTlb(this);
@@
-192,7
+192,7
@@
TLB::flushAll()
x++;
}
- memset(table, 0, sizeof(TlbEntry
[size])
);
+ memset(table, 0, sizeof(TlbEntry
) * size
);
flushTlb++;
}