Regarding consistent_alloc

Dan Malek dan at embeddededge.com
Sun Dec 8 03:53:24 EST 2002


Joakim Tjernlund wrote:

> Is consistent_alloc really needed?

YES.

> .... All uses I have seen in the kernel for the 8xx CPU can be solved with
> a kmalloc....

The cpm_hostalloc() solves a different problem.  It is used to allocate
small non-cached object so you don't need the overhead of the cache
management functions every time you want to do something like write a byte
to a uart.  It is specific to the CPM on the 8xx, so you can apply the
proper assumptions about io mapping for a lightweight and efficient solution.

I've constantly criticized the Linux VM implementation for having different
functions and semantics for different VM spaces, and I'm always told something
to the effect "...it's the Linux way to make it efficient..."  So, I did
the same thing for 8xx and CPM.  There are lots of places in the Linux VM
where you can apply only certain operations to certain VM objects.  It
seems I've kept up the spirit :-)


	-- Dan


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/





More information about the Linuxppc-embedded mailing list