arm64: Move PTE_PROT_NONE higher up
authorCatalin Marinas <catalin.marinas@arm.com>
Wed, 27 Nov 2013 16:59:27 +0000 (16:59 +0000)
committerSteve Capper <steve.capper@linaro.org>
Wed, 5 Mar 2014 07:04:46 +0000 (15:04 +0800)
commitf28d02f4858d071a8c8a479be7ab81636f7f4c32
treee5f5a56b8cb9e8c5153d597cdaf4b80c6456f56c
parente66c9ccc07b6b6b88d8f9a29f516e9b7dbc4d52b
arm64: Move PTE_PROT_NONE higher up

PTE_PROT_NONE means that a pte is present but does not have any
read/write attributes. However, setting the memory type like
pgprot_writecombine() is allowed and such bits overlap with
PTE_PROT_NONE. This causes mmap/munmap issues in drivers that change the
vma->vm_pg_prot on PROT_NONE mappings.

This patch reverts the PTE_FILE/PTE_PROT_NONE shift in commit
59911ca4325d (ARM64: mm: Move PTE_PROT_NONE bit) and moves PTE_PROT_NONE
together with the other software bits.

Signed-off-by: Steve Capper <steve.capper@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Tested-by: Steve Capper <steve.capper@linaro.org>
Cc: <stable@vger.kernel.org> # 3.11+
arch/arm64/include/asm/pgtable.h