linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Palmer Dabbelt <palmer@dabbelt.com>
To: alex@ghiti.fr
Cc: Paul Walmsley <paul.walmsley@sifive.com>,
	aou@eecs.berkeley.edu, linux-riscv@lists.infradead.org,
	linux-kernel@vger.kernel.org, alex@ghiti.fr
Subject: Re: [PATCH -fixes] riscv: Fix comment regarding kernel mapping overlapping with IS_ERR_VALUE
Date: Thu, 12 Aug 2021 00:18:34 -0700 (PDT)	[thread overview]
Message-ID: <mhng-450bca42-382b-4821-8310-a2d43108c7cd@palmerdabbelt-glaptop> (raw)
In-Reply-To: <20210726054254.21801-1-alex@ghiti.fr>

On Sun, 25 Jul 2021 22:42:54 PDT (-0700), alex@ghiti.fr wrote:
> The current comment states that we check if the 64-bit kernel mapping
> overlaps with the last 4K of the address space that is reserved to
> error values in create_kernel_page_table, which is not the case since it
> is done in setup_vm. But anyway, remove the reference to any function
> and simply note that in 64-bit kernel, the check should be done as soon
> as the kernel mapping base address is known.
>
> Fixes: db6b84a368b4 ("riscv: Make sure the kernel mapping does not
> overlap with IS_ERR_VALUE")
> Signed-off-by: Alexandre Ghiti <alex@ghiti.fr>
> ---
>  arch/riscv/mm/init.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c
> index a14bf3910eec..79a2e02924e4 100644
> --- a/arch/riscv/mm/init.c
> +++ b/arch/riscv/mm/init.c
> @@ -191,7 +191,7 @@ static void __init setup_bootmem(void)
>  	 * if end of dram is equal to maximum addressable memory.  For 64-bit
>  	 * kernel, this problem can't happen here as the end of the virtual
>  	 * address space is occupied by the kernel mapping then this check must
> -	 * be done in create_kernel_page_table.
> +	 * be done as soon as the kernel mapping base address is determined.
>  	 */
>  	max_mapped_addr = __pa(~(ulong)0);
>  	if (max_mapped_addr == (dram_end - 1))

Thanks, this is on fixes.

      reply	other threads:[~2021-08-12  7:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-26  5:42 [PATCH -fixes] riscv: Fix comment regarding kernel mapping overlapping with IS_ERR_VALUE Alexandre Ghiti
2021-08-12  7:18 ` Palmer Dabbelt [this message]

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=mhng-450bca42-382b-4821-8310-a2d43108c7cd@palmerdabbelt-glaptop \
    --to=palmer@dabbelt.com \
    --cc=alex@ghiti.fr \
    --cc=aou@eecs.berkeley.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).