All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] microblaze: Add support for reserved memory
@ 2022-02-25 13:17 Michal Simek
  2022-02-25 13:17 ` [PATCH 1/2] microblaze: Wire memblock_dump_all() Michal Simek
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Michal Simek @ 2022-02-25 13:17 UTC (permalink / raw)
  To: linux-kernel, monstr, michal.simek, git
  Cc: Andrew Morton, David Hildenbrand, Kefeng Wang, Mike Rapoport,
	Oscar Salvador, Russell King

Hi,

sending two patches for adding support for reserved memory nodes.
Till now architecture ignores these nodes and normally use memory for own
purpose.
The first patch is memblock dump wiring to be able to confirm that
reservation is working properly.

Thanks,
Michal


Michal Simek (2):
  microblaze: Wire memblock_dump_all()
  microblaze: Add support for reserved memory defined by DT

 arch/microblaze/mm/init.c | 5 +++++
 1 file changed, 5 insertions(+)

-- 
2.35.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] microblaze: Wire memblock_dump_all()
  2022-02-25 13:17 [PATCH 0/2] microblaze: Add support for reserved memory Michal Simek
@ 2022-02-25 13:17 ` Michal Simek
  2022-02-25 13:17 ` [PATCH 2/2] microblaze: Add support for reserved memory defined by DT Michal Simek
  2022-04-21  8:56 ` [PATCH 0/2] microblaze: Add support for reserved memory Michal Simek
  2 siblings, 0 replies; 4+ messages in thread
From: Michal Simek @ 2022-02-25 13:17 UTC (permalink / raw)
  To: linux-kernel, monstr, michal.simek, git
  Cc: Andrew Morton, David Hildenbrand, Kefeng Wang, Mike Rapoport,
	Russell King

Wire memblock_dump_all() to be able to see the whole memblock allocation.
Dumps are enabled by passing memblock=debug via kernel command line.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---

 arch/microblaze/mm/init.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/microblaze/mm/init.c b/arch/microblaze/mm/init.c
index 952f35b335b2..de0d8b03af21 100644
--- a/arch/microblaze/mm/init.c
+++ b/arch/microblaze/mm/init.c
@@ -263,6 +263,8 @@ asmlinkage void __init mmu_init(void)
 
 	/* CMA initialization */
 	dma_contiguous_reserve(memory_start + lowmem_size - 1);
+
+	memblock_dump_all();
 }
 
 void * __ref zalloc_maybe_bootmem(size_t size, gfp_t mask)
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] microblaze: Add support for reserved memory defined by DT
  2022-02-25 13:17 [PATCH 0/2] microblaze: Add support for reserved memory Michal Simek
  2022-02-25 13:17 ` [PATCH 1/2] microblaze: Wire memblock_dump_all() Michal Simek
@ 2022-02-25 13:17 ` Michal Simek
  2022-04-21  8:56 ` [PATCH 0/2] microblaze: Add support for reserved memory Michal Simek
  2 siblings, 0 replies; 4+ messages in thread
From: Michal Simek @ 2022-02-25 13:17 UTC (permalink / raw)
  To: linux-kernel, monstr, michal.simek, git
  Cc: Andrew Morton, David Hildenbrand, Kefeng Wang, Mike Rapoport,
	Oscar Salvador

In DT reserved memory nodes can be added as is described by
Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt
but Microblaze didn't have a support for it. The similar change was done
for ARC by commit 1b10cb21d888 ("ARC: add support for reserved memory
defined by device tree"). It is pretty much enough to call
early_init_fdt_scan_reserved_mem().
Microblaze is not using initial_boot_params that's why there is no need to
call early_init_fdt_reserve_self().

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---

 arch/microblaze/mm/init.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/microblaze/mm/init.c b/arch/microblaze/mm/init.c
index de0d8b03af21..f4e503461d24 100644
--- a/arch/microblaze/mm/init.c
+++ b/arch/microblaze/mm/init.c
@@ -13,6 +13,7 @@
 #include <linux/kernel.h>
 #include <linux/mm.h> /* mem_init */
 #include <linux/initrd.h>
+#include <linux/of_fdt.h>
 #include <linux/pagemap.h>
 #include <linux/pfn.h>
 #include <linux/slab.h>
@@ -261,6 +262,8 @@ asmlinkage void __init mmu_init(void)
 
 	parse_early_param();
 
+	early_init_fdt_scan_reserved_mem();
+
 	/* CMA initialization */
 	dma_contiguous_reserve(memory_start + lowmem_size - 1);
 
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 0/2] microblaze: Add support for reserved memory
  2022-02-25 13:17 [PATCH 0/2] microblaze: Add support for reserved memory Michal Simek
  2022-02-25 13:17 ` [PATCH 1/2] microblaze: Wire memblock_dump_all() Michal Simek
  2022-02-25 13:17 ` [PATCH 2/2] microblaze: Add support for reserved memory defined by DT Michal Simek
@ 2022-04-21  8:56 ` Michal Simek
  2 siblings, 0 replies; 4+ messages in thread
From: Michal Simek @ 2022-04-21  8:56 UTC (permalink / raw)
  To: LKML, Michal Simek, git
  Cc: Andrew Morton, David Hildenbrand, Kefeng Wang, Mike Rapoport,
	Oscar Salvador, Russell King

pá 25. 2. 2022 v 14:17 odesílatel Michal Simek <michal.simek@xilinx.com> napsal:
>
> Hi,
>
> sending two patches for adding support for reserved memory nodes.
> Till now architecture ignores these nodes and normally use memory for own
> purpose.
> The first patch is memblock dump wiring to be able to confirm that
> reservation is working properly.
>
> Thanks,
> Michal
>
>
> Michal Simek (2):
>   microblaze: Wire memblock_dump_all()
>   microblaze: Add support for reserved memory defined by DT
>
>  arch/microblaze/mm/init.c | 5 +++++
>  1 file changed, 5 insertions(+)
>
> --
> 2.35.1
>

Applied.
M

-- 
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Xilinx Microblaze
Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs
U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal SoCs

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-04-21  8:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-25 13:17 [PATCH 0/2] microblaze: Add support for reserved memory Michal Simek
2022-02-25 13:17 ` [PATCH 1/2] microblaze: Wire memblock_dump_all() Michal Simek
2022-02-25 13:17 ` [PATCH 2/2] microblaze: Add support for reserved memory defined by DT Michal Simek
2022-04-21  8:56 ` [PATCH 0/2] microblaze: Add support for reserved memory Michal Simek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.