Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1420237

Re: [PATCH v2 01/17] sh: Add sh-specific early_init_dt_reserve_memory_arch

From Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2 01/17] sh: Add sh-specific early_init_dt_reserve_memory_arch
Date 2016-06-12 13:30 +0200
Message-ID <rJbKy-825-21@gated-at.bofh.it> (permalink)
References <rJ7xf-5js-3@gated-at.bofh.it> <rJ7xg-5js-37@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 6/12/2016 9:54 AM, Yoshinori Sato wrote:

> sh used P1 address space in early device tree.
> So need convert P1 to physical address before reserve memory.
>
> Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
> ---
>  arch/sh/boards/of-generic.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
>
> diff --git a/arch/sh/boards/of-generic.c b/arch/sh/boards/of-generic.c
> index 57d45dc..fe2d917 100644
> --- a/arch/sh/boards/of-generic.c
> +++ b/arch/sh/boards/of-generic.c
[...]
> @@ -203,3 +204,14 @@ static int __init sh_of_device_init(void)
>  	return 0;
>  }
>  arch_initcall_sync(sh_of_device_init);
> +
> +int __init early_init_dt_reserve_memory_arch(phys_addr_t base,
> +					     phys_addr_t size, bool nomap)
> +{
> +	if (nomap)
> +		return memblock_remove(base, size);
> +
> +	if (base >= P1SEG)
> +		base = base & ~P1SEG;

		base &= ~P1SEG;

> +	return memblock_reserve(base, size);
> +}

MBR, Sergei

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH v2 00/17] sh: LANDISK convert to device tree Yoshinori Sato <ysato@users.sourceforge.jp> - 2016-06-12 09:00 +0200
  [PATCH v2 10/17] sh: convert generic drivers framework Yoshinori Sato <ysato@users.sourceforge.jp> - 2016-06-12 09:00 +0200
    Re: [PATCH v2 10/17] sh: convert generic drivers framework Geert Uytterhoeven <geert@linux-m68k.org> - 2016-06-13 10:10 +0200
  [PATCH v2 11/17] sh: SH7750/51 clock driver Yoshinori Sato <ysato@users.sourceforge.jp> - 2016-06-12 09:00 +0200
    Re: [PATCH v2 11/17] sh: SH7750/51 clock driver Geert Uytterhoeven <geert@linux-m68k.org> - 2016-06-13 10:20 +0200
  [PATCH v2 09/17] sh: Use GENERIC_IOMAP on device tree mode Yoshinori Sato <ysato@users.sourceforge.jp> - 2016-06-12 09:00 +0200
  [PATCH v2 14/17] sh: SH3/4 Generic IRQCHIP driever Yoshinori Sato <ysato@users.sourceforge.jp> - 2016-06-12 09:00 +0200
    [PATCH v2 14/17] sh: SH3/4 Generic IRQCHIP driever Yoshinori Sato <ysato@users.sourceforge.jp> - 2016-06-12 09:50 +0200
      Re: [PATCH v2 14/17] sh: SH3/4 Generic IRQCHIP driever Rob Herring <robh@kernel.org> - 2016-06-15 00:20 +0200
  [PATCH v2 13/17] sh: Add PCI definetion Yoshinori Sato <ysato@users.sourceforge.jp> - 2016-06-12 09:00 +0200
    Re: [PATCH v2 13/17] sh: Add PCI definetion Geert Uytterhoeven <geert@linux-m68k.org> - 2016-06-13 10:10 +0200
  [PATCH v2 01/17] sh: Add sh-specific early_init_dt_reserve_memory_arch Yoshinori Sato <ysato@users.sourceforge.jp> - 2016-06-12 09:00 +0200
    Re: [PATCH v2 01/17] sh: Add sh-specific  early_init_dt_reserve_memory_arch Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2016-06-12 13:30 +0200

csiph-web