aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2019-07-15 15:16:20 +1000
committerDave Airlie <airlied@redhat.com>2019-07-15 15:16:20 +1000
commit6dfc43d3a19174faead54575c204aee106225f43 (patch)
treeea954860d6282c5017a644c775305a752c8fd2a9 /mm
parentMerge tag 'imx-drm-next-2019-07-05' of git://git.pengutronix.de/git/pza/linux into drm-next (diff)
downloadlinux-dev-6dfc43d3a19174faead54575c204aee106225f43.tar.xz
linux-dev-6dfc43d3a19174faead54575c204aee106225f43.zip
mm: adjust apply_to_pfn_range interface for dropped token.
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 <airlied@redhat.com>
Diffstat (limited to '')
-rw-r--r--mm/as_dirty_helpers.c6
-rw-r--r--mm/memory.c6
2 files changed, 5 insertions, 7 deletions
diff --git a/mm/as_dirty_helpers.c b/mm/as_dirty_helpers.c
index f600e31534fb..6352a3729408 100644
--- a/mm/as_dirty_helpers.c
+++ b/mm/as_dirty_helpers.c
@@ -26,7 +26,6 @@ struct apply_as {
/**
* 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
@@ -36,7 +35,7 @@ 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)
{
@@ -78,7 +77,6 @@ struct apply_as_clean {
/**
* 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
@@ -91,7 +89,7 @@ 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)
{
diff --git a/mm/memory.c b/mm/memory.c
index 462aa47f8878..b8218e962231 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -2053,7 +2053,7 @@ static int apply_to_pte_range(struct pfn_range_apply *closure, pmd_t *pmd,
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);
@@ -2194,14 +2194,14 @@ struct page_range_apply {
* 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);
}
/*