diff options
Diffstat (limited to 'arch/parisc/include/asm/cacheflush.h')
-rw-r--r-- | arch/parisc/include/asm/cacheflush.h | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/arch/parisc/include/asm/cacheflush.h b/arch/parisc/include/asm/cacheflush.h index f0e2784e7cca..2f9b751878ba 100644 --- a/arch/parisc/include/asm/cacheflush.h +++ b/arch/parisc/include/asm/cacheflush.h | |||
@@ -125,42 +125,38 @@ flush_anon_page(struct vm_area_struct *vma, struct page *page, unsigned long vma | |||
125 | void mark_rodata_ro(void); | 125 | void mark_rodata_ro(void); |
126 | #endif | 126 | #endif |
127 | 127 | ||
128 | #ifdef CONFIG_PA8X00 | ||
129 | /* Only pa8800, pa8900 needs this */ | ||
130 | |||
131 | #include <asm/kmap_types.h> | 128 | #include <asm/kmap_types.h> |
132 | 129 | ||
133 | #define ARCH_HAS_KMAP | 130 | #define ARCH_HAS_KMAP |
134 | 131 | ||
135 | void kunmap_parisc(void *addr); | ||
136 | |||
137 | static inline void *kmap(struct page *page) | 132 | static inline void *kmap(struct page *page) |
138 | { | 133 | { |
139 | might_sleep(); | 134 | might_sleep(); |
135 | flush_dcache_page(page); | ||
140 | return page_address(page); | 136 | return page_address(page); |
141 | } | 137 | } |
142 | 138 | ||
143 | static inline void kunmap(struct page *page) | 139 | static inline void kunmap(struct page *page) |
144 | { | 140 | { |
145 | kunmap_parisc(page_address(page)); | 141 | flush_kernel_dcache_page_addr(page_address(page)); |
146 | } | 142 | } |
147 | 143 | ||
148 | static inline void *kmap_atomic(struct page *page) | 144 | static inline void *kmap_atomic(struct page *page) |
149 | { | 145 | { |
150 | pagefault_disable(); | 146 | pagefault_disable(); |
147 | flush_dcache_page(page); | ||
151 | return page_address(page); | 148 | return page_address(page); |
152 | } | 149 | } |
153 | 150 | ||
154 | static inline void __kunmap_atomic(void *addr) | 151 | static inline void __kunmap_atomic(void *addr) |
155 | { | 152 | { |
156 | kunmap_parisc(addr); | 153 | flush_kernel_dcache_page_addr(addr); |
157 | pagefault_enable(); | 154 | pagefault_enable(); |
158 | } | 155 | } |
159 | 156 | ||
160 | #define kmap_atomic_prot(page, prot) kmap_atomic(page) | 157 | #define kmap_atomic_prot(page, prot) kmap_atomic(page) |
161 | #define kmap_atomic_pfn(pfn) kmap_atomic(pfn_to_page(pfn)) | 158 | #define kmap_atomic_pfn(pfn) kmap_atomic(pfn_to_page(pfn)) |
162 | #define kmap_atomic_to_page(ptr) virt_to_page(ptr) | 159 | #define kmap_atomic_to_page(ptr) virt_to_page(ptr) |
163 | #endif | ||
164 | 160 | ||
165 | #endif /* _PARISC_CACHEFLUSH_H */ | 161 | #endif /* _PARISC_CACHEFLUSH_H */ |
166 | 162 | ||