Ralf Baechle wrote: >>+static void r5k_dma_cache_wback_inv_sc(unsigned long addr, unsigned long size) >>+static void r5k_dma_cache_inv_sc(unsigned long addr, unsigned long size) >> > >You can hook the second level cache support into the bcache hook. That's >working because unlike the R4000SC the R5000's second level cache does not >have the additional constraint of the primary caches always being a subset >of the second level caches. > >Arch/mips/sgi-ip22/ip22-sc.c is an example how this can be done. > > > This is all very fine in theory but the R5000 cache routines are automatically selected by the R4000 secondary setup routines which pick out the incorrect flush_range function and wback_inv and inv functions. These do not call board cache routines at all. It must be that the secondary cache for the ip22 architecture with an R5000 is not flagged as having a secondary cache in a way that the R4000 secondary cache routines can detect. On the other hand with the application of this (attached) patch the cache is detected correctly and appropriate routines are selected. /Brian