]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/64: Only WARN if __pa()/__va() called with bad addresses
authorMichael Ellerman <mpe@ellerman.id.au>
Wed, 6 Apr 2022 14:58:01 +0000 (00:58 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Sun, 22 May 2022 05:58:28 +0000 (15:58 +1000)
commitee7f5141d13258904bbb4ede50f2d0108699c56f
tree4817428c28e0ca3f339f26de78daaa2d6cb834b6
parent2c867970ee92488b34ffe651f7130ee392146d87
powerpc/64: Only WARN if __pa()/__va() called with bad addresses

We added checks to __pa() / __va() to ensure they're only called with
appropriate addresses. But using BUG_ON() is too strong, it means
virt_addr_valid() will BUG when DEBUG_VIRTUAL is enabled.

Instead switch them to warnings, arm64 does the same.

Fixes: ea8153f379d1 ("powerpc/64: Add VIRTUAL_BUG_ON checks for __va and __pa addresses")
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220406145802.538416-5-mpe@ellerman.id.au
arch/powerpc/include/asm/page.h