aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mm/pat.c
diff options
context:
space:
mode:
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 }