Thread (28 messages) 28 messages, 4 authors, 2012-03-08
STALE5204d

[PATCH 7/7] Minor compiling fix

From: carson bill <hidden>
Date: 2012-03-01 12:42:37

2012/3/1 Arnd Bergmann [off-list ref]
On Thursday 01 March 2012, bill4carson wrote:
quoted
On 2012?02?29? 20:35, Arnd Bergmann wrote:
quoted
On Monday 13 February 2012, Bill Carson wrote:
quoted
--- a/arch/arm/mm/dma-mapping.c
+++ b/arch/arm/mm/dma-mapping.c
@@ -152,9 +152,6 @@ static struct arm_vmregion_head consistent_head = {
         .vm_end         = CONSISTENT_END,
  };

-#ifdef CONFIG_HUGETLB_PAGE
-#error ARM Coherent DMA allocator does not (yet) support huge TLB
-#endif
This one needs an explanation, too. What has changed that now allows
dma_alloc_coherent to work with CONFIG_HUGETLB_PAGE set that did not
work before?
AFAIK, __dma_alloc has the finest granularity at 4k page size even when
user requests 1M bytes memory.

but current hugetlb low level set_hugepte_at *ONLY*/*MUST* support 2M
page mapping, so it can't be used to create huge dma mapping in a more
general way.

comments this error out doesn't mean that it could support huge page dma
mapping now with this patch, just shut up gcc when compiling.

Adding a single low level hook to create 1M page mapping can satisfy
the needs, but apparently that's out of hugetlb scope.
And it's on my TODO list :)
Hmm, I'm still not sure I'm following. The coherent DMA area is currently
limited to 2MB or a small multiple of that, so you would not be able
to allocate coherent hugepages anyway.


Further, I don't think there are any device drivers that call
dma_alloc_coherent and expect to map the resulting page into
user space, or that we even have an interface for that.
This "ifdef" is used to remind dma implementation should use hugetlb low
API to set up huge page mappings one day hugetlb is supported, just it!

For now, I don't see any direct relationship dma alloc has to do with hugetlb
in a more general way other than both could share low level page table
management.

This entire chunk of code is also getting changed with the addition of CMA.

       Arnd
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help