309-mips_fuse_workaround.patch 924 B

1234567891011121314151617181920212223242526272829303132
  1. --- a/arch/mips/mm/cache.c
  2. +++ b/arch/mips/mm/cache.c
  3. @@ -39,6 +39,7 @@ void (*__flush_kernel_vmap_range)(unsign
  4. void (*__invalidate_kernel_vmap_range)(unsigned long vaddr, int size);
  5. EXPORT_SYMBOL_GPL(__flush_kernel_vmap_range);
  6. +EXPORT_SYMBOL(__flush_cache_all);
  7. /* MIPS specific cache operations */
  8. void (*flush_cache_sigtramp)(unsigned long addr);
  9. --- a/fs/fuse/dev.c
  10. +++ b/fs/fuse/dev.c
  11. @@ -19,6 +19,9 @@
  12. #include <linux/pipe_fs_i.h>
  13. #include <linux/swap.h>
  14. #include <linux/splice.h>
  15. +#ifdef CONFIG_MIPS
  16. +#include <asm/cacheflush.h>
  17. +#endif
  18. MODULE_ALIAS_MISCDEV(FUSE_MINOR);
  19. MODULE_ALIAS("devname:fuse");
  20. @@ -654,6 +657,9 @@ static int fuse_copy_fill(struct fuse_co
  21. static int fuse_copy_do(struct fuse_copy_state *cs, void **val, unsigned *size)
  22. {
  23. unsigned ncpy = min(*size, cs->len);
  24. +#ifdef CONFIG_MIPS
  25. + __flush_cache_all();
  26. +#endif
  27. if (val) {
  28. if (cs->write)
  29. memcpy(cs->buf, *val, ncpy);