mm/pgtable: drop pgtable_t variable from pte_fn_t functions
drops the token came in via the hmm tree, this caused lots of
conflicts, but applying this cleanup patch should reduce it
to something easier to handle. Just accept the token is unused
at this point.
Signed-off-by: Dave Airlie <[email protected]>
unsigned long size, pte_fn_t fn, void *data);
struct pfn_range_apply;
-typedef int (*pter_fn_t)(pte_t *pte, pgtable_t token, unsigned long addr,
+typedef int (*pter_fn_t)(pte_t *pte, unsigned long addr,
struct pfn_range_apply *closure);
struct pfn_range_apply {
struct mm_struct *mm;
/**
* apply_pt_wrprotect - Leaf pte callback to write-protect a pte
* @pte: Pointer to the pte
- * @token: Page table token, see apply_to_pfn_range()
* @addr: The virtual page address
* @closure: Pointer to a struct pfn_range_apply embedded in a
* struct apply_as
*
* Return: Always zero.
*/
-static int apply_pt_wrprotect(pte_t *pte, pgtable_t token,
+static int apply_pt_wrprotect(pte_t *pte,
unsigned long addr,
struct pfn_range_apply *closure)
{
/**
* apply_pt_clean - Leaf pte callback to clean a pte
* @pte: Pointer to the pte
- * @token: Page table token, see apply_to_pfn_range()
* @addr: The virtual page address
* @closure: Pointer to a struct pfn_range_apply embedded in a
* struct apply_as_clean
*
* Return: Always zero.
*/
-static int apply_pt_clean(pte_t *pte, pgtable_t token,
+static int apply_pt_clean(pte_t *pte,
unsigned long addr,
struct pfn_range_apply *closure)
{
token = pmd_pgtable(*pmd);
do {
- err = closure->ptefn(pte++, token, addr, closure);
+ err = closure->ptefn(pte++, addr, closure);
if (err)
break;
} while (addr += PAGE_SIZE, addr != end);
* Callback wrapper to enable use of apply_to_pfn_range for
* the apply_to_page_range interface
*/
-static int apply_to_page_range_wrapper(pte_t *pte, pgtable_t token,
+static int apply_to_page_range_wrapper(pte_t *pte,
unsigned long addr,
struct pfn_range_apply *pter)
{
struct page_range_apply *pra =
container_of(pter, typeof(*pra), pter);
- return pra->fn(pte, token, addr, pra->data);
+ return pra->fn(pte, NULL, addr, pra->data);
}
/*