From: Rob Herring <robh+dt@kernel.org>
To: Jaewon Kim <jaewon31.kim@samsung.com>
Cc: r64343@freescale.com, Marek Szyprowski <m.szyprowski@samsung.com>,
Grant Likely <grant.likely@linaro.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
Jaewon Kim <jaewon31.kim@gmail.com>
Subject: Re: [RESEND][PATCH] drivers: of: of_reserved_mem: fixup the CMA alignment not to affect dma-coherent
Date: Fri, 3 Jun 2016 07:23:33 -0500 [thread overview]
Message-ID: <CAL_JsqJPDJi7n9_Wuam5-pd+9adOFGQo9cjQxuEngJDm486G7A@mail.gmail.com> (raw)
In-Reply-To: <1464150590-2703-1-git-send-email-jaewon31.kim@samsung.com>
On Tue, May 24, 2016 at 11:29 PM, Jaewon Kim <jaewon31.kim@samsung.com> wrote:
> From: Jaewon <jaewon31.kim@samsung.com>
>
> There was an alignment mismatch issue for CMA and it was fixed by
> commit 1cc8e3458b51 ("drivers: of: of_reserved_mem: fixup the alignment with CMA setup").
> However the way of the commit considers not only dma-contiguous(CMA) but also
> dma-coherent which has no that requirement.
>
> This patch checks more to distinguish dma-contiguous(CMA) from dma-coherent.
>
> Signed-off-by: Jaewon Kim <jaewon31.kim@samsung.com>
> ---
> drivers/of/of_reserved_mem.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/of/of_reserved_mem.c b/drivers/of/of_reserved_mem.c
> index ed01c01..45b873e 100644
> --- a/drivers/of/of_reserved_mem.c
> +++ b/drivers/of/of_reserved_mem.c
> @@ -127,7 +127,10 @@ static int __init __reserved_mem_alloc_size(unsigned long node,
> }
>
> /* Need adjust the alignment to satisfy the CMA requirement */
> - if (IS_ENABLED(CONFIG_CMA) && of_flat_dt_is_compatible(node, "shared-dma-pool"))
> + if (IS_ENABLED(CONFIG_CMA)
> + && of_flat_dt_is_compatible(node, "shared-dma-pool")
> + && of_get_flat_dt_prop(node, "reusable", NULL)
> + && !of_get_flat_dt_prop(node, "no-map", NULL)) {
This won't actually compile as you add a bracket here, but no closing bracket...
I've fixed up and applied.
> align = max(align, (phys_addr_t)PAGE_SIZE << max(MAX_ORDER - 1, pageblock_order));
>
> prop = of_get_flat_dt_prop(node, "alloc-ranges", &len);
> --
> 1.9.1
>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2016-06-03 12:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-25 4:29 Jaewon Kim
2016-05-25 14:38 ` Rob Herring
2016-05-27 7:56 ` Marek Szyprowski
2016-05-30 13:21 ` 答复: " Hui Liu
2016-05-31 11:53 ` Jason Liu
2016-06-03 12:23 ` Rob Herring [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAL_JsqJPDJi7n9_Wuam5-pd+9adOFGQo9cjQxuEngJDm486G7A@mail.gmail.com \
--to=robh+dt@kernel.org \
--cc=grant.likely@linaro.org \
--cc=jaewon31.kim@gmail.com \
--cc=jaewon31.kim@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=m.szyprowski@samsung.com \
--cc=r64343@freescale.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox