Skip to contentSkip to conversation

arm: mm: Remove hugetlb warning from Coherent DMA allocator

PATCH Superseded Steve Capper 2 participants 4 messages Jan 16, 2014 – Feb 18, 2014 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 arm: mm: Remove hugetlb warning from Coherent DMA allocator

The Coherant DMA allocator allocates pages of high order then splits them up into smaller pages.

This splitting logic would run into problems if the allocator was given compound pages. Thus the Coherant DMA allocator was originally incompatible with compound pages existing and, by extension, huge pages. A compile #error was put in place whenever huge pages were enabled.

Compatibility with compound pages has since been introduced by the following commit (which merely excludes GFP_COMP pages from being requested by the coherant DMA allocator):
ea2e705 ARM: 7172/1: dma: Drop GFP_COMP for DMA memory allocations

When huge page support was introduced to ARM, the compile #error in dma-mapping.c was replaced by a #warning when it should have been removed instead.

This patch removes the compile #warning in dma-mapping.c when huge pages are enabled.

---
Changed in V2: commit message completely re-written to give a better justification.

---
 arch/arm/mm/dma-mapping.c | 3 ---
 1 file changed, 3 deletions(-)
arch/arm/mm/dma-mapping.c +0 -3
index f61a570..8edd1b5 100644
@@ -284,9 +284,6 @@ static void __dma_free_buffer(struct page *page, size_t size)
 }
 
 #ifdef CONFIG_MMU
-#ifdef CONFIG_HUGETLB_PAGE
-#warning ARM Coherent DMA allocator does not (yet) support huge TLB
-#endif
 
 static void *__alloc_from_contiguous(struct device *dev, size_t size,
 				     pgprot_t prot, struct page **ret_page,
Signature · 1 line
1.8.1.4
#1 lore raw

PATCH v2 1/1 arm: mm: Remove hugetlb warning from Coherent DMA allocator

Quoted 21 lines · Steve Capper

The Coherant DMA allocator allocates pages of high order then splits them up into smaller pages.

This splitting logic would run into problems if the allocator was given compound pages. Thus the Coherant DMA allocator was originally incompatible with compound pages existing and, by extension, huge pages. A compile #error was put in place whenever huge pages were enabled.

Compatibility with compound pages has since been introduced by the following commit (which merely excludes GFP_COMP pages from being requested by the coherant DMA allocator):
ea2e705 ARM: 7172/1: dma: Drop GFP_COMP for DMA memory allocations

When huge page support was introduced to ARM, the compile #error in dma-mapping.c was replaced by a #warning when it should have been removed instead.

This patch removes the compile #warning in dma-mapping.c when huge pages are enabled.

Quoted 7 lines

---
Changed in V2: commit message completely re-written to give a better justification.

---
 arch/arm/mm/dma-mapping.c | 3 ---
 1 file changed, 3 deletions(-)

Would anyone object to this going into Russell's patch system?

Cheers,

Signature · 1 line
Steve
#2 lore raw

PATCH v2 1/1 arm: mm: Remove hugetlb warning from Coherent DMA allocator

Quoted 30 lines · Steve Capper
Quoted 21 lines · Steve Capper

The Coherant DMA allocator allocates pages of high order then splits them up into smaller pages.

This splitting logic would run into problems if the allocator was given compound pages. Thus the Coherant DMA allocator was originally incompatible with compound pages existing and, by extension, huge pages. A compile #error was put in place whenever huge pages were enabled.

Compatibility with compound pages has since been introduced by the following commit (which merely excludes GFP_COMP pages from being requested by the coherant DMA allocator):
ea2e705 ARM: 7172/1: dma: Drop GFP_COMP for DMA memory allocations

When huge page support was introduced to ARM, the compile #error in dma-mapping.c was replaced by a #warning when it should have been removed instead.

This patch removes the compile #warning in dma-mapping.c when huge pages are enabled.

Quoted 7 lines

---
Changed in V2: commit message completely re-written to give a better justification.

---
 arch/arm/mm/dma-mapping.c | 3 ---
 1 file changed, 3 deletions(-)
Quoted 1 line

Would anyone object to this going into Russell's patch system?

It's been a month, no one's objected, so please put it in the patch system anyway, thanks.

Signature · 3 lines
FTTC broadband for 0.8mile line: 5.8Mbps down 500kbps up.  Estimation
in database were 13.1 to 19Mbit for a good line, about 7.5+ for a bad.
Estimate before purchase was "up to 13.2Mbit".
#3 lore raw

PATCH v2 1/1 arm: mm: Remove hugetlb warning from Coherent DMA allocator

Quoted 31 lines · Russell King - ARM Linux
Quoted 30 lines · Steve Capper
Quoted 28 lines · Steve Capper

The Coherant DMA allocator allocates pages of high order then splits them up into smaller pages.

This splitting logic would run into problems if the allocator was given compound pages. Thus the Coherant DMA allocator was originally incompatible with compound pages existing and, by extension, huge pages. A compile #error was put in place whenever huge pages were enabled.

Compatibility with compound pages has since been introduced by the following commit (which merely excludes GFP_COMP pages from being requested by the coherant DMA allocator):
ea2e705 ARM: 7172/1: dma: Drop GFP_COMP for DMA memory allocations

When huge page support was introduced to ARM, the compile #error in dma-mapping.c was replaced by a #warning when it should have been removed instead.

This patch removes the compile #warning in dma-mapping.c when huge pages are enabled.

---
Changed in V2: commit message completely re-written to give a better justification.

---
 arch/arm/mm/dma-mapping.c | 3 ---
 1 file changed, 3 deletions(-)
Quoted 5 lines
Quoted 1 line

Would anyone object to this going into Russell's patch system?

It's been a month, no one's objected, so please put it in the patch system anyway, thanks.

Cheers, that's in as 7979/1.

Signature · 1 line
Steve