From: "Song Bao Hua (Barry Song)" <song.bao.hua@hisilicon.com>
To: Nick Desaulniers <ndesaulniers@google.com>
Cc: "sfr@canb.auug.org.au" <sfr@canb.auug.org.au>,
"clang-built-linux@googlegroups.com"
<clang-built-linux@googlegroups.com>,
Linuxarm <linuxarm@huawei.com>,
"ardb@kernel.org" <ardb@kernel.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"will@kernel.org" <will@kernel.org>, "guro@fb.com" <guro@fb.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"mike.kravetz@oracle.com" <mike.kravetz@oracle.com>
Subject: RE: arm64: mm: move dma_contiguous_reserve() to be after paging_init()
Date: Thu, 17 Sep 2020 00:57:37 +0000 [thread overview]
Message-ID: <304aab7bf8724232a430c29660007e9e@hisilicon.com> (raw)
In-Reply-To: <20200917001934.2793370-1-ndesaulniers@google.com>
> -----Original Message-----
> From: ndesaulniers via sendgmr
> [mailto:ndesaulniers@ndesaulniers1.mtv.corp.google.com] On Behalf Of Nick
> Desaulniers
> Sent: Thursday, September 17, 2020 12:20 PM
> To: Song Bao Hua (Barry Song) <song.bao.hua@hisilicon.com>
> Cc: akpm@linux-foundation.org; guro@fb.com;
> linux-arm-kernel@lists.infradead.org; linux-mm@kvack.org; Linuxarm
> <linuxarm@huawei.com>; mike.kravetz@oracle.com; sfr@canb.auug.org.au;
> will@kernel.org; ardb@kernel.org; clang-built-linux@googlegroups.com
> Subject: Re: arm64: mm: move dma_contiguous_reserve() to be after
> paging_init()
>
> It looks like that change referenced may also break arm32 boots with today's
> next?
>
> The following allows me to boot, but I have no idea if it's incorrect or not.
>
This is probably incorrect on arm32 as dma_contiguous_early_fixup() is done after
dma_contiguous_remap() in paging_init(). That means dma_contiguous_remap() gets an
empty list.
For arm64, there isn't early_fixup() and remap().
> diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
> index 45f9d5ec2360..7118b98c1f5f 100644
> --- a/arch/arm/mm/init.c
> +++ b/arch/arm/mm/init.c
> @@ -226,9 +226,6 @@ void __init arm_memblock_init(const struct
> machine_desc *mdesc)
> early_init_fdt_reserve_self();
> early_init_fdt_scan_reserved_mem();
>
> - /* reserve memory for DMA contiguous allocations */
> - dma_contiguous_reserve(arm_dma_limit);
> -
> arm_memblock_steal_permitted = false;
> memblock_dump_all();
> }
> @@ -248,6 +245,9 @@ void __init bootmem_init(void)
> */
> sparse_init();
>
> + /* reserve memory for DMA contiguous allocations */
> + dma_contiguous_reserve(arm_dma_limit);
> +
> /*
> * Now free the memory - free_area_init needs
> * the sparse mem_map arrays initialized by sparse_init()
Thanks
Barry
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
prev parent reply other threads:[~2020-09-17 0:59 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-16 8:59 [PATCH] arm64: mm: move dma_contiguous_reserve() to be after paging_init() Barry Song
2020-09-16 15:12 ` Anders Roxell
2020-09-17 0:19 ` Nick Desaulniers
2020-09-17 0:27 ` Mike Kravetz
2020-09-17 1:35 ` Song Bao Hua (Barry Song)
2020-09-17 9:02 ` Will Deacon
2020-09-17 9:13 ` Stephen Rothwell
2020-09-17 9:36 ` Will Deacon
2020-09-17 0:57 ` Song Bao Hua (Barry Song) [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=304aab7bf8724232a430c29660007e9e@hisilicon.com \
--to=song.bao.hua@hisilicon.com \
--cc=akpm@linux-foundation.org \
--cc=ardb@kernel.org \
--cc=clang-built-linux@googlegroups.com \
--cc=guro@fb.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mm@kvack.org \
--cc=linuxarm@huawei.com \
--cc=mike.kravetz@oracle.com \
--cc=ndesaulniers@google.com \
--cc=sfr@canb.auug.org.au \
--cc=will@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).