sparc: gup_pte_range() support THP based tail recounting

Up to this point the code assumed old refcounting for hugepages (pre-thp).
 This updates the code directly to the thp mapcount tail page refcounting.

Signed-off-by: Andrea Arcangeli <>
Cc: Peter Zijlstra <>
Cc: Hugh Dickins <>
Cc: Johannes Weiner <>
Cc: Rik van Riel <>
Cc: Mel Gorman <>
Cc: KOSAKI Motohiro <>
Cc: Benjamin Herrenschmidt <>
Cc: David Gibson <>
Cc: Martin Schwidefsky <>
Cc: Heiko Carstens <>
Acked-by: David Miller <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
1 file changed