arm64: Improve error reporting on set_pte_at() checks
authorCatalin Marinas <catalin.marinas@arm.com>
Tue, 8 Dec 2015 17:39:15 +0000 (17:39 +0000)
committerCatalin Marinas <catalin.marinas@arm.com>
Fri, 11 Dec 2015 15:44:24 +0000 (15:44 +0000)
commit82d340081b6f71237373d1452e3573a5a122794c
tree05b40eda97d06673cc1e04a66d2158d7abd5761f
parent98fb754831e1d139f1151e968bdebb6eefb9b581
arm64: Improve error reporting on set_pte_at() checks

Currently the BUG_ON() checks do not give enough information about the
PTEs being set. This patch changes BUG_ON to WARN_ONCE and dumps the
values of the old and new PTEs. In addition, the checks are only made if
the new PTE entry is valid.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Reported-by: Ming Lei <tom.leiming@gmail.com>
Cc: Will Deacon <will.deacon@arm.com>
arch/arm64/include/asm/pgtable.h