> Not doing it sometimes invokes crash penalties for us. :-) > > We could add some way to skip the invalidation if we know the host is an > implementation that doesn't need it, possibly depending on the context > (is it just DMA he wants to avoid doing this on[1], or do their chips > have a fully coherent icache?), but IMHO functional correctness should > come first. > > -Scott > > [1] In which case we need to figure out how to tell at that point > whether it was DMA, preferably by something less hackish than saying, > "This function is used for DMA and breakpoints. Breakpoints are 4 > bytes, and flushing on a 4-byte DMA isn't as painful as larger DMAs."
AT_HWCAP will tell you, look for PPC_FEATURE_ICACHE_SNOOP, in this case all you need is sync, one icbi, isync (the arch documents the sequence iirc). Cheers, Ben.