From: Dan Williams <dan.j.williams@intel.com>
To: linux-nvdimm@lists.01.org
Cc: linux-mm@kvack.org, akpm@linux-foundation.org,
linux-kernel@vger.kernel.org
Subject: [PATCH 5/5] mm: cleanup pfn_t usage in track_pfn_insert()
Date: Tue, 06 Sep 2016 09:49:47 -0700 [thread overview]
Message-ID: <147318058712.30325.12749411762275637099.stgit@dwillia2-desk3.amr.corp.intel.com> (raw)
In-Reply-To: <147318056046.30325.5100892122988191500.stgit@dwillia2-desk3.amr.corp.intel.com>
Now that track_pfn_insert() is no longer used in the DAX path, it no
longer needs to comprehend pfn_t values.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
arch/x86/mm/pat.c | 4 ++--
include/asm-generic/pgtable.h | 4 ++--
mm/memory.c | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c
index ecb1b69c1651..e8aed3a30e29 100644
--- a/arch/x86/mm/pat.c
+++ b/arch/x86/mm/pat.c
@@ -971,7 +971,7 @@ int track_pfn_remap(struct vm_area_struct *vma, pgprot_t *prot,
}
int track_pfn_insert(struct vm_area_struct *vma, pgprot_t *prot,
- pfn_t pfn)
+ unsigned long pfn)
{
enum page_cache_mode pcm;
@@ -979,7 +979,7 @@ int track_pfn_insert(struct vm_area_struct *vma, pgprot_t *prot,
return 0;
/* Set prot based on lookup */
- pcm = lookup_memtype(pfn_t_to_phys(pfn));
+ pcm = lookup_memtype(PFN_PHYS(pfn));
*prot = __pgprot((pgprot_val(*prot) & (~_PAGE_CACHE_MASK)) |
cachemode2protval(pcm));
diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h
index d4458b6dbfb4..f9a4f708227d 100644
--- a/include/asm-generic/pgtable.h
+++ b/include/asm-generic/pgtable.h
@@ -559,7 +559,7 @@ static inline int track_pfn_remap(struct vm_area_struct *vma, pgprot_t *prot,
* by vm_insert_pfn().
*/
static inline int track_pfn_insert(struct vm_area_struct *vma, pgprot_t *prot,
- pfn_t pfn)
+ unsigned long pfn)
{
return 0;
}
@@ -594,7 +594,7 @@ extern int track_pfn_remap(struct vm_area_struct *vma, pgprot_t *prot,
unsigned long pfn, unsigned long addr,
unsigned long size);
extern int track_pfn_insert(struct vm_area_struct *vma, pgprot_t *prot,
- pfn_t pfn);
+ unsigned long pfn);
extern int track_pfn_copy(struct vm_area_struct *vma);
extern void untrack_pfn(struct vm_area_struct *vma, unsigned long pfn,
unsigned long size);
diff --git a/mm/memory.c b/mm/memory.c
index 83be99d9d8a1..5d4826a28e3f 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -1637,7 +1637,7 @@ int vm_insert_pfn_prot(struct vm_area_struct *vma, unsigned long addr,
if (addr < vma->vm_start || addr >= vma->vm_end)
return -EFAULT;
- if (track_pfn_insert(vma, &pgprot, __pfn_to_pfn_t(pfn, PFN_DEV)))
+ if (track_pfn_insert(vma, &pgprot, pfn))
return -EINVAL;
ret = insert_pfn(vma, addr, __pfn_to_pfn_t(pfn, PFN_DEV), pgprot);
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2016-09-06 16:52 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-06 16:49 [PATCH 0/5] device-dax and huge-page dax fixes for 4.8-rc6 Dan Williams
2016-09-06 16:49 ` [PATCH 1/5] dax: fix mapping size check Dan Williams
2016-09-06 16:49 ` [PATCH 2/5] dax: fix offset to physical address translation Dan Williams
2016-09-10 1:00 ` Dan Williams
2016-09-06 16:49 ` [PATCH 3/5] mm: fix show_smap() for zone_device-pmd ranges Dan Williams
2016-09-06 20:16 ` Andrew Morton
2016-09-06 16:49 ` [PATCH 4/5] mm: fix cache mode of dax pmd mappings Dan Williams
2016-09-06 17:20 ` Matthew Wilcox
2016-09-06 17:32 ` Dan Williams
2016-09-06 20:17 ` Andrew Morton
2016-09-06 21:52 ` Dan Williams
2016-09-07 19:39 ` Kani, Toshimitsu
2016-09-07 19:45 ` Dan Williams
2016-09-06 16:49 ` Dan Williams [this message]
2016-09-06 20:20 ` [PATCH 5/5] mm: cleanup pfn_t usage in track_pfn_insert() Andrew Morton
2016-09-06 20:30 ` Dan Williams
2016-09-07 5:12 ` Anshuman Khandual
2016-09-07 15:47 ` Dan Williams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=147318058712.30325.12749411762275637099.stgit@dwillia2-desk3.amr.corp.intel.com \
--to=dan.j.williams@intel.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-nvdimm@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox