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
2687 unsigned long size, pte_fn_t fn, void *data);2687 unsigned long size, pte_fn_t fn, void *data);
2688 2688
2689struct pfn_range_apply;2689struct pfn_range_apply;
2690typedef int (*pter_fn_t)(pte_t *pte, unsigned long addr,2690typedef 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);
2692struct pfn_range_apply {2692struct pfn_range_apply {
2693 struct mm_struct *mm;2693 struct mm_struct *mm;
mm/as_dirty_helpers.c+4−2
@@ -26,6 +26,7 @@ struct apply_as { · 25 unmodified lines
26/**26/**
27 * apply_pt_wrprotect - Leaf pte callback to write-protect a pte27 * apply_pt_wrprotect - Leaf pte callback to write-protect a pte
28 * @pte: Pointer to the pte28 * @pte: Pointer to the pte
29 * @token: Page table token, see apply_to_pfn_range()
29 * @addr: The virtual page address30 * @addr: The virtual page address
30 * @closure: Pointer to a struct pfn_range_apply embedded in a31 * @closure: Pointer to a struct pfn_range_apply embedded in a
31 * struct apply_as32 * 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 */
38static int apply_pt_wrprotect(pte_t *pte,39static 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 pte79 * apply_pt_clean - Leaf pte callback to clean a pte
79 * @pte: Pointer to the pte80 * @pte: Pointer to the pte
81 * @token: Page table token, see apply_to_pfn_range()
80 * @addr: The virtual page address82 * @addr: The virtual page address
81 * @closure: Pointer to a struct pfn_range_apply embedded in a83 * @closure: Pointer to a struct pfn_range_apply embedded in a
82 * struct apply_as_clean84 * 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 */
92static int apply_pt_clean(pte_t *pte,94static 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{
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
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 for2194 * Callback wrapper to enable use of apply_to_pfn_range for
2195 * the apply_to_page_range interface2195 * the apply_to_page_range interface
2196 */2196 */
2197static int apply_to_page_range_wrapper(pte_t *pte,2197static 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/*

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