]> git.hungrycats.org Git - linux/commit
sparc64: Fix regression in pmdp_invalidate().
authorDavid S. Miller <davem@davemloft.net>
Thu, 15 Mar 2018 21:18:00 +0000 (14:18 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 10 Nov 2018 15:42:55 +0000 (07:42 -0800)
commit24b71d1895f591f3779895c206e6d1ae29462e11
tree2d165caa1dcee00b86521e7d20dc1d44599a6817
parent43bbab662dc99fdfef6d8928a204d103651d54f8
sparc64: Fix regression in pmdp_invalidate().

[ Upstream commit cfb61b5e3e09f8b49bc4d685429df75f45127adc ]

pmdp_invalidate() was changed to update the pmd atomically
(to not lose dirty/access bits) and return the original pmd
value.

However, in doing so, we lost a lot of the essential work that
set_pmd_at() does, namely to update hugepage mapping counts and
queuing up the batched TLB flush entry.

Thus we were not flushing entries out of the TLB when making
such PMD changes.

Fix this by abstracting the accounting work of set_pmd_at() out into a
separate function, and call it from pmdp_establish().

Fixes: a8e654f01cb7 ("sparc64: update pmdp_invalidate() to return old pmd value")
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/sparc/mm/tlb.c