* [PATCH] ARM: dma: Drop __GFP_COMP for iommu dma memory allocations
@ 2013-06-20 12:31 Richard Zhao
2013-06-20 13:04 ` Sergei Shtylyov
0 siblings, 1 reply; 9+ messages in thread
From: Richard Zhao @ 2013-06-20 12:31 UTC (permalink / raw)
To: linux-arm-kernel
__iommu_alloc_buffer wants to split pages after allocation in order to
reduce the memory footprint. This does not work well with __GFP_COMP
pages, so drop this flag before allocation
One failure example is snd_malloc_dev_pages call dma_alloc_coherent with
__GFP_COMP.
Signed-off-by: Richard Zhao <rizhao@nvidia.com>
---
arch/arm/mm/dma-mapping.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
index ef3e0f3..f7efffd 100644
--- a/arch/arm/mm/dma-mapping.c
+++ b/arch/arm/mm/dma-mapping.c
@@ -1314,6 +1314,15 @@ static void *arm_iommu_alloc_attrs(struct device *dev, size_t size,
if (gfp & GFP_ATOMIC)
return __iommu_alloc_atomic(dev, size, handle);
+ /*
+ * Following is a work-around (a.k.a. hack) to prevent pages
+ * with __GFP_COMP being passed to split_page() which cannot
+ * handle them. The real problem is that this flag probably
+ * should be 0 on ARM as it is not supported on this
+ * platform; see CONFIG_HUGETLBFS.
+ */
+ gfp &= ~(__GFP_COMP);
+
pages = __iommu_alloc_buffer(dev, size, gfp, attrs);
if (!pages)
return NULL;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH] ARM: dma: Drop __GFP_COMP for iommu dma memory allocations
2013-06-20 12:31 [PATCH] ARM: dma: Drop __GFP_COMP for iommu dma memory allocations Richard Zhao
@ 2013-06-20 13:04 ` Sergei Shtylyov
2013-06-20 13:40 ` Richard Zhao
2013-06-21 9:33 ` Marek Szyprowski
0 siblings, 2 replies; 9+ messages in thread
From: Sergei Shtylyov @ 2013-06-20 13:04 UTC (permalink / raw)
To: linux-arm-kernel
Hello.
On 20-06-2013 16:31, Richard Zhao wrote:
> __iommu_alloc_buffer wants to split pages after allocation in order to
> reduce the memory footprint. This does not work well with __GFP_COMP
> pages, so drop this flag before allocation
> One failure example is snd_malloc_dev_pages call dma_alloc_coherent with
> __GFP_COMP.
> Signed-off-by: Richard Zhao <rizhao@nvidia.com>
> ---
> arch/arm/mm/dma-mapping.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
> diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
> index ef3e0f3..f7efffd 100644
> --- a/arch/arm/mm/dma-mapping.c
> +++ b/arch/arm/mm/dma-mapping.c
> @@ -1314,6 +1314,15 @@ static void *arm_iommu_alloc_attrs(struct device *dev, size_t size,
> if (gfp & GFP_ATOMIC)
> return __iommu_alloc_atomic(dev, size, handle);
>
> + /*
> + * Following is a work-around (a.k.a. hack) to prevent pages
> + * with __GFP_COMP being passed to split_page() which cannot
> + * handle them. The real problem is that this flag probably
> + * should be 0 on ARM as it is not supported on this
> + * platform; see CONFIG_HUGETLBFS.
> + */
> + gfp &= ~(__GFP_COMP);
Hm, what exactly is the sense you meant in using ()?
WBR, Sergei
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] ARM: dma: Drop __GFP_COMP for iommu dma memory allocations
2013-06-20 13:04 ` Sergei Shtylyov
@ 2013-06-20 13:40 ` Richard Zhao
[not found] ` <CANg6MZg3A7-oXfdUSarQ8n0PRsS0_BLjqfQ914KUoSzDDtShFg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-06-21 9:33 ` Marek Szyprowski
1 sibling, 1 reply; 9+ messages in thread
From: Richard Zhao @ 2013-06-20 13:40 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Jun 20, 2013 at 9:04 PM, Sergei Shtylyov
<sergei.shtylyov@cogentembedded.com> wrote:
> Hello.
>
>
> On 20-06-2013 16:31, Richard Zhao wrote:
>
>> __iommu_alloc_buffer wants to split pages after allocation in order to
>> reduce the memory footprint. This does not work well with __GFP_COMP
>> pages, so drop this flag before allocation
>
>
>> One failure example is snd_malloc_dev_pages call dma_alloc_coherent with
>> __GFP_COMP.
>
>
>> Signed-off-by: Richard Zhao <rizhao@nvidia.com>
>> ---
>> arch/arm/mm/dma-mapping.c | 9 +++++++++
>> 1 file changed, 9 insertions(+)
>
>
>> diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
>> index ef3e0f3..f7efffd 100644
>> --- a/arch/arm/mm/dma-mapping.c
>> +++ b/arch/arm/mm/dma-mapping.c
>> @@ -1314,6 +1314,15 @@ static void *arm_iommu_alloc_attrs(struct device
>> *dev, size_t size,
>> if (gfp & GFP_ATOMIC)
>> return __iommu_alloc_atomic(dev, size, handle);
>>
>> + /*
>> + * Following is a work-around (a.k.a. hack) to prevent pages
>> + * with __GFP_COMP being passed to split_page() which cannot
>> + * handle them. The real problem is that this flag probably
>> + * should be 0 on ARM as it is not supported on this
>> + * platform; see CONFIG_HUGETLBFS.
>> + */
>> + gfp &= ~(__GFP_COMP);
>
>
> Hm, what exactly is the sense you meant in using ()?
It's copy/paste from elsewhere in this file. At least it's consistent? :)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] ARM: dma: Drop __GFP_COMP for iommu dma memory allocations
2013-06-20 13:40 ` Richard Zhao
@ 2013-06-20 14:35 ` Hiroshi Doyu
0 siblings, 0 replies; 9+ messages in thread
From: Hiroshi Doyu @ 2013-06-20 14:35 UTC (permalink / raw)
To: linuxzsc-Re5JQEeQqe8AvxtiuMwx3w
Cc: sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8, Richard Zhao,
linux-lFZ/pmaqli7XmaaqVzeoHQ,
m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ, Stephen Warren,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-tegra-u79uwXL29TY76Z2rM5mHXA
Richard Zhao <linuxzsc-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote @ Thu, 20 Jun 2013 15:40:50 +0200:
> >> + /*
> >> + * Following is a work-around (a.k.a. hack) to prevent pages
> >> + * with __GFP_COMP being passed to split_page() which cannot
> >> + * handle them. The real problem is that this flag probably
> >> + * should be 0 on ARM as it is not supported on this
> >> + * platform; see CONFIG_HUGETLBFS.
> >> + */
> >> + gfp &= ~(__GFP_COMP);
> >
> >
> > Hm, what exactly is the sense you meant in using ()?
>
> It's copy/paste from elsewhere in this file. At least it's consistent? :)
I almost sent the exact same one, actually it was under internal reivew;)
This patch is similar but is the iommu version of:
commit ea2e7057c0234cfb8b09467d8f137760d371fc72
Author: Sumit Bhattacharya <sumitb-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Date: Thu Nov 24 00:47:12 2011 +0100
ARM: 7172/1: dma: Drop GFP_COMP for DMA memory allocations
dma_alloc_coherent wants to split pages after allocation in order to
reduce the memory footprint. This does not work well with GFP_COMP
pages, so drop this flag before allocation.
This patch is ported from arch/avr32
(commit 3611553ef985ef7c5863c8a94641738addd04cff).
[swarren: s/HUGETLB_PAGE/HUGETLBFS/ in comment, minor comment cleanup]
Signed-off-by: Sumit Bhattacharya <sumitb-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Tested-by: Varun Colbert <vcolbert-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Russell King <rmk+kernel-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
index ab58456..1aa664a 100644
--- a/arch/arm/mm/dma-mapping.c
+++ b/arch/arm/mm/dma-mapping.c
@@ -332,6 +332,15 @@ __dma_alloc(struct device *dev, size_t size, dma_addr_t *handle, gfp_t gfp,
struct page *page;
void *addr;
+ /*
+ * Following is a work-around (a.k.a. hack) to prevent pages
+ * with __GFP_COMP being passed to split_page() which cannot
+ * handle them. The real problem is that this flag probably
+ * should be 0 on ARM as it is not supported on this
+ * platform; see CONFIG_HUGETLBFS.
+ */
+ gfp &= ~(__GFP_COMP);
+
*handle = ~0;
size = PAGE_ALIGN(size);
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH] ARM: dma: Drop __GFP_COMP for iommu dma memory allocations
@ 2013-06-20 14:35 ` Hiroshi Doyu
0 siblings, 0 replies; 9+ messages in thread
From: Hiroshi Doyu @ 2013-06-20 14:35 UTC (permalink / raw)
To: linux-arm-kernel
Richard Zhao <linuxzsc@gmail.com> wrote @ Thu, 20 Jun 2013 15:40:50 +0200:
> >> + /*
> >> + * Following is a work-around (a.k.a. hack) to prevent pages
> >> + * with __GFP_COMP being passed to split_page() which cannot
> >> + * handle them. The real problem is that this flag probably
> >> + * should be 0 on ARM as it is not supported on this
> >> + * platform; see CONFIG_HUGETLBFS.
> >> + */
> >> + gfp &= ~(__GFP_COMP);
> >
> >
> > Hm, what exactly is the sense you meant in using ()?
>
> It's copy/paste from elsewhere in this file. At least it's consistent? :)
I almost sent the exact same one, actually it was under internal reivew;)
This patch is similar but is the iommu version of:
commit ea2e7057c0234cfb8b09467d8f137760d371fc72
Author: Sumit Bhattacharya <sumitb@nvidia.com>
Date: Thu Nov 24 00:47:12 2011 +0100
ARM: 7172/1: dma: Drop GFP_COMP for DMA memory allocations
dma_alloc_coherent wants to split pages after allocation in order to
reduce the memory footprint. This does not work well with GFP_COMP
pages, so drop this flag before allocation.
This patch is ported from arch/avr32
(commit 3611553ef985ef7c5863c8a94641738addd04cff).
[swarren: s/HUGETLB_PAGE/HUGETLBFS/ in comment, minor comment cleanup]
Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
index ab58456..1aa664a 100644
--- a/arch/arm/mm/dma-mapping.c
+++ b/arch/arm/mm/dma-mapping.c
@@ -332,6 +332,15 @@ __dma_alloc(struct device *dev, size_t size, dma_addr_t *handle, gfp_t gfp,
struct page *page;
void *addr;
+ /*
+ * Following is a work-around (a.k.a. hack) to prevent pages
+ * with __GFP_COMP being passed to split_page() which cannot
+ * handle them. The real problem is that this flag probably
+ * should be 0 on ARM as it is not supported on this
+ * platform; see CONFIG_HUGETLBFS.
+ */
+ gfp &= ~(__GFP_COMP);
+
*handle = ~0;
size = PAGE_ALIGN(size);
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] ARM: dma: Drop __GFP_COMP for iommu dma memory allocations
2013-06-20 14:35 ` Hiroshi Doyu
@ 2013-06-21 4:52 ` Richard Zhao
-1 siblings, 0 replies; 9+ messages in thread
From: Richard Zhao @ 2013-06-21 4:52 UTC (permalink / raw)
To: Hiroshi Doyu
Cc: linuxzsc-Re5JQEeQqe8AvxtiuMwx3w,
sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8,
linux-lFZ/pmaqli7XmaaqVzeoHQ,
m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ, Stephen Warren,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-tegra-u79uwXL29TY76Z2rM5mHXA
On Thu, Jun 20, 2013 at 10:35:11PM +0800, Hiroshi Doyu wrote:
> Richard Zhao <linuxzsc-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote @ Thu, 20 Jun 2013 15:40:50 +0200:
>
> > >> + /*
> > >> + * Following is a work-around (a.k.a. hack) to prevent pages
> > >> + * with __GFP_COMP being passed to split_page() which cannot
> > >> + * handle them. The real problem is that this flag probably
> > >> + * should be 0 on ARM as it is not supported on this
> > >> + * platform; see CONFIG_HUGETLBFS.
> > >> + */
> > >> + gfp &= ~(__GFP_COMP);
> > >
> > >
> > > Hm, what exactly is the sense you meant in using ()?
> >
> > It's copy/paste from elsewhere in this file. At least it's consistent? :)
>
> I almost sent the exact same one, actually it was under internal reivew;)
Ah, sorry I didn't search internal mails but only arm mail list for related
fix, since I thought it's not specific to tegra. Why not give it a
Reviewed-by or Tested-by?
>
> This patch is similar but is the iommu version of:
Exactly.
Thanks
Richard
>
>
> commit ea2e7057c0234cfb8b09467d8f137760d371fc72
> Author: Sumit Bhattacharya <sumitb-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> Date: Thu Nov 24 00:47:12 2011 +0100
>
> ARM: 7172/1: dma: Drop GFP_COMP for DMA memory allocations
>
> dma_alloc_coherent wants to split pages after allocation in order to
> reduce the memory footprint. This does not work well with GFP_COMP
> pages, so drop this flag before allocation.
>
> This patch is ported from arch/avr32
> (commit 3611553ef985ef7c5863c8a94641738addd04cff).
>
> [swarren: s/HUGETLB_PAGE/HUGETLBFS/ in comment, minor comment cleanup]
>
> Signed-off-by: Sumit Bhattacharya <sumitb-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> Tested-by: Varun Colbert <vcolbert-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> Signed-off-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> Signed-off-by: Russell King <rmk+kernel-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>
>
> diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
> index ab58456..1aa664a 100644
> --- a/arch/arm/mm/dma-mapping.c
> +++ b/arch/arm/mm/dma-mapping.c
> @@ -332,6 +332,15 @@ __dma_alloc(struct device *dev, size_t size, dma_addr_t *handle, gfp_t gfp,
> struct page *page;
> void *addr;
>
> + /*
> + * Following is a work-around (a.k.a. hack) to prevent pages
> + * with __GFP_COMP being passed to split_page() which cannot
> + * handle them. The real problem is that this flag probably
> + * should be 0 on ARM as it is not supported on this
> + * platform; see CONFIG_HUGETLBFS.
> + */
> + gfp &= ~(__GFP_COMP);
> +
> *handle = ~0;
> size = PAGE_ALIGN(size);
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] ARM: dma: Drop __GFP_COMP for iommu dma memory allocations
@ 2013-06-21 4:52 ` Richard Zhao
0 siblings, 0 replies; 9+ messages in thread
From: Richard Zhao @ 2013-06-21 4:52 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Jun 20, 2013 at 10:35:11PM +0800, Hiroshi Doyu wrote:
> Richard Zhao <linuxzsc@gmail.com> wrote @ Thu, 20 Jun 2013 15:40:50 +0200:
>
> > >> + /*
> > >> + * Following is a work-around (a.k.a. hack) to prevent pages
> > >> + * with __GFP_COMP being passed to split_page() which cannot
> > >> + * handle them. The real problem is that this flag probably
> > >> + * should be 0 on ARM as it is not supported on this
> > >> + * platform; see CONFIG_HUGETLBFS.
> > >> + */
> > >> + gfp &= ~(__GFP_COMP);
> > >
> > >
> > > Hm, what exactly is the sense you meant in using ()?
> >
> > It's copy/paste from elsewhere in this file. At least it's consistent? :)
>
> I almost sent the exact same one, actually it was under internal reivew;)
Ah, sorry I didn't search internal mails but only arm mail list for related
fix, since I thought it's not specific to tegra. Why not give it a
Reviewed-by or Tested-by?
>
> This patch is similar but is the iommu version of:
Exactly.
Thanks
Richard
>
>
> commit ea2e7057c0234cfb8b09467d8f137760d371fc72
> Author: Sumit Bhattacharya <sumitb@nvidia.com>
> Date: Thu Nov 24 00:47:12 2011 +0100
>
> ARM: 7172/1: dma: Drop GFP_COMP for DMA memory allocations
>
> dma_alloc_coherent wants to split pages after allocation in order to
> reduce the memory footprint. This does not work well with GFP_COMP
> pages, so drop this flag before allocation.
>
> This patch is ported from arch/avr32
> (commit 3611553ef985ef7c5863c8a94641738addd04cff).
>
> [swarren: s/HUGETLB_PAGE/HUGETLBFS/ in comment, minor comment cleanup]
>
> Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com>
> Tested-by: Varun Colbert <vcolbert@nvidia.com>
> Signed-off-by: Stephen Warren <swarren@nvidia.com>
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
>
> diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
> index ab58456..1aa664a 100644
> --- a/arch/arm/mm/dma-mapping.c
> +++ b/arch/arm/mm/dma-mapping.c
> @@ -332,6 +332,15 @@ __dma_alloc(struct device *dev, size_t size, dma_addr_t *handle, gfp_t gfp,
> struct page *page;
> void *addr;
>
> + /*
> + * Following is a work-around (a.k.a. hack) to prevent pages
> + * with __GFP_COMP being passed to split_page() which cannot
> + * handle them. The real problem is that this flag probably
> + * should be 0 on ARM as it is not supported on this
> + * platform; see CONFIG_HUGETLBFS.
> + */
> + gfp &= ~(__GFP_COMP);
> +
> *handle = ~0;
> size = PAGE_ALIGN(size);
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] ARM: dma: Drop __GFP_COMP for iommu dma memory allocations
2013-06-20 13:04 ` Sergei Shtylyov
2013-06-20 13:40 ` Richard Zhao
@ 2013-06-21 9:33 ` Marek Szyprowski
2013-06-21 11:04 ` Richard Zhao
1 sibling, 1 reply; 9+ messages in thread
From: Marek Szyprowski @ 2013-06-21 9:33 UTC (permalink / raw)
To: linux-arm-kernel
Hello,
On 6/20/2013 3:04 PM, Sergei Shtylyov wrote:
> Hello.
>
> On 20-06-2013 16:31, Richard Zhao wrote:
>
>> __iommu_alloc_buffer wants to split pages after allocation in order to
>> reduce the memory footprint. This does not work well with __GFP_COMP
>> pages, so drop this flag before allocation
>
>> One failure example is snd_malloc_dev_pages call dma_alloc_coherent with
>> __GFP_COMP.
>
>> Signed-off-by: Richard Zhao <rizhao@nvidia.com>
>> ---
>> arch/arm/mm/dma-mapping.c | 9 +++++++++
>> 1 file changed, 9 insertions(+)
>
>> diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
>> index ef3e0f3..f7efffd 100644
>> --- a/arch/arm/mm/dma-mapping.c
>> +++ b/arch/arm/mm/dma-mapping.c
>> @@ -1314,6 +1314,15 @@ static void *arm_iommu_alloc_attrs(struct
>> device *dev, size_t size,
>> if (gfp & GFP_ATOMIC)
>> return __iommu_alloc_atomic(dev, size, handle);
>>
>> + /*
>> + * Following is a work-around (a.k.a. hack) to prevent pages
>> + * with __GFP_COMP being passed to split_page() which cannot
>> + * handle them. The real problem is that this flag probably
>> + * should be 0 on ARM as it is not supported on this
>> + * platform; see CONFIG_HUGETLBFS.
>> + */
>> + gfp &= ~(__GFP_COMP);
>
> Hm, what exactly is the sense you meant in using ()?
I think that those parentheses come from the first patch, which disabled
__GFP_COMP
in dma-mapping allocations: 3611553ef98 ("[AVR32] Drop GFP_COMP for DMA
memory
allocations"). I would like to take this patch to the dma-mapping tree
together with
other changes related to iommu integration code.
Best regards
--
Marek Szyprowski
Samsung R&D Institute Poland
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] ARM: dma: Drop __GFP_COMP for iommu dma memory allocations
2013-06-21 9:33 ` Marek Szyprowski
@ 2013-06-21 11:04 ` Richard Zhao
0 siblings, 0 replies; 9+ messages in thread
From: Richard Zhao @ 2013-06-21 11:04 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Jun 21, 2013 at 5:33 PM, Marek Szyprowski
<m.szyprowski@samsung.com> wrote:> Hello,
>
>
> On 6/20/2013 3:04 PM, Sergei Shtylyov wrote:
>>
>> Hello.
>>
>> On 20-06-2013 16:31, Richard Zhao wrote:
>>
>>> __iommu_alloc_buffer wants to split pages after allocation in order to
>>> reduce the memory footprint. This does not work well with __GFP_COMP
>>> pages, so drop this flag before allocation
>>
>>
>>> One failure example is snd_malloc_dev_pages call dma_alloc_coherent with
>>> __GFP_COMP.
>>
>>
>>> Signed-off-by: Richard Zhao <rizhao@nvidia.com>
>>> ---
>>> arch/arm/mm/dma-mapping.c | 9 +++++++++
>>> 1 file changed, 9 insertions(+)
>>
>>
>>> diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
>>> index ef3e0f3..f7efffd 100644
>>> --- a/arch/arm/mm/dma-mapping.c
>>> +++ b/arch/arm/mm/dma-mapping.c
>>> @@ -1314,6 +1314,15 @@ static void *arm_iommu_alloc_attrs(struct device
>>> *dev, size_t size,
>>> if (gfp & GFP_ATOMIC)
>>> return __iommu_alloc_atomic(dev, size, handle);
>>>
>>> + /*
>>> + * Following is a work-around (a.k.a. hack) to prevent pages
>>> + * with __GFP_COMP being passed to split_page() which cannot
>>> + * handle them. The real problem is that this flag probably
>>> + * should be 0 on ARM as it is not supported on this
>>> + * platform; see CONFIG_HUGETLBFS.
>>> + */
>>> + gfp &= ~(__GFP_COMP);
>>
>>
>> Hm, what exactly is the sense you meant in using ()?
>
>
> I think that those parentheses come from the first patch, which disabled
> __GFP_COMP
> in dma-mapping allocations: 3611553ef98 ("[AVR32] Drop GFP_COMP for DMA
> memory
> allocations"). I would like to take this patch to the dma-mapping tree
> together with
> other changes related to iommu integration code.
Thanks! I'm not sure. Do we still have time to have this fix on 3.10?
Richard
>
> Best regards
> --
> Marek Szyprowski
> Samsung R&D Institute Poland
>
>
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2013-06-21 11:04 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-20 12:31 [PATCH] ARM: dma: Drop __GFP_COMP for iommu dma memory allocations Richard Zhao
2013-06-20 13:04 ` Sergei Shtylyov
2013-06-20 13:40 ` Richard Zhao
[not found] ` <CANg6MZg3A7-oXfdUSarQ8n0PRsS0_BLjqfQ914KUoSzDDtShFg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-06-20 14:35 ` Hiroshi Doyu
2013-06-20 14:35 ` Hiroshi Doyu
[not found] ` <20130620.173511.831032817734076793.hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-06-21 4:52 ` Richard Zhao
2013-06-21 4:52 ` Richard Zhao
2013-06-21 9:33 ` Marek Szyprowski
2013-06-21 11:04 ` Richard Zhao
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.