consistent_free()

Dan Malek dan at embeddededge.com
Sat Jun 15 16:27:53 EST 2002


Paul Mackerras wrote:

> "Consistent" means "the cpu and the device see the same stuff in
> memory".  On a cache-coherent system that is true of all normal
> memory.  Surely that is obvious?

Not really.  You have seen enough messages about people wanting to
get "uncached" memory, even though this isn't necessary.

We also don't want to be remapping 'consistent' space on those
processors that don't require it, one of the primary functions
of consistent_alloc() so it works properly on noncoherent processors.

Basically, David Gibson moved an 'ifdef' from one place to another,
and then had to write a consistent_alloc function for processors that
didn't need it before, placing more code in an include file no less.
How does that add value to the kernel?  It just complicated the
maintenance of a function that is similar across multiple architectures.

A more logical thing to do would be to have pci_consistent() always
allocate the pages, and in the case of noncoherent processors perform
the additional mapping step.  Then, have consistent_alloc() just call
pci_consistent() with a NULL hardware device pointer.


	-- Dan


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





More information about the Linuxppc-embedded mailing list