]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/fsl_booke: Avoid creating duplicate tlb1 entry
authorLaurentiu Tudor <laurentiu.tudor@nxp.com>
Thu, 23 Jan 2020 11:19:25 +0000 (11:19 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Apr 2020 08:50:22 +0000 (10:50 +0200)
commit3644a179ce434fa6e2f5c2d10053c0a6185724b8
treeb5253b9e826a51aea0ce0a9f972b62bbf5c8f095
parent2d29648ef3a6706105b51235902ad92489eabd52
powerpc/fsl_booke: Avoid creating duplicate tlb1 entry

commit 4e470b80fd0f1e7f085ac39cef8056b743e5a7cb upstream.

In the current implementation, the call to loadcam_multi() is wrapped
between switch_to_as1() and restore_to_as0() calls so, when it tries
to create its own temporary AS=1 TLB1 entry, it ends up duplicating
the existing one created by switch_to_as1(). Add a check to skip
creating the temporary entry if already running in AS=1.

Fixes: e3cd6075c709 ("powerpc/85xx: Load all early TLB entries at once")
Cc: stable@vger.kernel.org # v4.4+
Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Acked-by: Scott Wood <oss@buserror.net>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200123111914.2565-1-laurentiu.tudor@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/powerpc/mm/nohash/tlb_low.S