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 | unsigned long size, pte_fn_t fn, void *data); | 2687 | unsigned long size, pte_fn_t fn, void *data); |
| 2688 | 2688 | ||
| 2689 | struct pfn_range_apply; | 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 | struct pfn_range_apply *closure); | 2691 | struct pfn_range_apply *closure); |
| 2692 | struct pfn_range_apply { | 2692 | struct pfn_range_apply { |
| 2693 | struct mm_struct *mm; | 2693 | struct mm_struct *mm; |
| @@ -26,6 +26,7 @@ struct apply_as { · 25 unmodified lines | |||
| 26 | /** | 26 | /** |
| 27 | * apply_pt_wrprotect - Leaf pte callback to write-protect a pte | 27 | * apply_pt_wrprotect - Leaf pte callback to write-protect a pte |
| 28 | * @pte: Pointer to the pte | 28 | * @pte: Pointer to the pte |
| 29 | * @token: Page table token, see apply_to_pfn_range() | ||
| 29 | * @addr: The virtual page address | 30 | * @addr: The virtual page address |
| 30 | * @closure: Pointer to a struct pfn_range_apply embedded in a | 31 | * @closure: Pointer to a struct pfn_range_apply embedded in a |
| 31 | * struct apply_as | 32 | * struct apply_as |
| @@ -35,7 +36,7 @@ struct apply_as { · 3 unmodified lines | |||
| 35 | * | 36 | * |
| 36 | * Return: Always zero. | 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 | unsigned long addr, | 40 | unsigned long addr, |
| 40 | struct pfn_range_apply *closure) | 41 | struct pfn_range_apply *closure) |
| 41 | { | 42 | { |
| @@ -77,6 +78,7 @@ struct apply_as_clean { · 35 unmodified lines | |||
| 77 | /** | 78 | /** |
| 78 | * apply_pt_clean - Leaf pte callback to clean a pte | 79 | * apply_pt_clean - Leaf pte callback to clean a pte |
| 79 | * @pte: Pointer to the pte | 80 | * @pte: Pointer to the pte |
| 81 | * @token: Page table token, see apply_to_pfn_range() | ||
| 80 | * @addr: The virtual page address | 82 | * @addr: The virtual page address |
| 81 | * @closure: Pointer to a struct pfn_range_apply embedded in a | 83 | * @closure: Pointer to a struct pfn_range_apply embedded in a |
| 82 | * struct apply_as_clean | 84 | * struct apply_as_clean |
| @@ -89,7 +91,7 @@ struct apply_as_clean { · 6 unmodified lines | |||
| 89 | * | 91 | * |
| 90 | * Return: Always zero. | 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 | unsigned long addr, | 95 | unsigned long addr, |
| 94 | struct pfn_range_apply *closure) | 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 | token = pmd_pgtable(*pmd); | 2053 | token = pmd_pgtable(*pmd); |
| 2054 | 2054 | ||
| 2055 | do { | 2055 | do { |
| 2056 | err = closure->ptefn(pte++, addr, closure); | 2056 | err = closure->ptefn(pte++, token, addr, closure); |
| 2057 | if (err) | 2057 | if (err) |
| 2058 | break; | 2058 | break; |
| 2059 | } while (addr += PAGE_SIZE, addr != end); | 2059 | } while (addr += PAGE_SIZE, addr != end); |
| @@ -2194,14 +2194,14 @@ struct page_range_apply { · 134 unmodified lines | |||
| 2194 | * Callback wrapper to enable use of apply_to_pfn_range for | 2194 | * Callback wrapper to enable use of apply_to_pfn_range for |
| 2195 | * the apply_to_page_range interface | 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 | unsigned long addr, | 2198 | unsigned long addr, |
| 2199 | struct pfn_range_apply *pter) | 2199 | struct pfn_range_apply *pter) |
| 2200 | { | 2200 | { |
| 2201 | struct page_range_apply *pra = | 2201 | struct page_range_apply *pra = |
| 2202 | container_of(pter, typeof(*pra), pter); | 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 | /* |