[PATCH 2/5] [POWERPC] 8xx: generic 8xx code arch/powerpc port
Dan Malek
dan at embeddedalley.com
Sat Nov 18 12:24:16 EST 2006
On Nov 17, 2006, at 3:00 AM, Christoph Hellwig wrote:
> this is used by arch/ppc/fec.c to set mapping uncachable, which
> seems rather odd to me.
I thought arch/ppc/fec.c is dead in favor of the
"generic" version in the drivers/net directory?
We use the va_to_pte() functions to find
the mappings to create "coherent" cache areas
by changing the cache attributes of the vmalloc()
space. We can't use virt_to_phys() or similar
associated functions because they simply do the
kernel virtual arithmetic and don't return the
proper PTEs for for changing these attributes.
I believe this is also used on the 4xx, but I
could be mistaken.
> ..... For now we'll have to keep it I think, but
> it might make sense to move the implementation to fec.c.
I don't know what version of fec.c you are looking
at, but it should use the dma_alloc_coherent() functions
and be stashing both the physical and virtual addresses.
I made this change long ago and I hope it hasn't
been lost.
The coherent dma functions will in turn use
the va_to_pte() (or associated functions) mentioned
above.
Thanks.
-- Dan
More information about the Linuxppc-dev
mailing list