[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190115134746.GF13216@infradead.org>
Date: Tue, 15 Jan 2019 05:47:46 -0800
From: Christoph Hellwig <hch@...radead.org>
To: Anup Patel <anup@...infault.org>
Cc: Palmer Dabbelt <palmer@...ive.com>,
Albert Ou <aou@...s.berkeley.edu>,
Anup Patel <anup.patel@....com>, linux-kernel@...r.kernel.org,
Christoph Hellwig <hch@...radead.org>,
Atish Patra <atish.patra@....com>,
Paul Walmsley <paul.walmsley@...ive.com>,
linux-riscv@...ts.infradead.org
Subject: Re: [PATCH 5/5] RISC-V: Implement compile-time fixed mappings
On Mon, Jan 07, 2019 at 09:40:47PM +0530, Anup Patel wrote:
> From: Anup Patel <anup.patel@....com>
>
> This patch implements compile-time virtual to physical
> mappings. These compile-time fixed mappings can be used
> by earlycon, ACPI, and early ioremap for creating fixed
> mappings when FIX_EARLYCON_MEM=y.
>
> To start with, we have enabled compile-time fixed
> mappings for earlycon.
>
> Signed-off-by: Anup Patel <anup.patel@....com>
> ---
> arch/riscv/Kconfig | 3 ++
> arch/riscv/include/asm/fixmap.h | 52 +++++++++++++++++++++++++++++++++
> arch/riscv/mm/init.c | 32 ++++++++++++++++++++
> 3 files changed, 87 insertions(+)
> create mode 100644 arch/riscv/include/asm/fixmap.h
>
> diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
> index e0d7d61779a6..66094aba9a59 100644
> --- a/arch/riscv/Kconfig
> +++ b/arch/riscv/Kconfig
> @@ -86,6 +86,9 @@ config GENERIC_CSUM
> config GENERIC_HWEIGHT
> def_bool y
>
> +config FIX_EARLYCON_MEM
> + def_bool y
> +
Can you please throw in a prep patch to move FIX_EARLYCON_MEM to
drivers/tty/serial/Kconfig and only select it from the architectures
that use it?
> + * fixmap.h: compile-time virtual memory allocation
No need to mention the header name.
> + */
> +
> +#ifndef _ASM_RISCV_FIXMAP_H
> +#define _ASM_RISCV_FIXMAP_H
> +
> +#ifndef __ASSEMBLY__
As far as I can tell we never include this header from assembly files,
so this ifdef should not be needed.
> +/*
> + * Here we define all the compile-time 'special' virtual
> + * addresses. The point is to have a constant address at
> + * compile time, but to set the physical address only
> + * in the boot process.
> + *
> + * These 'compile-time allocated' memory buffers are
> + * page-sized. Use set_fixmap(idx,phys) to associate
> + * physical memory with fixmap indices.
> + */
Please use up the available 80 chars per line for comments.
Powered by blists - more mailing lists