aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/mm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc/mm')
-rw-r--r--arch/sparc/mm/generic.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/sparc/mm/generic.c b/arch/sparc/mm/generic.c
index 0410bae681f8..2cb0728cee05 100644
--- a/arch/sparc/mm/generic.c
+++ b/arch/sparc/mm/generic.c
@@ -32,9 +32,7 @@ static inline void io_remap_pte_range(struct mm_struct *mm, pte_t * pte, unsigne
32 if (end > PMD_SIZE) 32 if (end > PMD_SIZE)
33 end = PMD_SIZE; 33 end = PMD_SIZE;
34 do { 34 do {
35 pte_t oldpage = *pte; 35 set_pte_at(mm, address, pte, mk_pte_io(offset, prot, space));
36 pte_clear(mm, address, pte);
37 set_pte(pte, mk_pte_io(offset, prot, space));
38 address += PAGE_SIZE; 36 address += PAGE_SIZE;
39 offset += PAGE_SIZE; 37 offset += PAGE_SIZE;
40 pte++; 38 pte++;
@@ -63,7 +61,7 @@ static inline int io_remap_pmd_range(struct mm_struct *mm, pmd_t * pmd, unsigned
63} 61}
64 62
65int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from, 63int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from,
66 unsigned long pfn, unsigned long size, pgprot_t prot) 64 unsigned long pfn, unsigned long size, pgprot_t prot)
67{ 65{
68 int error = 0; 66 int error = 0;
69 pgd_t * dir; 67 pgd_t * dir;
@@ -74,7 +72,9 @@ int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from,
74 unsigned long offset = GET_PFN(pfn) << PAGE_SHIFT; 72 unsigned long offset = GET_PFN(pfn) << PAGE_SHIFT;
75 73
76 /* See comment in mm/memory.c remap_pfn_range */ 74 /* See comment in mm/memory.c remap_pfn_range */
77 vma->vm_flags |= VM_IO | VM_RESERVED | VM_UNPAGED; 75 vma->vm_flags |= VM_IO | VM_RESERVED | VM_PFNMAP;
76 vma->vm_pgoff = (offset >> PAGE_SHIFT) |
77 ((unsigned long)space << 28UL);
78 78
79 prot = __pgprot(pg_iobits); 79 prot = __pgprot(pg_iobits);
80 offset -= from; 80 offset -= from;