Messages in this thread | | | Subject | Re: problem with cache flush routine for G5? | From | Benjamin Herrenschmidt <> | Date | Fri, 05 Mar 2004 13:10:38 +1100 |
| |
> It did in 2.4, and we added a syscall to export it to userspace. Now > I'm supposed to figure out what to do for 2.6, and it appears that the > kernel version is gone and the one in boot is screwed.
Ugh ? No, the kernel doesn't contain a routine that you can use to flush the entire cache. It contains and use routines to flush regions of the dcache & icache, and those can prefectly be used in userland. In fact, none of the cache flush code is relying on supervisor mode, you don't need to add a syscall for that, just copy the code you need in userland.
> The only remaining ppc version of flush_data_cache is used by > flush_instruction_cache in arc/ppc/boot/common/util.S
That's wrong. You should flush the cache over the range where you need it flushed. Also, there are very few reasons why one would want to flush the dcache, so it would be interesting to know what you are really trying to do.
> There is also another version of flush_instruction_cache implemented in > arch/ppc/kernel/misc.S.
That is only used on some embedded CPUs afaik.
Ben.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |