* [PATCH -fixes] riscv: Do not restrict memory size because of linear mapping on nommu
@ 2024-08-27 6:52 Alexandre Ghiti
2024-08-27 7:11 ` Geert Uytterhoeven
2024-09-03 19:10 ` patchwork-bot+linux-riscv
0 siblings, 2 replies; 3+ messages in thread
From: Alexandre Ghiti @ 2024-08-27 6:52 UTC (permalink / raw)
To: Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
David McKay, Stuart Menefy, linux-riscv, linux-kernel
Cc: Geert Uytterhoeven
It makes no sense to restrict physical memory size because of linear
mapping size constraints when there is no linear mapping, so only do
that when mmu is enabled.
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Closes: https://lore.kernel.org/linux-riscv/CAMuHMdW0bnJt5GMRtOZGkTiM7GK4UaLJCDMF_Ouq++fnDKi3_A@mail.gmail.com/
Fixes: 3b6564427aea ("riscv: Fix linear mapping checks for non-contiguous memory regions")
Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
---
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 eb0649a61b4c..1785782c2e55 100644
--- a/arch/riscv/mm/init.c
+++ b/arch/riscv/mm/init.c
@@ -252,7 +252,7 @@ static void __init setup_bootmem(void)
* The size of the linear page mapping may restrict the amount of
* usable RAM.
*/
- if (IS_ENABLED(CONFIG_64BIT)) {
+ if (IS_ENABLED(CONFIG_64BIT) && IS_ENABLED(CONFIG_MMU)) {
max_mapped_addr = __pa(PAGE_OFFSET) + KERN_VIRT_SIZE;
memblock_cap_memory_range(phys_ram_base,
max_mapped_addr - phys_ram_base);
--
2.39.2
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH -fixes] riscv: Do not restrict memory size because of linear mapping on nommu
2024-08-27 6:52 [PATCH -fixes] riscv: Do not restrict memory size because of linear mapping on nommu Alexandre Ghiti
@ 2024-08-27 7:11 ` Geert Uytterhoeven
2024-09-03 19:10 ` patchwork-bot+linux-riscv
1 sibling, 0 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2024-08-27 7:11 UTC (permalink / raw)
To: Alexandre Ghiti
Cc: Paul Walmsley, Palmer Dabbelt, Albert Ou, David McKay,
Stuart Menefy, linux-riscv, linux-kernel
Hi Alex,
On Tue, Aug 27, 2024 at 8:52 AM Alexandre Ghiti <alexghiti@rivosinc.com> wrote:
> It makes no sense to restrict physical memory size because of linear
> mapping size constraints when there is no linear mapping, so only do
> that when mmu is enabled.
>
> Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
> Closes: https://lore.kernel.org/linux-riscv/CAMuHMdW0bnJt5GMRtOZGkTiM7GK4UaLJCDMF_Ouq++fnDKi3_A@mail.gmail.com/
> Fixes: 3b6564427aea ("riscv: Fix linear mapping checks for non-contiguous memory regions")
> Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Thanks for your patch!
Sorry, I didn't get to test the preview yesterday...
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH -fixes] riscv: Do not restrict memory size because of linear mapping on nommu
2024-08-27 6:52 [PATCH -fixes] riscv: Do not restrict memory size because of linear mapping on nommu Alexandre Ghiti
2024-08-27 7:11 ` Geert Uytterhoeven
@ 2024-09-03 19:10 ` patchwork-bot+linux-riscv
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+linux-riscv @ 2024-09-03 19:10 UTC (permalink / raw)
To: Alexandre Ghiti
Cc: linux-riscv, paul.walmsley, palmer, aou, david.mckay,
stuart.menefy, linux-kernel, geert
Hello:
This patch was applied to riscv/linux.git (fixes)
by Palmer Dabbelt <palmer@rivosinc.com>:
On Tue, 27 Aug 2024 08:52:30 +0200 you wrote:
> It makes no sense to restrict physical memory size because of linear
> mapping size constraints when there is no linear mapping, so only do
> that when mmu is enabled.
>
> Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
> Closes: https://lore.kernel.org/linux-riscv/CAMuHMdW0bnJt5GMRtOZGkTiM7GK4UaLJCDMF_Ouq++fnDKi3_A@mail.gmail.com/
> Fixes: 3b6564427aea ("riscv: Fix linear mapping checks for non-contiguous memory regions")
> Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
>
> [...]
Here is the summary with links:
- [-fixes] riscv: Do not restrict memory size because of linear mapping on nommu
https://git.kernel.org/riscv/c/5f771088a2b5
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-09-03 19:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-27 6:52 [PATCH -fixes] riscv: Do not restrict memory size because of linear mapping on nommu Alexandre Ghiti
2024-08-27 7:11 ` Geert Uytterhoeven
2024-09-03 19:10 ` patchwork-bot+linux-riscv
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox