From b9ba685d18e0fe66895921467915134550202ba2 Mon Sep 17 00:00:00 2001 From: nbd Date: Tue, 17 Jul 2012 11:35:02 -0400 Subject: [PATCH 009/123] 309-mips_fuse_workaround Import of the above patch from openwrt trunk, as of this commit: ---------- commit c1d79f64eed0a7ac36b5b9bca52275b397bec424 Author: nbd Date: Mon Jul 16 16:26:51 2012 +0000 uboot-ar71xx: fix compile on recent mac os x versions git-svn-id: svn://svn.openwrt.org/openwrt/trunk@32750 3c298f89-4303-0410-b956-a3cf2f4a3e73 ---------- Path to patch in the repo is: target/linux/generic/patches-3.3 Repo is: git://nbd.name/openwrt.git Signed-off-by: Paul Gortmaker --- arch/mips/mm/cache.c | 1 + fs/fuse/dev.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/arch/mips/mm/cache.c b/arch/mips/mm/cache.c index 829320c..ef83ef1 100644 --- a/arch/mips/mm/cache.c +++ b/arch/mips/mm/cache.c @@ -39,6 +39,7 @@ void (*__flush_kernel_vmap_range)(unsigned long vaddr, int size); void (*__invalidate_kernel_vmap_range)(unsigned long vaddr, int size); EXPORT_SYMBOL_GPL(__flush_kernel_vmap_range); +EXPORT_SYMBOL(__flush_cache_all); /* MIPS specific cache operations */ void (*flush_cache_sigtramp)(unsigned long addr); diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index 7df2b5e..ce47050 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c @@ -19,6 +19,9 @@ #include #include #include +#ifdef CONFIG_MIPS +#include +#endif MODULE_ALIAS_MISCDEV(FUSE_MINOR); MODULE_ALIAS("devname:fuse"); @@ -655,6 +658,9 @@ static int fuse_copy_fill(struct fuse_copy_state *cs) static int fuse_copy_do(struct fuse_copy_state *cs, void **val, unsigned *size) { unsigned ncpy = min(*size, cs->len); +#ifdef CONFIG_MIPS + __flush_cache_all(); +#endif if (val) { if (cs->write) memcpy(cs->buf, *val, ncpy); -- 1.7.9.7