All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Anup Patel <anup@brainfault.org>
Cc: Palmer Dabbelt <palmer@sifive.com>,
	Anup Patel <anup.patel@wdc.com>,
	linux-kernel@vger.kernel.org,
	Christoph Hellwig <hch@infradead.org>,
	Atish Patra <atish.patra@wdc.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	linux-riscv@lists.infradead.org
Subject: Re: [PATCH 5/5] RISC-V: Implement compile-time fixed mappings
Date: Tue, 15 Jan 2019 05:47:46 -0800	[thread overview]
Message-ID: <20190115134746.GF13216@infradead.org> (raw)
In-Reply-To: <20190107161047.10516-6-anup@brainfault.org>

On Mon, Jan 07, 2019 at 09:40:47PM +0530, Anup Patel wrote:
> From: Anup Patel <anup.patel@wdc.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@wdc.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.

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

WARNING: multiple messages have this Message-ID (diff)
From: Christoph Hellwig <hch@infradead.org>
To: Anup Patel <anup@brainfault.org>
Cc: Palmer Dabbelt <palmer@sifive.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	Anup Patel <anup.patel@wdc.com>,
	linux-kernel@vger.kernel.org,
	Christoph Hellwig <hch@infradead.org>,
	Atish Patra <atish.patra@wdc.com>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	linux-riscv@lists.infradead.org
Subject: Re: [PATCH 5/5] RISC-V: Implement compile-time fixed mappings
Date: Tue, 15 Jan 2019 05:47:46 -0800	[thread overview]
Message-ID: <20190115134746.GF13216@infradead.org> (raw)
In-Reply-To: <20190107161047.10516-6-anup@brainfault.org>

On Mon, Jan 07, 2019 at 09:40:47PM +0530, Anup Patel wrote:
> From: Anup Patel <anup.patel@wdc.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@wdc.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.

  reply	other threads:[~2019-01-15 13:47 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-07 16:10 [PATCH 0/5] Fixmap support and MM cleanups Anup Patel
2019-01-07 16:10 ` Anup Patel
2019-01-07 16:10 ` [PATCH 1/5] RISC-V: Move free_initrd_mem() to kernel/setup.c Anup Patel
2019-01-07 16:10   ` Anup Patel
2019-01-15 13:43   ` Christoph Hellwig
2019-01-15 13:43     ` Christoph Hellwig
2019-01-19 10:34     ` Anup Patel
2019-01-19 10:34       ` Anup Patel
2019-01-07 16:10 ` [PATCH 2/5] RISC-V: Setup init_mm before parse_early_param() Anup Patel
2019-01-07 16:10   ` Anup Patel
2019-01-15 13:44   ` Christoph Hellwig
2019-01-15 13:44     ` Christoph Hellwig
2019-01-19 10:42     ` Anup Patel
2019-01-19 10:42       ` Anup Patel
2019-01-07 16:10 ` [PATCH 3/5] RISC-V: Move setup_bootmem() to mm/init.c Anup Patel
2019-01-07 16:10   ` Anup Patel
2019-01-15 13:44   ` Christoph Hellwig
2019-01-15 13:44     ` Christoph Hellwig
2019-01-19 10:43     ` Anup Patel
2019-01-19 10:43       ` Anup Patel
2019-01-07 16:10 ` [PATCH 4/5] RISC-V: Move setup_vm() " Anup Patel
2019-01-07 16:10   ` Anup Patel
2019-01-15 13:45   ` Christoph Hellwig
2019-01-15 13:45     ` Christoph Hellwig
2019-01-07 16:10 ` [PATCH 5/5] RISC-V: Implement compile-time fixed mappings Anup Patel
2019-01-07 16:10   ` Anup Patel
2019-01-15 13:47   ` Christoph Hellwig [this message]
2019-01-15 13:47     ` Christoph Hellwig
2019-01-19 10:44     ` Anup Patel
2019-01-19 10:44       ` Anup Patel
2019-01-19 11:44     ` Anup Patel
2019-01-19 11:44       ` Anup Patel

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=20190115134746.GF13216@infradead.org \
    --to=hch@infradead.org \
    --cc=anup.patel@wdc.com \
    --cc=anup@brainfault.org \
    --cc=aou@eecs.berkeley.edu \
    --cc=atish.patra@wdc.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@sifive.com \
    --cc=paul.walmsley@sifive.com \
    /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 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.