Skip to content

Commit 7e4b4df

Browse files
committed
Revert "mm: adjust apply_to_pfn_range interface for dropped token."
This reverts commit 6dfc43d. Going to revert the whole vmwwgfx pull. Signed-off-by: Dave Airlie <[email protected]>
1 parent 6dfc43d commit 7e4b4df

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

include/linux/mm.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2687,7 +2687,7 @@ extern int apply_to_page_range(struct mm_struct *mm, unsigned long address,
26872687
unsigned long size, pte_fn_t fn, void *data);
26882688

26892689
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,
26912691
struct pfn_range_apply *closure);
26922692
struct pfn_range_apply {
26932693
struct mm_struct *mm;

mm/as_dirty_helpers.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ struct apply_as {
2626
/**
2727
* apply_pt_wrprotect - Leaf pte callback to write-protect a pte
2828
* @pte: Pointer to the pte
29+
* @token: Page table token, see apply_to_pfn_range()
2930
* @addr: The virtual page address
3031
* @closure: Pointer to a struct pfn_range_apply embedded in a
3132
* struct apply_as
@@ -35,7 +36,7 @@ struct apply_as {
3536
*
3637
* Return: Always zero.
3738
*/
38-
static int apply_pt_wrprotect(pte_t *pte,
39+
static int apply_pt_wrprotect(pte_t *pte, pgtable_t token,
3940
unsigned long addr,
4041
struct pfn_range_apply *closure)
4142
{
@@ -77,6 +78,7 @@ struct apply_as_clean {
7778
/**
7879
* apply_pt_clean - Leaf pte callback to clean a pte
7980
* @pte: Pointer to the pte
81+
* @token: Page table token, see apply_to_pfn_range()
8082
* @addr: The virtual page address
8183
* @closure: Pointer to a struct pfn_range_apply embedded in a
8284
* struct apply_as_clean
@@ -89,7 +91,7 @@ struct apply_as_clean {
8991
*
9092
* Return: Always zero.
9193
*/
92-
static int apply_pt_clean(pte_t *pte,
94+
static int apply_pt_clean(pte_t *pte, pgtable_t token,
9395
unsigned long addr,
9496
struct pfn_range_apply *closure)
9597
{

mm/memory.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2053,7 +2053,7 @@ static int apply_to_pte_range(struct pfn_range_apply *closure, pmd_t *pmd,
20532053
token = pmd_pgtable(*pmd);
20542054

20552055
do {
2056-
err = closure->ptefn(pte++, addr, closure);
2056+
err = closure->ptefn(pte++, token, addr, closure);
20572057
if (err)
20582058
break;
20592059
} while (addr += PAGE_SIZE, addr != end);
@@ -2194,14 +2194,14 @@ struct page_range_apply {
21942194
* Callback wrapper to enable use of apply_to_pfn_range for
21952195
* the apply_to_page_range interface
21962196
*/
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,
21982198
unsigned long addr,
21992199
struct pfn_range_apply *pter)
22002200
{
22012201
struct page_range_apply *pra =
22022202
container_of(pter, typeof(*pra), pter);
22032203

2204-
return pra->fn(pte, NULL, addr, pra->data);
2204+
return pra->fn(pte, token, addr, pra->data);
22052205
}
22062206

22072207
/*

0 commit comments

Comments
 (0)