* [PATCH] mvebu: make the compiler inline mvebu_remap_registers
@ 2019-06-05 10:23 Uwe Kleine-König
2019-06-07 7:01 ` Sascha Hauer
0 siblings, 1 reply; 2+ messages in thread
From: Uwe Kleine-König @ 2019-06-05 10:23 UTC (permalink / raw)
To: barebox
Without that gcc 7.3.1 (from OSELAS.Toolchain-2018.02.0) makes
mvebu_remap_registers a standalone function which in its prolog saves
two registers to the stack. However this function is called early during
startup when there is no stack available yet and sp still points into
the nirvana which makes barebox crash.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
arch/arm/mach-mvebu/common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mach-mvebu/common.c b/arch/arm/mach-mvebu/common.c
index 6b4fa8b889d1..5650c1ed8726 100644
--- a/arch/arm/mach-mvebu/common.c
+++ b/arch/arm/mach-mvebu/common.c
@@ -188,7 +188,7 @@ mem_initcall(mvebu_meminit);
#define MVEBU_BRIDGE_REG_BASE 0x20000
#define DEVICE_INTERNAL_BASE_ADDR (MVEBU_BRIDGE_REG_BASE + 0x80)
-static void mvebu_remap_registers(void)
+static __always_inline void mvebu_remap_registers(void)
{
void __iomem *base = mvebu_get_initial_int_reg_base();
--
2.20.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] mvebu: make the compiler inline mvebu_remap_registers
2019-06-05 10:23 [PATCH] mvebu: make the compiler inline mvebu_remap_registers Uwe Kleine-König
@ 2019-06-07 7:01 ` Sascha Hauer
0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2019-06-07 7:01 UTC (permalink / raw)
To: Uwe Kleine-König; +Cc: barebox
On Wed, Jun 05, 2019 at 12:23:56PM +0200, Uwe Kleine-König wrote:
> Without that gcc 7.3.1 (from OSELAS.Toolchain-2018.02.0) makes
> mvebu_remap_registers a standalone function which in its prolog saves
> two registers to the stack. However this function is called early during
> startup when there is no stack available yet and sp still points into
> the nirvana which makes barebox crash.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
> arch/arm/mach-mvebu/common.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied, thanks
Sascha
>
> diff --git a/arch/arm/mach-mvebu/common.c b/arch/arm/mach-mvebu/common.c
> index 6b4fa8b889d1..5650c1ed8726 100644
> --- a/arch/arm/mach-mvebu/common.c
> +++ b/arch/arm/mach-mvebu/common.c
> @@ -188,7 +188,7 @@ mem_initcall(mvebu_meminit);
> #define MVEBU_BRIDGE_REG_BASE 0x20000
> #define DEVICE_INTERNAL_BASE_ADDR (MVEBU_BRIDGE_REG_BASE + 0x80)
>
> -static void mvebu_remap_registers(void)
> +static __always_inline void mvebu_remap_registers(void)
> {
> void __iomem *base = mvebu_get_initial_int_reg_base();
>
> --
> 2.20.1
>
>
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-06-07 7:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-05 10:23 [PATCH] mvebu: make the compiler inline mvebu_remap_registers Uwe Kleine-König
2019-06-07 7:01 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox