X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Fasm-mips%2Fr4kcache.h;h=da03a32c1ca785ed8b1b10d3811f8da8fb41153b;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=8a12fb6b07de5264d40ed18be96c613c2aab69bf;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/include/asm-mips/r4kcache.h b/include/asm-mips/r4kcache.h index 8a12fb6b0..da03a32c1 100644 --- a/include/asm-mips/r4kcache.h +++ b/include/asm-mips/r4kcache.h @@ -26,7 +26,7 @@ * - We need a properly sign extended address for 64-bit code. To get away * without ifdefs we let the compiler do it by a type cast. */ -#define INDEX_BASE ((int) KSEG0) +#define INDEX_BASE CKSEG0 #define cache_op(op,addr) \ __asm__ __volatile__( \ @@ -117,6 +117,21 @@ static inline void protected_writeback_dcache_line(unsigned long addr) : "i" (Hit_Writeback_Inv_D), "r" (addr)); } +static inline void protected_writeback_scache_line(unsigned long addr) +{ + __asm__ __volatile__( + ".set noreorder\n\t" + ".set mips3\n" + "1:\tcache %0,(%1)\n" + "2:\t.set mips0\n\t" + ".set reorder\n\t" + ".section\t__ex_table,\"a\"\n\t" + STR(PTR)"\t1b,2b\n\t" + ".previous" + : + : "i" (Hit_Writeback_Inv_SD), "r" (addr)); +} + /* * This one is RM7000-specific */