diff options
Diffstat (limited to 'arch/x86/include/asm/cacheflush.h')
-rw-r--r-- | arch/x86/include/asm/cacheflush.h | 53 |
1 files changed, 36 insertions, 17 deletions
diff --git a/arch/x86/include/asm/cacheflush.h b/arch/x86/include/asm/cacheflush.h index 2f8466540fb5..5b301b7ff5f4 100644 --- a/arch/x86/include/asm/cacheflush.h +++ b/arch/x86/include/asm/cacheflush.h | |||
@@ -5,24 +5,43 @@ | |||
5 | #include <linux/mm.h> | 5 | #include <linux/mm.h> |
6 | 6 | ||
7 | /* Caches aren't brain-dead on the intel. */ | 7 | /* Caches aren't brain-dead on the intel. */ |
8 | #define flush_cache_all() do { } while (0) | 8 | static inline void flush_cache_all(void) { } |
9 | #define flush_cache_mm(mm) do { } while (0) | 9 | static inline void flush_cache_mm(struct mm_struct *mm) { } |
10 | #define flush_cache_dup_mm(mm) do { } while (0) | 10 | static inline void flush_cache_dup_mm(struct mm_struct *mm) { } |
11 | #define flush_cache_range(vma, start, end) do { } while (0) | 11 | static inline void flush_cache_range(struct vm_area_struct *vma, |
12 | #define flush_cache_page(vma, vmaddr, pfn) do { } while (0) | 12 | unsigned long start, unsigned long end) { } |
13 | #define flush_dcache_page(page) do { } while (0) | 13 | static inline void flush_cache_page(struct vm_area_struct *vma, |
14 | #define flush_dcache_mmap_lock(mapping) do { } while (0) | 14 | unsigned long vmaddr, unsigned long pfn) { } |
15 | #define flush_dcache_mmap_unlock(mapping) do { } while (0) | 15 | static inline void flush_dcache_page(struct page *page) { } |
16 | #define flush_icache_range(start, end) do { } while (0) | 16 | static inline void flush_dcache_mmap_lock(struct address_space *mapping) { } |
17 | #define flush_icache_page(vma, pg) do { } while (0) | 17 | static inline void flush_dcache_mmap_unlock(struct address_space *mapping) { } |
18 | #define flush_icache_user_range(vma, pg, adr, len) do { } while (0) | 18 | static inline void flush_icache_range(unsigned long start, |
19 | #define flush_cache_vmap(start, end) do { } while (0) | 19 | unsigned long end) { } |
20 | #define flush_cache_vunmap(start, end) do { } while (0) | 20 | static inline void flush_icache_page(struct vm_area_struct *vma, |
21 | struct page *page) { } | ||
22 | static inline void flush_icache_user_range(struct vm_area_struct *vma, | ||
23 | struct page *page, | ||
24 | unsigned long addr, | ||
25 | unsigned long len) { } | ||
26 | static inline void flush_cache_vmap(unsigned long start, unsigned long end) { } | ||
27 | static inline void flush_cache_vunmap(unsigned long start, | ||
28 | unsigned long end) { } | ||
21 | 29 | ||
22 | #define copy_to_user_page(vma, page, vaddr, dst, src, len) \ | 30 | static inline void copy_to_user_page(struct vm_area_struct *vma, |
23 | memcpy((dst), (src), (len)) | 31 | struct page *page, unsigned long vaddr, |
24 | #define copy_from_user_page(vma, page, vaddr, dst, src, len) \ | 32 | void *dst, const void *src, |
25 | memcpy((dst), (src), (len)) | 33 | unsigned long len) |
34 | { | ||
35 | memcpy(dst, src, len); | ||
36 | } | ||
37 | |||
38 | static inline void copy_from_user_page(struct vm_area_struct *vma, | ||
39 | struct page *page, unsigned long vaddr, | ||
40 | void *dst, const void *src, | ||
41 | unsigned long len) | ||
42 | { | ||
43 | memcpy(dst, src, len); | ||
44 | } | ||
26 | 45 | ||
27 | #define PG_non_WB PG_arch_1 | 46 | #define PG_non_WB PG_arch_1 |
28 | PAGEFLAG(NonWB, non_WB) | 47 | PAGEFLAG(NonWB, non_WB) |