This reverts commit 6dfc43d3a19174faead54575c204aee106225f43. Going to revert the whole vmwwgfx pull.
Unified · Split
| @@ -2687,7 +2687,7 @@ extern int apply_to_page_range(struct mm_struct *mm, unsigned long address, · 2686 unmodified lines | ||
| 2687 | 2687 | unsigned long size, pte_fn_t fn, void *data); |
| 2688 | 2688 | |
| 2689 | 2689 | struct pfn_range_apply; |
| 2690 | −typedef int (*pter_fn_t)(pte_t *pte, unsigned long addr, | |
| 2690 | +typedef int (*pter_fn_t)(pte_t *pte, pgtable_t token, unsigned long addr, | |
| 2691 | 2691 | struct pfn_range_apply *closure); |
| 2692 | 2692 | struct pfn_range_apply { |
| 2693 | 2693 | struct mm_struct *mm; |
| @@ -26,6 +26,7 @@ struct apply_as { · 25 unmodified lines | ||
| 26 | 26 | /** |
| 27 | 27 | * apply_pt_wrprotect - Leaf pte callback to write-protect a pte |
| 28 | 28 | * @pte: Pointer to the pte |
| 29 | + * @token: Page table token, see apply_to_pfn_range() | |
| 29 | 30 | * @addr: The virtual page address |
| 30 | 31 | * @closure: Pointer to a struct pfn_range_apply embedded in a |
| 31 | 32 | * struct apply_as |
| @@ -35,7 +36,7 @@ struct apply_as { · 3 unmodified lines | ||
| 35 | 36 | * |
| 36 | 37 | * Return: Always zero. |
| 37 | 38 | */ |
| 38 | −static int apply_pt_wrprotect(pte_t *pte, | |
| 39 | +static int apply_pt_wrprotect(pte_t *pte, pgtable_t token, | |
| 39 | 40 | unsigned long addr, |
| 40 | 41 | struct pfn_range_apply *closure) |
| 41 | 42 | { |
| @@ -77,6 +78,7 @@ struct apply_as_clean { · 35 unmodified lines | ||
| 77 | 78 | /** |
| 78 | 79 | * apply_pt_clean - Leaf pte callback to clean a pte |
| 79 | 80 | * @pte: Pointer to the pte |
| 81 | + * @token: Page table token, see apply_to_pfn_range() | |
| 80 | 82 | * @addr: The virtual page address |
| 81 | 83 | * @closure: Pointer to a struct pfn_range_apply embedded in a |
| 82 | 84 | * struct apply_as_clean |
| @@ -89,7 +91,7 @@ struct apply_as_clean { · 6 unmodified lines | ||
| 89 | 91 | * |
| 90 | 92 | * Return: Always zero. |
| 91 | 93 | */ |
| 92 | −static int apply_pt_clean(pte_t *pte, | |
| 94 | +static int apply_pt_clean(pte_t *pte, pgtable_t token, | |
| 93 | 95 | unsigned long addr, |
| 94 | 96 | struct pfn_range_apply *closure) |
| 95 | 97 | { |
| @@ -2053,7 +2053,7 @@ static int apply_to_pte_range(struct pfn_range_apply *closure, pmd_t *pmd, · 2052 unmodified lines | ||
| 2053 | 2053 | token = pmd_pgtable(*pmd); |
| 2054 | 2054 | |
| 2055 | 2055 | do { |
| 2056 | − err = closure->ptefn(pte++, addr, closure); | |
| 2056 | + err = closure->ptefn(pte++, token, addr, closure); | |
| 2057 | 2057 | if (err) |
| 2058 | 2058 | break; |
| 2059 | 2059 | } while (addr += PAGE_SIZE, addr != end); |
| @@ -2194,14 +2194,14 @@ struct page_range_apply { · 134 unmodified lines | ||
| 2194 | 2194 | * Callback wrapper to enable use of apply_to_pfn_range for |
| 2195 | 2195 | * the apply_to_page_range interface |
| 2196 | 2196 | */ |
| 2197 | −static int apply_to_page_range_wrapper(pte_t *pte, | |
| 2197 | +static int apply_to_page_range_wrapper(pte_t *pte, pgtable_t token, | |
| 2198 | 2198 | unsigned long addr, |
| 2199 | 2199 | struct pfn_range_apply *pter) |
| 2200 | 2200 | { |
| 2201 | 2201 | struct page_range_apply *pra = |
| 2202 | 2202 | container_of(pter, typeof(*pra), pter); |
| 2203 | 2203 | |
| 2204 | − return pra->fn(pte, NULL, addr, pra->data); | |
| 2204 | + return pra->fn(pte, token, addr, pra->data); | |
| 2205 | 2205 | } |
| 2206 | 2206 | |
| 2207 | 2207 | /* |