From e17ab6fc5ce882a6b6e578a5a3af245669b7b583 Mon Sep 17 00:00:00 2001 From: nbd Date: Tue, 17 Jul 2012 11:35:02 -0400 Subject: [PATCH 08/76] 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 | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/arch/mips/mm/cache.c b/arch/mips/mm/cache.c index 5aeb3eb..cfbd8ca 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 1d55f94..c6ac59b 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c @@ -21,6 +21,10 @@ #include #include +#ifdef CONFIG_MIPS +#include +#endif + MODULE_ALIAS_MISCDEV(FUSE_MINOR); MODULE_ALIAS("devname:fuse"); @@ -759,6 +763,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.10.4