All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arch: microblaze: support for reserved-memory entries in DT
@ 2019-10-22  8:19 Alvaro Gamez Machado
  2019-10-23  7:59 ` Michal Simek
  0 siblings, 1 reply; 4+ messages in thread
From: Alvaro Gamez Machado @ 2019-10-22  8:19 UTC (permalink / raw)
  To: Michal Simek, Andrew Morton, linux-kernel; +Cc: Alvaro Gamez Machado

Signed-off-by: Alvaro Gamez Machado <alvaro.gamez@hazent.com>
---
 arch/microblaze/mm/init.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/microblaze/mm/init.c b/arch/microblaze/mm/init.c
index a015a951c8b7..928c5c2816e4 100644
--- a/arch/microblaze/mm/init.c
+++ b/arch/microblaze/mm/init.c
@@ -17,6 +17,8 @@
 #include <linux/slab.h>
 #include <linux/swap.h>
 #include <linux/export.h>
+#include <linux/of_fdt.h>
+#include <linux/of.h>
 
 #include <asm/page.h>
 #include <asm/mmu_context.h>
@@ -188,6 +190,9 @@ void __init setup_memory(void)
 
 void __init mem_init(void)
 {
+	early_init_fdt_reserve_self();
+	early_init_fdt_scan_reserved_mem();
+
 	high_memory = (void *)__va(memory_start + lowmem_size - 1);
 
 	/* this will put all memory onto the freelists */
-- 
2.23.0


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

* Re: [PATCH] arch: microblaze: support for reserved-memory entries in DT
  2019-10-22  8:19 [PATCH] arch: microblaze: support for reserved-memory entries in DT Alvaro Gamez Machado
@ 2019-10-23  7:59 ` Michal Simek
  2019-10-23  8:17   ` Alvaro Gamez Machado
  0 siblings, 1 reply; 4+ messages in thread
From: Michal Simek @ 2019-10-23  7:59 UTC (permalink / raw)
  To: Alvaro Gamez Machado, Andrew Morton, linux-kernel

Hi,


On 22. 10. 19 10:19, Alvaro Gamez Machado wrote:
> Signed-off-by: Alvaro Gamez Machado <alvaro.gamez@hazent.com>

please put there reasonable description to commit message.

> ---
>  arch/microblaze/mm/init.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/arch/microblaze/mm/init.c b/arch/microblaze/mm/init.c
> index a015a951c8b7..928c5c2816e4 100644
> --- a/arch/microblaze/mm/init.c
> +++ b/arch/microblaze/mm/init.c
> @@ -17,6 +17,8 @@
>  #include <linux/slab.h>
>  #include <linux/swap.h>
>  #include <linux/export.h>
> +#include <linux/of_fdt.h>
> +#include <linux/of.h>

of_fdt.h should be enough.

>  
>  #include <asm/page.h>
>  #include <asm/mmu_context.h>
> @@ -188,6 +190,9 @@ void __init setup_memory(void)
>  
>  void __init mem_init(void)
>  {
> +	early_init_fdt_reserve_self();
> +	early_init_fdt_scan_reserved_mem();
> +
>  	high_memory = (void *)__va(memory_start + lowmem_size - 1);
>  
>  	/* this will put all memory onto the freelists */
> 


Also I have looked at others arch and take a look at

1b10cb21d888c021bedbe678f7c26aee1bf04ffa
ARC: add support for reserved memory defined by device tree

where they also enable OF_RESERVED_MEM to call fdt_init_reserve_mem()

The same here
4e7c84ec045921dacc78d36295e2e61390249665
 xtensa: support reserved-memory DT node

and here
9bf14b7c540ae9ca7747af3a0c0d8470ef77b6ce
arm64: add support for reserved memory defined by device tree


Please note this in commit message.

Thanks,
Michal


-- 
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

* Re: [PATCH] arch: microblaze: support for reserved-memory entries in DT
  2019-10-23  7:59 ` Michal Simek
@ 2019-10-23  8:17   ` Alvaro Gamez Machado
  2019-10-23 10:23     ` Michal Simek
  0 siblings, 1 reply; 4+ messages in thread
From: Alvaro Gamez Machado @ 2019-10-23  8:17 UTC (permalink / raw)
  To: Michal Simek; +Cc: Andrew Morton, linux-kernel

Hi Michal

On Wed, Oct 23, 2019 at 09:59:40AM +0200, Michal Simek wrote:
> Hi,
> 
> 
> On 22. 10. 19 10:19, Alvaro Gamez Machado wrote:
> > Signed-off-by: Alvaro Gamez Machado <alvaro.gamez@hazent.com>
> 
> please put there reasonable description to commit message.

Ok, will use those below as template.
 
> > ---
> >  arch/microblaze/mm/init.c | 5 +++++
> >  1 file changed, 5 insertions(+)
> > 
> > diff --git a/arch/microblaze/mm/init.c b/arch/microblaze/mm/init.c
> > index a015a951c8b7..928c5c2816e4 100644
> > --- a/arch/microblaze/mm/init.c
> > +++ b/arch/microblaze/mm/init.c
> > @@ -17,6 +17,8 @@
> >  #include <linux/slab.h>
> >  #include <linux/swap.h>
> >  #include <linux/export.h>
> > +#include <linux/of_fdt.h>
> > +#include <linux/of.h>
> 
> of_fdt.h should be enough.

Ok

> >  
> >  #include <asm/page.h>
> >  #include <asm/mmu_context.h>
> > @@ -188,6 +190,9 @@ void __init setup_memory(void)
> >  
> >  void __init mem_init(void)
> >  {
> > +	early_init_fdt_reserve_self();
> > +	early_init_fdt_scan_reserved_mem();
> > +
> >  	high_memory = (void *)__va(memory_start + lowmem_size - 1);
> >  
> >  	/* this will put all memory onto the freelists */
> > 
> 
> 
> Also I have looked at others arch and take a look at
> 
> 1b10cb21d888c021bedbe678f7c26aee1bf04ffa
> ARC: add support for reserved memory defined by device tree
> 
> where they also enable OF_RESERVED_MEM to call fdt_init_reserve_mem()
> 
> The same here
> 4e7c84ec045921dacc78d36295e2e61390249665
>  xtensa: support reserved-memory DT node
> 
> and here
> 9bf14b7c540ae9ca7747af3a0c0d8470ef77b6ce
> arm64: add support for reserved memory defined by device tree
> 

They did that at the time, but it seems it's not needed anymore:

34e04eedd1cf1be714abb0e5976338cc72ccc05f
  of: select OF_RESERVED_MEM automatically

This commit removed those select OF_RESERVED_MEM lines. Is it needed
specifically for microblaze? I didn't need to do that in order for
reserved-memory entries to work on my platform.

Thanks!

> Please note this in commit message.
> 
> Thanks,
> Michal
> 
> 
> -- 
> 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
> 

-- 
Alvaro G. M.

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

* Re: [PATCH] arch: microblaze: support for reserved-memory entries in DT
  2019-10-23  8:17   ` Alvaro Gamez Machado
@ 2019-10-23 10:23     ` Michal Simek
  0 siblings, 0 replies; 4+ messages in thread
From: Michal Simek @ 2019-10-23 10:23 UTC (permalink / raw)
  To: Alvaro Gamez Machado; +Cc: Andrew Morton, linux-kernel

On 23. 10. 19 10:17, Alvaro Gamez Machado wrote:
> Hi Michal
> 
> On Wed, Oct 23, 2019 at 09:59:40AM +0200, Michal Simek wrote:
>> Hi,
>>
>>
>> On 22. 10. 19 10:19, Alvaro Gamez Machado wrote:
>>> Signed-off-by: Alvaro Gamez Machado <alvaro.gamez@hazent.com>
>>
>> please put there reasonable description to commit message.
> 
> Ok, will use those below as template.
>  
>>> ---
>>>  arch/microblaze/mm/init.c | 5 +++++
>>>  1 file changed, 5 insertions(+)
>>>
>>> diff --git a/arch/microblaze/mm/init.c b/arch/microblaze/mm/init.c
>>> index a015a951c8b7..928c5c2816e4 100644
>>> --- a/arch/microblaze/mm/init.c
>>> +++ b/arch/microblaze/mm/init.c
>>> @@ -17,6 +17,8 @@
>>>  #include <linux/slab.h>
>>>  #include <linux/swap.h>
>>>  #include <linux/export.h>
>>> +#include <linux/of_fdt.h>
>>> +#include <linux/of.h>
>>
>> of_fdt.h should be enough.
> 
> Ok
> 
>>>  
>>>  #include <asm/page.h>
>>>  #include <asm/mmu_context.h>
>>> @@ -188,6 +190,9 @@ void __init setup_memory(void)
>>>  
>>>  void __init mem_init(void)
>>>  {
>>> +	early_init_fdt_reserve_self();
>>> +	early_init_fdt_scan_reserved_mem();
>>> +
>>>  	high_memory = (void *)__va(memory_start + lowmem_size - 1);
>>>  
>>>  	/* this will put all memory onto the freelists */
>>>
>>
>>
>> Also I have looked at others arch and take a look at
>>
>> 1b10cb21d888c021bedbe678f7c26aee1bf04ffa
>> ARC: add support for reserved memory defined by device tree
>>
>> where they also enable OF_RESERVED_MEM to call fdt_init_reserve_mem()
>>
>> The same here
>> 4e7c84ec045921dacc78d36295e2e61390249665
>>  xtensa: support reserved-memory DT node
>>
>> and here
>> 9bf14b7c540ae9ca7747af3a0c0d8470ef77b6ce
>> arm64: add support for reserved memory defined by device tree
>>
> 
> They did that at the time, but it seems it's not needed anymore:
> 
> 34e04eedd1cf1be714abb0e5976338cc72ccc05f
>   of: select OF_RESERVED_MEM automatically
> 
> This commit removed those select OF_RESERVED_MEM lines. Is it needed
> specifically for microblaze? I didn't need to do that in order for
> reserved-memory entries to work on my platform.

Ok. Even better. It is not needed if it is built already.

Thanks,
Michal


-- 
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:[~2019-10-23 10:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-22  8:19 [PATCH] arch: microblaze: support for reserved-memory entries in DT Alvaro Gamez Machado
2019-10-23  7:59 ` Michal Simek
2019-10-23  8:17   ` Alvaro Gamez Machado
2019-10-23 10:23     ` 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.