ARC: mm: PAE40: Fix crash at munmap
authorYuriy Kolerov <yuriy.kolerov@synopsys.com>
Mon, 28 Nov 2016 04:07:17 +0000 (07:07 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 8 Dec 2016 06:16:17 +0000 (07:16 +0100)
commitb43fb9f6f162ac4bff8cfe836b19a28439291bae
tree69784d24ba36fce6ef455d600657be2d3bb8a454
parent8d1ee7b245ef50b497f1f1f57b74cae3285accf2
ARC: mm: PAE40: Fix crash at munmap

commit 6a8b2ca702b279bea0e8f0363056439352e2081c upstream.

commit 1c3c90930392 broke PAE40. Macro pfn_pte(pfn, prot) creates paddr
from pfn, but the page shift was getting truncated to 32 bits since we lost
the proper cast to 64 bits (for PAE400

Instead of reverting that commit, use a better helper which is 32/64 bits
safe just like ARM implementation.

Fixes: 1c3c90930392 ("ARC: mm: fix build breakage with STRICT_MM_TYPECHECKS")
Signed-off-by: Yuriy Kolerov <yuriy.kolerov@synopsys.com>
[vgupta: massaged changelog]
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arc/include/asm/pgtable.h