On Thu, Nov 17, 2011 at 05:39:56PM +0800, Chen Jie wrote:
> I noticed mips defines an ioremap_uncached_accelerated in
> arch/mips/include/asm/io.h, not reuse the name of "ioremap_wc", what
> is the difference?
> Some drivers use ioremap_wc, e.g. ttm_bo_ioremap() in
> drivers/gpu/drm/ttm/ttm_bo_util.c, I wonder whether these ioremap_wc
> invocations can be replaced with "ioremap_uncached_accelerated"?
Uncached Accelerated is the name under which the R10000 introduced a
cache mode that uses the CPU's write buffer to combine writes but that
otherwise is uncached. ioremap_uncached_accelerated and ioremap_cache-
able_cow were introduced in 2002; ioremap_wc was introduced in 2008 for
x86 and the latter name became the standard.
So the two functions are the same, just named differently for historic
reasons. I'm going to rename the function - for all practical purposes
this naming difference has turned into a bug.
Also I will rename ioremap_cacheable_cow to ioremap_cache. Note that
that ioremap_cacheable_cow also has a bug, it is hardwired to use CCA
_CACHE_CACHABLE_COW which is not available on all MIPS cores. I will
change it to use the same CCA that is also being used for RAM.