OSDN Git Service

sparc64: Fix regression in pmdp_invalidate().
authorDavid S. Miller <davem@davemloft.net>
Thu, 15 Mar 2018 21:18:00 +0000 (14:18 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 15 Mar 2018 21:18:00 +0000 (14:18 -0700)
commitcfb61b5e3e09f8b49bc4d685429df75f45127adc
tree44556a6711e7cfd44a9e9899eb077c49012872cd
parente2c15aff5f353ba80bd3bb49840837f65fa5cc43
sparc64: Fix regression in pmdp_invalidate().

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>
arch/sparc/mm/tlb.c