summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2012-10-16 23:01:20 (GMT)
committerRalf Baechle <ralf@linux-mips.org>2012-10-16 23:01:20 (GMT)
commit01422ff49135e0b747132686405ea8a58f760997 (patch)
treed77d05164ef07970fbb22a41b36a86c2fbdf5b9e /arch
parent344afa6550a66eb4b7103cf1b65fca6f38d380d8 (diff)
downloadlinux-fsl-qoriq-01422ff49135e0b747132686405ea8a58f760997.tar.xz
MIPS: Restore pagemask after dumping the TLB.
Or bad things might happen if the last TLB entry isn't a basic size page. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/mips/lib/dump_tlb.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/mips/lib/dump_tlb.c b/arch/mips/lib/dump_tlb.c
index 3f69725..a99c1d3 100644
--- a/arch/mips/lib/dump_tlb.c
+++ b/arch/mips/lib/dump_tlb.c
@@ -50,8 +50,9 @@ static void dump_tlb(int first, int last)
{
unsigned long s_entryhi, entryhi, asid;
unsigned long long entrylo0, entrylo1;
- unsigned int s_index, pagemask, c0, c1, i;
+ unsigned int s_index, s_pagemask, pagemask, c0, c1, i;
+ s_pagemask = read_c0_pagemask();
s_entryhi = read_c0_entryhi();
s_index = read_c0_index();
asid = s_entryhi & 0xff;
@@ -103,6 +104,7 @@ static void dump_tlb(int first, int last)
write_c0_entryhi(s_entryhi);
write_c0_index(s_index);
+ write_c0_pagemask(s_pagemask);
}
void dump_tlb_all(void)