diff options
author | David S. Miller <davem@davemloft.net> | 2005-11-28 17:02:10 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-28 17:35:36 -0500 |
commit | 5cd9194a1b0b0fa219c31421ac64dfd38670ed49 (patch) | |
tree | 4cd74902103751f10aec30d5a4b0b9af51f42561 /arch/sparc/mm | |
parent | 6aab341e0a28aff100a09831c5300a2994b8b986 (diff) |
[PATCH] sparc: convert IO remapping to VM_PFNMAP
Here are the Sparc bits.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/sparc/mm')
-rw-r--r-- | arch/sparc/mm/generic.c | 10 |
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 | ||
65 | int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from, | 63 | int 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; |