aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mm/pat.c
diff options
context:
space:
mode:
authorvenkatesh.pallipadi@intel.com <venkatesh.pallipadi@intel.com>2009-01-09 19:13:11 -0500
committerIngo Molnar <mingo@elte.hu>2009-01-13 13:13:01 -0500
commite4b866ed197cef9989348e0479fed8d864ea465b (patch)
tree0420e59a2312f6d1156ec85e6895cf6f322e0c6f /arch/x86/mm/pat.c
parentafc7d20c8429f32f19d47367fdc36eeed2334ec3 (diff)
x86 PAT: change track_pfn_vma_new to take pgprot_t pointer param
Impact: cleanup Change the protection parameter for track_pfn_vma_new() into a pgprot_t pointer. Subsequent patch changes the x86 PAT handling to return a compatible memtype in pgprot_t, if what was requested cannot be allowed due to conflicts. No fuctionality change in this patch. Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/mm/pat.c')
-rw-r--r--arch/x86/mm/pat.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c
index 85cbd3cd3723..f88ac80530c0 100644
--- a/arch/x86/mm/pat.c
+++ b/arch/x86/mm/pat.c
@@ -741,7 +741,7 @@ cleanup_ret:
741 * Note that this function can be called with caller trying to map only a 741 * Note that this function can be called with caller trying to map only a
742 * subrange/page inside the vma. 742 * subrange/page inside the vma.
743 */ 743 */
744int track_pfn_vma_new(struct vm_area_struct *vma, pgprot_t prot, 744int track_pfn_vma_new(struct vm_area_struct *vma, pgprot_t *prot,
745 unsigned long pfn, unsigned long size) 745 unsigned long pfn, unsigned long size)
746{ 746{
747 int retval = 0; 747 int retval = 0;
@@ -758,14 +758,14 @@ int track_pfn_vma_new(struct vm_area_struct *vma, pgprot_t prot,
758 if (is_linear_pfn_mapping(vma)) { 758 if (is_linear_pfn_mapping(vma)) {
759 /* reserve the whole chunk starting from vm_pgoff */ 759 /* reserve the whole chunk starting from vm_pgoff */
760 paddr = (resource_size_t)vma->vm_pgoff << PAGE_SHIFT; 760 paddr = (resource_size_t)vma->vm_pgoff << PAGE_SHIFT;
761 return reserve_pfn_range(paddr, vma_size, prot); 761 return reserve_pfn_range(paddr, vma_size, *prot);
762 } 762 }
763 763
764 /* reserve page by page using pfn and size */ 764 /* reserve page by page using pfn and size */
765 base_paddr = (resource_size_t)pfn << PAGE_SHIFT; 765 base_paddr = (resource_size_t)pfn << PAGE_SHIFT;
766 for (i = 0; i < size; i += PAGE_SIZE) { 766 for (i = 0; i < size; i += PAGE_SIZE) {
767 paddr = base_paddr + i; 767 paddr = base_paddr + i;
768 retval = reserve_pfn_range(paddr, PAGE_SIZE, prot); 768 retval = reserve_pfn_range(paddr, PAGE_SIZE, *prot);
769 if (retval) 769 if (retval)
770 goto cleanup_ret; 770 goto cleanup_ret;
771 } 771 }