]> git.ipfire.org Git - thirdparty/kernel/stable.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 14:13:46 +0000 (16:13 +0200)
commitc8f4397ad9572c7925369a298fe5f1d92acead21
tree6d200dfb88b4c93845f8e7306ba0965e78a0e67e
parent7afbbd0cf19f592a5969ce1bbc61440e42d7ea9f
powerpc/fsl_booke: Avoid creating duplicate tlb1 entry

commit aa4113340ae6c2811e046f08c2bc21011d20a072 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: d9e1831a4202 ("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