powerpc/mm: Make clear_fixmap() actually work
authorAnton Vorontsov <avorontsov@ru.mvista.com>
Mon, 29 Dec 2008 06:40:35 +0000 (06:40 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Thu, 8 Jan 2009 05:25:17 +0000 (16:25 +1100)
commit7021d86afa6f3a8bf76218ac97f5847a6d985730
treefb12712d5ff3ec34514c2799736263507de1918d
parent02af87a74271977d09ece9b709909dcae3f9fab9
powerpc/mm: Make clear_fixmap() actually work

The clear_fixmap() routine issues map_page() with flags set to 0.
Currently this causes a BUG_ON() inside the map_page(), as it assumes
that a PTE should be clear before mapping.

This patch makes the map_page() to trigger the BUG_ON() only if the
flags were set.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Acked-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/mm/pgtable_32.c