mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH master 3/3] RISC-V: boot: move stack top to very end of memory
Date: Wed, 24 Mar 2021 09:23:04 +0100	[thread overview]
Message-ID: <20210324082304.30858-3-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20210324082304.30858-1-a.fatoum@pengutronix.de>

Now that the generic DT entry point used for QEMU virt takes care to
prevent the PBL common code from overwriting the FDT, we can remove
the 2M wasteland after the stack top.
This reduces fragmentation on low memory platforms like erizo.

Reported-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
Fix for master to reduce memory fragmentation on erizo
---
 arch/riscv/include/asm/barebox-riscv.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/riscv/include/asm/barebox-riscv.h b/arch/riscv/include/asm/barebox-riscv.h
index 948a562c5c1f..bb1d15308b48 100644
--- a/arch/riscv/include/asm/barebox-riscv.h
+++ b/arch/riscv/include/asm/barebox-riscv.h
@@ -36,7 +36,7 @@ void *barebox_riscv_boot_dtb(void);
 static inline unsigned long riscv_mem_stack_top(unsigned long membase,
 						unsigned long endmem)
 {
-	return endmem - SZ_2M;
+	return endmem;
 }
 
 static inline unsigned long riscv_mem_stack(unsigned long membase,
-- 
2.29.2


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


  parent reply	other threads:[~2021-03-24  8:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-24  8:23 [PATCH master 1/3] RISC-V: cpu: request stack memory region Ahmad Fatoum
2021-03-24  8:23 ` [PATCH master 2/3] RISC-V: board-dt-2nd: ensure FDT doesn't overlap with early mem regions Ahmad Fatoum
2021-03-24  8:23 ` Ahmad Fatoum [this message]
2021-03-29  7:57 ` [PATCH master 1/3] RISC-V: cpu: request stack memory region Sascha Hauer
2021-04-02  5:56 ` Antony Pavlov
2021-04-02  6:34   ` Ahmad Fatoum
2021-04-02  8:13     ` Antony Pavlov
2021-04-03  7:09       ` Ahmad Fatoum
2021-04-03  9:00         ` Antony Pavlov
2021-04-04 11:26           ` Ahmad Fatoum

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=20210324082304.30858-3-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /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