kernel: add support for kernel 5.4
[openwrt/staging/hauke.git] / target / linux / generic / hack-5.4 / 300-MIPS-r4k_cache-use-more-efficient-cache-blast.patch
index c07ccf9474e0e9947f97ce68c9eeee0b02204ace..aed08a5ec9d86fbbf4f3f83527b5395916057c24 100644 (file)
@@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 ---
 --- a/arch/mips/include/asm/r4kcache.h
 +++ b/arch/mips/include/asm/r4kcache.h
-@@ -683,16 +683,48 @@ static inline void prot##extra##blast_##
+@@ -617,14 +617,46 @@ static inline void prot##extra##blast_##
                                                    unsigned long end)  \
  {                                                                     \
        unsigned long lsize = cpu_##desc##_line_size();                 \
@@ -26,8 +26,6 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 +      unsigned long aend = (end + lsize - 1) & ~(lsize - 1);          \
 +      int lines = (aend - addr) / lsize;                              \
                                                                        \
-       __##pfx##flush_prologue                                         \
-                                                                       \
 -      while (1) {                                                     \
 +      while (lines >= 8) {                                            \
 +              prot##cache_op(hitop, addr);                            \
@@ -62,5 +60,5 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 -                      break;                                          \
 -              addr += lsize;                                          \
        }                                                               \
-                                                                       \
-       __##pfx##flush_epilogue                                         \
+ }