Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1222598 > unrolled thread
| Started by | Jisheng Zhang <jszhang@marvell.com> |
|---|---|
| First post | 2015-09-11 10:00 +0200 |
| Last post | 2015-09-11 13:10 +0200 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH] arm64: dma-mapping: check whether cma area is initialized or not Jisheng Zhang <jszhang@marvell.com> - 2015-09-11 10:00 +0200
Re: [PATCH] arm64: dma-mapping: check whether cma area is initialized or not Catalin Marinas <catalin.marinas@arm.com> - 2015-09-11 13:10 +0200
Re: [PATCH] arm64: dma-mapping: check whether cma area is initialized or not Will Deacon <will.deacon@arm.com> - 2015-09-11 13:10 +0200
| From | Jisheng Zhang <jszhang@marvell.com> |
|---|---|
| Date | 2015-09-11 10:00 +0200 |
| Subject | [PATCH] arm64: dma-mapping: check whether cma area is initialized or not |
| Message-ID | <q7rpw-3It-11@gated-at.bofh.it> |
If CMA is turned on and CMA size is set to zero, kernel should
behave as if CMA was not enabled at compile time.
Every dma allocation should check existence of cma area
before requesting memory.
Arm has done this by commit e464ef16c4f0 ("arm: dma-mapping: add
checking cma area initialized"), also do this for arm64.
Signed-off-by: Jisheng Zhang <jszhang@marvell.com>
---
arch/arm64/mm/dma-mapping.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/mm/dma-mapping.c b/arch/arm64/mm/dma-mapping.c
index 0bcc4bc..99224dc 100644
--- a/arch/arm64/mm/dma-mapping.c
+++ b/arch/arm64/mm/dma-mapping.c
@@ -100,7 +100,7 @@ static void *__dma_alloc_coherent(struct device *dev, size_t size,
if (IS_ENABLED(CONFIG_ZONE_DMA) &&
dev->coherent_dma_mask <= DMA_BIT_MASK(32))
flags |= GFP_DMA;
- if (IS_ENABLED(CONFIG_DMA_CMA) && (flags & __GFP_WAIT)) {
+ if (dev_get_cma_area(dev) && (flags & __GFP_WAIT)) {
struct page *page;
void *addr;
--
2.5.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Catalin Marinas <catalin.marinas@arm.com> |
|---|---|
| Date | 2015-09-11 13:10 +0200 |
| Subject | Re: [PATCH] arm64: dma-mapping: check whether cma area is initialized or not |
| Message-ID | <q7uno-8bA-31@gated-at.bofh.it> |
| In reply to | #1222598 |
On Fri, Sep 11, 2015 at 03:49:47PM +0800, Jisheng Zhang wrote:
> If CMA is turned on and CMA size is set to zero, kernel should
> behave as if CMA was not enabled at compile time.
> Every dma allocation should check existence of cma area
> before requesting memory.
>
> Arm has done this by commit e464ef16c4f0 ("arm: dma-mapping: add
> checking cma area initialized"), also do this for arm64.
>
> Signed-off-by: Jisheng Zhang <jszhang@marvell.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Will should pick this up for 4.3.
Thanks.
--
Catalin
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Will Deacon <will.deacon@arm.com> |
|---|---|
| Date | 2015-09-11 13:10 +0200 |
| Subject | Re: [PATCH] arm64: dma-mapping: check whether cma area is initialized or not |
| Message-ID | <q7unp-8bA-53@gated-at.bofh.it> |
| In reply to | #1222717 |
On Fri, Sep 11, 2015 at 12:00:37PM +0100, Catalin Marinas wrote:
> On Fri, Sep 11, 2015 at 03:49:47PM +0800, Jisheng Zhang wrote:
> > If CMA is turned on and CMA size is set to zero, kernel should
> > behave as if CMA was not enabled at compile time.
> > Every dma allocation should check existence of cma area
> > before requesting memory.
> >
> > Arm has done this by commit e464ef16c4f0 ("arm: dma-mapping: add
> > checking cma area initialized"), also do this for arm64.
> >
> > Signed-off-by: Jisheng Zhang <jszhang@marvell.com>
>
> Acked-by: Catalin Marinas <catalin.marinas@arm.com>
>
> Will should pick this up for 4.3.
Yup, queued already. I'll push out at -rc1.
Will
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web