Commit 53de0d47 authored by Ralf Baechle's avatar Ralf Baechle

Reformat; cosmetic cleanups.

Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent 1592dac2
...@@ -23,7 +23,8 @@ void (*__flush_cache_all)(void); ...@@ -23,7 +23,8 @@ void (*__flush_cache_all)(void);
void (*flush_cache_mm)(struct mm_struct *mm); void (*flush_cache_mm)(struct mm_struct *mm);
void (*flush_cache_range)(struct vm_area_struct *vma, unsigned long start, void (*flush_cache_range)(struct vm_area_struct *vma, unsigned long start,
unsigned long end); unsigned long end);
void (*flush_cache_page)(struct vm_area_struct *vma, unsigned long page, unsigned long pfn); void (*flush_cache_page)(struct vm_area_struct *vma, unsigned long page,
unsigned long pfn);
void (*flush_icache_range)(unsigned long __user start, void (*flush_icache_range)(unsigned long __user start,
unsigned long __user end); unsigned long __user end);
void (*flush_icache_page)(struct vm_area_struct *vma, struct page *page); void (*flush_icache_page)(struct vm_area_struct *vma, struct page *page);
......
...@@ -54,19 +54,24 @@ extern void (*flush_icache_range)(unsigned long __user start, ...@@ -54,19 +54,24 @@ extern void (*flush_icache_range)(unsigned long __user start,
#define flush_cache_vmap(start, end) flush_cache_all() #define flush_cache_vmap(start, end) flush_cache_all()
#define flush_cache_vunmap(start, end) flush_cache_all() #define flush_cache_vunmap(start, end) flush_cache_all()
#define copy_to_user_page(vma, page, vaddr, dst, src, len) \ static inline void copy_to_user_page(struct vm_area_struct *vma,
do { \ struct page *page, unsigned long vaddr, void *dst, const void *src,
if (cpu_has_dc_aliases) \ unsigned long len)
flush_cache_page(vma, vaddr); \ {
memcpy(dst, (void *) src, len); \ if (cpu_has_dc_aliases)
flush_icache_page(vma, page); \ flush_cache_page(vma, vaddr, page_to_pfn(page));
} while (0) memcpy(dst, src, len);
#define copy_from_user_page(vma, page, vaddr, dst, src, len) \ flush_icache_page(vma, page);
do { \ }
if (cpu_has_dc_aliases) \
flush_cache_page(vma, vaddr); \ static inline void copy_from_user_page(struct vm_area_struct *vma,
memcpy(dst, src, len); \ struct page *page, unsigned long vaddr, void *dst, const void *src,
} while (0) unsigned long len)
{
if (cpu_has_dc_aliases)
flush_cache_page(vma, vaddr, page_to_pfn(page));
memcpy(dst, src, len);
}
extern void (*flush_cache_sigtramp)(unsigned long addr); extern void (*flush_cache_sigtramp)(unsigned long addr);
extern void (*flush_icache_all)(void); extern void (*flush_icache_all)(void);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment