From: Alexey.Brodkin@synopsys.com (Alexey Brodkin)
To: linux-snps-arc@lists.infradead.org
Subject: [PATCH 2/2] ARC: add support for reserved memory defined by device tree
Date: Tue, 26 Apr 2016 19:29:34 +0300 [thread overview]
Message-ID: <1461688174-8936-3-git-send-email-abrodkin@synopsys.com> (raw)
In-Reply-To: <1461688174-8936-1-git-send-email-abrodkin@synopsys.com>
Enable reserved memory initialization from device tree.
Signed-off-by: Alexey Brodkin <abrodkin at synopsys.com>
Cc: Grant Likely <grant.likely at linaro.org>
Cc: Marek Szyprowski <m.szyprowski at samsung.com>
Cc: linux-kernel at vger.kernel.org
---
arch/arc/Kconfig | 1 +
arch/arc/mm/init.c | 4 ++++
2 files changed, 5 insertions(+)
diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig
index 61d69e6..33c1fc7 100644
--- a/arch/arc/Kconfig
+++ b/arch/arc/Kconfig
@@ -35,6 +35,7 @@ config ARC
select NO_BOOTMEM
select OF
select OF_EARLY_FLATTREE
+ select OF_RESERVED_MEM
select PERF_USE_VMALLOC
select HAVE_DEBUG_STACKOVERFLOW
select HAVE_GENERIC_DMA_COHERENT
diff --git a/arch/arc/mm/init.c b/arch/arc/mm/init.c
index 7d2c4fb..5487d0b 100644
--- a/arch/arc/mm/init.c
+++ b/arch/arc/mm/init.c
@@ -13,6 +13,7 @@
#ifdef CONFIG_BLK_DEV_INITRD
#include <linux/initrd.h>
#endif
+#include <linux/of_fdt.h>
#include <linux/swap.h>
#include <linux/module.h>
#include <linux/highmem.h>
@@ -136,6 +137,9 @@ void __init setup_arch_memory(void)
memblock_reserve(__pa(initrd_start), initrd_end - initrd_start);
#endif
+ early_init_fdt_reserve_self();
+ early_init_fdt_scan_reserved_mem();
+
memblock_dump_all();
/*----------------- node/zones setup --------------------------*/
--
2.5.5
prev parent reply other threads:[~2016-04-26 16:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-26 16:29 [PATCH 0/2] ARC: enable per-device dma and reserved memory in DT Alexey Brodkin
2016-04-26 16:29 ` [PATCH 1/2] ARC: support generic per-device coherent dma mem Alexey Brodkin
2016-04-26 16:29 ` Alexey Brodkin [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=1461688174-8936-3-git-send-email-abrodkin@synopsys.com \
--to=alexey.brodkin@synopsys.com \
--cc=linux-snps-arc@lists.infradead.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