On Wed, 25 Aug 2010 22:32:37 +0200, Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> wrote:
No. CMA's designed for systems without IOMMU. If system has IOMMU then
there is no need for contiguous memory blocks since all discontiguousnesses
can be hidden by the IOMMU.
Dunno if the plugin system is "fancy" but essentially the above is true. ;)
Essentially that's the idea. Platform init code adds early regions and later
on reserves memory for all of the early regions. For the former some
additional helper functions are provided which can be used.
In the first version I've used unsigned long as return type but then it
was suggested that maybe dma_addr_t would be better. This is easily
changed at this stage so I'd be more then happy to hear any comments.
If I understood you correctly this is something I'm thinking about. I'm
actually thinking of ways to integrate CMA with Zach's IOMMU proposal posted
some time ago. The idea would be to define a subset of functionalities
of the IOMMU API that would work on systems with and without hardware IOMMU.
If platform had no IOMMU CMA would be used.
I'm currently trying to fully understand Zach's proposal to see how such an
approach could be pursued.
Thanks! Greatly appreciated.
No, a NUL byte, ie. '\0'.
This is a consequence of how map is stored. It's stored as a single string
with entries separated by semicolons.
Well, I'm unaware of a C way to reference "methods" so I just borrowed C++ style.
[...]
[...]
[...]
I wanted the function to try all possible allocators. As a matter of fact,
both APIs (memblock and bootmem) can be supported at the same time.
Actually, I would prefer to leave it. It may be useful for platform
initialisation code. Especially if platform has some special regions
which are allocated in a different but for the rest wants to use the
default CMA's reserve call.
--
Best regards, _ _
| Humble Liege of Serenely Enlightened Majesty of o' \,=./ `o
| Computer Science, Michał "mina86" Nazarewicz (o o)
+----[mina86*mina86.com]---[mina86*jabber.org]----ooO--(_)--Ooo--
--