History

Revert "mm: adjust apply_to_pfn_range interface for dropped token."

This reverts commit 6dfc43d3a19174faead54575c204aee106225f43. Going to revert the whole vmwwgfx pull.

Dave Airlie committed 7 years ago

Commit 7e4b4df1 parent 6dfc43d3 files · +8 −6Browse files

Unified · Split

3 files
  1. include/linux/mm.h +1 −1
  2. mm/as_dirty_helpers.c +4 −2
  3. mm/memory.c +3 −3
include/linux/mm.h+1−1
@@ -2687,7 +2687,7 @@ extern int apply_to_page_range(struct mm_struct *mm, unsigned long address, · 2686 unmodified lines
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+4−2
@@ -26,6 +26,7 @@ struct apply_as { · 25 unmodified lines
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 { · 3 unmodified lines
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 { · 35 unmodified lines
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 { · 6 unmodified lines
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+3−3
@@ -2053,7 +2053,7 @@ static int apply_to_pte_range(struct pfn_range_apply *closure, pmd_t *pmd, · 2052 unmodified lines
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 { · 134 unmodified lines
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 /*

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t