From: Dong Aisheng <aisheng.dong@nxp.com>
To: linux-mm@kvack.org
Cc: linux-kernel@vger.kernel.org, dongas86@gmail.com,
linux-arm-kernel@lists.infradead.org,
Dong Aisheng <aisheng.dong@nxp.com>,
Rob Herring <robh+dt@kernel.org>,
devicetree@vger.kernel.org
Subject: [PATCH 2/2] of: of_reserved_mem: mark nomap memory instead of removing
Date: Fri, 11 Jun 2021 21:11:53 +0800 [thread overview]
Message-ID: <20210611131153.3731147-2-aisheng.dong@nxp.com> (raw)
In-Reply-To: <20210611131153.3731147-1-aisheng.dong@nxp.com>
Since commit 86588296acbf ("fdt: Properly handle "no-map" field in the memory region"),
nomap memory is changed to call memblock_mark_nomap() instead of
memblock_remove(). But it only changed the reserved memory with fixed
addr and size case in early_init_dt_reserve_memory_arch(), not
including the dynamical allocation by size case in
early_init_dt_alloc_reserved_memory_arch().
Cc: Rob Herring <robh+dt@kernel.org>
Cc: devicetree@vger.kernel.org
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
---
drivers/of/of_reserved_mem.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/of/of_reserved_mem.c b/drivers/of/of_reserved_mem.c
index 367f298a83b2..ebba88395bf8 100644
--- a/drivers/of/of_reserved_mem.c
+++ b/drivers/of/of_reserved_mem.c
@@ -42,7 +42,7 @@ static int __init early_init_dt_alloc_reserved_memory_arch(phys_addr_t size,
*res_base = base;
if (nomap)
- return memblock_remove(base, size);
+ return memblock_mark_nomap(base, size);
return memblock_reserve(base, size);
}
@@ -276,7 +276,7 @@ void __init fdt_init_reserved_mem(void)
pr_info("node %s compatible matching fail\n",
rmem->name);
if (nomap)
- memblock_add(rmem->base, rmem->size);
+ memblock_clear_nomap(rmem->base, rmem->size);
else
memblock_free(rmem->base, rmem->size);
}
--
2.25.1
next prev parent reply other threads:[~2021-06-11 13:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-11 13:11 [PATCH 1/2] of: of_reserved_mem: only call memblock_free for normal reserved memory Dong Aisheng
2021-06-11 13:11 ` Dong Aisheng [this message]
2021-06-11 17:10 ` [PATCH 2/2] of: of_reserved_mem: mark nomap memory instead of removing Rob Herring
2021-06-12 11:20 ` Aisheng Dong
2021-06-22 9:22 ` Quentin Perret
2021-06-24 19:07 ` Rob Herring
2021-06-24 19:05 ` [PATCH 1/2] of: of_reserved_mem: only call memblock_free for normal reserved memory Rob Herring
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=20210611131153.3731147-2-aisheng.dong@nxp.com \
--to=aisheng.dong@nxp.com \
--cc=devicetree@vger.kernel.org \
--cc=dongas86@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=robh+dt@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).