309-mips_fuse_workaround.patch 953 B

1234567891011121314151617181920212223242526272829303132
  1. --- a/arch/mips/mm/cache.c
  2. +++ b/arch/mips/mm/cache.c
  3. @@ -38,6 +38,7 @@ void (*__flush_cache_vunmap)(void);
  4. void (*__flush_kernel_vmap_range)(unsigned long vaddr, int size);
  5. EXPORT_SYMBOL_GPL(__flush_kernel_vmap_range);
  6. +EXPORT_SYMBOL(__flush_cache_all);
  7. void (*__invalidate_kernel_vmap_range)(unsigned long vaddr, int size);
  8. /* MIPS specific cache operations */
  9. --- a/fs/fuse/dev.c
  10. +++ b/fs/fuse/dev.c
  11. @@ -20,6 +20,9 @@
  12. #include <linux/swap.h>
  13. #include <linux/splice.h>
  14. #include <linux/aio.h>
  15. +#ifdef CONFIG_MIPS
  16. +#include <asm/cacheflush.h>
  17. +#endif
  18. MODULE_ALIAS_MISCDEV(FUSE_MINOR);
  19. MODULE_ALIAS("devname:fuse");
  20. @@ -749,6 +752,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. void *pgaddr = kmap_atomic(cs->pg);
  29. void *buf = pgaddr + cs->offset;