riscv: Fix comment regarding kernel mapping overlapping with IS_ERR_VALUE

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: db6b84a368 ("riscv: Make sure the kernel mapping does not overlap with IS_ERR_VALUE")
Signed-off-by: Alexandre Ghiti <alex@ghiti.fr>
Cc: stable@vger.kernel.org
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
This commit is contained in:
Alexandre Ghiti 2021-07-26 07:42:54 +02:00 committed by Palmer Dabbelt
parent 030d6dbf0c
commit fdf3a7a1e0
No known key found for this signature in database
GPG Key ID: 2E1319F35FBB1889
1 changed files with 1 additions and 1 deletions

View File

@ -197,7 +197,7 @@ static void __init setup_bootmem(void)
* if end of dram is equal to maximum addressable memory. For 64-bit * 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 * 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 * 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); max_mapped_addr = __pa(~(ulong)0);
if (max_mapped_addr == (phys_ram_end - 1)) if (max_mapped_addr == (phys_ram_end - 1))