MIPS: 64-bit: Fix system lockup.
authorGreg Ungerer <gerg@snapgear.com>
Wed, 20 May 2009 06:12:32 +0000 (16:12 +1000)
committerRalf Baechle <ralf@linux-mips.org>
Wed, 20 May 2009 17:53:14 +0000 (18:53 +0100)
commita5e696e5d0f1377ff6beb10d2f40edb6a3d1de18
tree2f7b194c53e9a7e2ab6c8b58335c299a897231fe
parent195d1a96ae5fdfbedb8dc4b97afee578921fa99e
MIPS: 64-bit: Fix system lockup.

The address range size calculation inside local_flush_tlb_kernel_range()
is being truncated by a too small size variable holder on 64-bit systems.
The truncated size can result in an erroneous tlbsize check that means we
sit spinning inside a loop trying to flush a hige number of TLB entries.
This is for all intents and purposes a system hang. Fix by using an
appropriately sized valiable to hold the size.

[Ralf: Greg's original patch submission identified the issue and fixed one
instance in tlb-r4k.c but there there were several more.  For consistency
I also modified tlb-r3k.c even though that file is only used on 32-bit.]

Signed-off-by: Greg Ungerer <gerg@snapgear.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/mm/tlb-r3k.c
arch/mips/mm/tlb-r4k.c
arch/mips/mm/tlb-r8k.c