]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
powerpc/mm: Add tracking of the number of coprocessors using a context
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Thu, 22 Mar 2018 22:29:05 +0000 (09:29 +1100)
committerThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Mon, 9 Apr 2018 13:41:10 +0000 (10:41 -0300)
commitea4bde53522866da4e8ee26c0286143a1da3a5be
tree0eb698028a48c7507a373c1831fb07cd2959f1eb
parent1f75df7999e56688e6ba93ab85ee0b1506e5e06d
powerpc/mm: Add tracking of the number of coprocessors using a context

BugLink: http://bugs.launchpad.net/bugs/1762370
commit aff6f8cb3e2170b9e58b0932bce7bfb492775e23 upstream.

Currently, when using coprocessors (which use the Nest MMU), we
simply increment the active_cpu count to force all TLB invalidations
to be come broadcast.

Unfortunately, due to an errata in POWER9, we will need to know
more specifically that coprocessors are in use.

This maintains a separate copros counter in the MMU context for
that purpose.

NB. The commit mentioned in the fixes tag below is not at fault for
the bug we're fixing in this commit and the next, but this fix applies
on top the infrastructure it introduced.

Fixes: 03b8abedf4f4 ("cxl: Enable global TLBIs for cxl contexts")
Cc: stable@vger.kernel.org # v4.15+
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Tested-by: Balbir Singh <bsingharora@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
arch/powerpc/include/asm/book3s/64/mmu.h
arch/powerpc/include/asm/mmu_context.h
arch/powerpc/mm/mmu_context_book3s64.c