]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc: Fix address masking bug in hpte_need_flush()
authorDavid Gibson <david@gibson.dropbear.id.au>
Mon, 8 Feb 2010 20:09:03 +0000 (20:09 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 10 Feb 2010 02:58:06 +0000 (13:58 +1100)
commite022e884c2fc3b3d945458e27dde8ade3a35f28b
tree8467dab77d8b66423f65612d878aef3efb1056ca
parentc20a98d15c4659994f5567a6ca7498fcf49a7547
powerpc: Fix address masking bug in hpte_need_flush()

Commit 030e7060a0b823d9bb1a9917c252e6822584c06f 'Make
hpte_need_flush() correctly mask for multiple page sizes' introduced
bug, which is triggered when a kernel with a 64k base page size is run
on a system whose hardware does not 64k hash PTEs.  In this case, we
emulate 64k pages with multiple 4k hash PTEs, however in
hpte_need_flush() we incorrectly only mask the hardware page size from
the address, instead of the logical page size.  This causes things to
go wrong when we later attempt to iterate through the hardware
subpages of the logical page.

This patch corrects the error.  It has been tested on pSeries bare
metal by Michael Neuling.

Signed-off-by: David Gibson <dwg@au1.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/mm/tlb_hash64.c