| .. | .. |
|---|
| 4 | 4 | |
|---|
| 5 | 5 | #include <linux/mm.h> |
|---|
| 6 | 6 | |
|---|
| 7 | | -/* Caches aren't brain-dead on the Alpha. */ |
|---|
| 8 | | -#define flush_cache_all() do { } while (0) |
|---|
| 9 | | -#define flush_cache_mm(mm) do { } while (0) |
|---|
| 10 | | -#define flush_cache_dup_mm(mm) do { } while (0) |
|---|
| 11 | | -#define flush_cache_range(vma, start, end) do { } while (0) |
|---|
| 12 | | -#define flush_cache_page(vma, vmaddr, pfn) do { } while (0) |
|---|
| 13 | | -#define ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE 0 |
|---|
| 14 | | -#define flush_dcache_page(page) do { } while (0) |
|---|
| 15 | | -#define flush_dcache_mmap_lock(mapping) do { } while (0) |
|---|
| 16 | | -#define flush_dcache_mmap_unlock(mapping) do { } while (0) |
|---|
| 17 | | -#define flush_cache_vmap(start, end) do { } while (0) |
|---|
| 18 | | -#define flush_cache_vunmap(start, end) do { } while (0) |
|---|
| 19 | | - |
|---|
| 20 | 7 | /* Note that the following two definitions are _highly_ dependent |
|---|
| 21 | 8 | on the contexts in which they are used in the kernel. I personally |
|---|
| 22 | 9 | think it is criminal how loosely defined these macros are. */ |
|---|
| .. | .. |
|---|
| 48 | 35 | |
|---|
| 49 | 36 | extern void __load_new_mm_context(struct mm_struct *); |
|---|
| 50 | 37 | static inline void |
|---|
| 51 | | -flush_icache_user_range(struct vm_area_struct *vma, struct page *page, |
|---|
| 38 | +flush_icache_user_page(struct vm_area_struct *vma, struct page *page, |
|---|
| 52 | 39 | unsigned long addr, int len) |
|---|
| 53 | 40 | { |
|---|
| 54 | 41 | if (vma->vm_flags & VM_EXEC) { |
|---|
| .. | .. |
|---|
| 59 | 46 | mm->context[smp_processor_id()] = 0; |
|---|
| 60 | 47 | } |
|---|
| 61 | 48 | } |
|---|
| 62 | | -#else |
|---|
| 63 | | -extern void flush_icache_user_range(struct vm_area_struct *vma, |
|---|
| 49 | +#define flush_icache_user_page flush_icache_user_page |
|---|
| 50 | +#else /* CONFIG_SMP */ |
|---|
| 51 | +extern void flush_icache_user_page(struct vm_area_struct *vma, |
|---|
| 64 | 52 | struct page *page, unsigned long addr, int len); |
|---|
| 65 | | -#endif |
|---|
| 53 | +#define flush_icache_user_page flush_icache_user_page |
|---|
| 54 | +#endif /* CONFIG_SMP */ |
|---|
| 66 | 55 | |
|---|
| 67 | 56 | /* This is used only in __do_fault and do_swap_page. */ |
|---|
| 68 | 57 | #define flush_icache_page(vma, page) \ |
|---|
| 69 | | - flush_icache_user_range((vma), (page), 0, 0) |
|---|
| 58 | + flush_icache_user_page((vma), (page), 0, 0) |
|---|
| 70 | 59 | |
|---|
| 71 | | -#define copy_to_user_page(vma, page, vaddr, dst, src, len) \ |
|---|
| 72 | | -do { memcpy(dst, src, len); \ |
|---|
| 73 | | - flush_icache_user_range(vma, page, vaddr, len); \ |
|---|
| 74 | | -} while (0) |
|---|
| 75 | | -#define copy_from_user_page(vma, page, vaddr, dst, src, len) \ |
|---|
| 76 | | - memcpy(dst, src, len) |
|---|
| 60 | +#include <asm-generic/cacheflush.h> |
|---|
| 77 | 61 | |
|---|
| 78 | 62 | #endif /* _ALPHA_CACHEFLUSH_H */ |
|---|