* [PATCH] MIPS: init cache before flashing it
@ 2019-10-15 16:09 Oleksij Rempel
2019-10-15 20:41 ` Antony Pavlov
0 siblings, 1 reply; 4+ messages in thread
From: Oleksij Rempel @ 2019-10-15 16:09 UTC (permalink / raw)
To: barebox; +Cc: Oleksij Rempel
Cache information was not initialized on flush_cache_all(). This was the
reason for relatively slow boot speed on MIPS.
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
---
arch/mips/lib/reloc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/mips/lib/reloc.c b/arch/mips/lib/reloc.c
index 9a9e404f7e..3d05ff1381 100644
--- a/arch/mips/lib/reloc.c
+++ b/arch/mips/lib/reloc.c
@@ -40,6 +40,7 @@
#include <linux/sizes.h>
#include <asm-generic/memory_layout.h>
+void r4k_cache_init(void);
void main_entry(void *fdt, u32 fdt_size);
void relocate_code(void *fdt, u32 fdt_size, u32 relocaddr);
@@ -146,6 +147,7 @@ void relocate_code(void *fdt, u32 fdt_size, u32 ram_size)
apply_reloc(type, (void *)addr, off);
}
+ r4k_cache_init();
/* Ensure the icache is coherent */
flush_cache_all();
--
2.23.0
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] MIPS: init cache before flashing it
2019-10-15 16:09 [PATCH] MIPS: init cache before flashing it Oleksij Rempel
@ 2019-10-15 20:41 ` Antony Pavlov
2019-10-16 4:28 ` Oleksij Rempel
2019-10-16 4:34 ` Oleksij Rempel
0 siblings, 2 replies; 4+ messages in thread
From: Antony Pavlov @ 2019-10-15 20:41 UTC (permalink / raw)
To: Oleksij Rempel; +Cc: barebox
On Tue, 15 Oct 2019 18:09:45 +0200
Oleksij Rempel <o.rempel@pengutronix.de> wrote:
Hi!
Please review this thread http://lists.infradead.org/pipermail/barebox/2019-June/038530.html
AFAIR we have to clear BSS before calling r4k_cache_init().
--
Best regards,
Antony Pavlov
> Cache information was not initialized on flush_cache_all(). This was the
> reason for relatively slow boot speed on MIPS.
>
> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
> ---
> arch/mips/lib/reloc.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/arch/mips/lib/reloc.c b/arch/mips/lib/reloc.c
> index 9a9e404f7e..3d05ff1381 100644
> --- a/arch/mips/lib/reloc.c
> +++ b/arch/mips/lib/reloc.c
> @@ -40,6 +40,7 @@
> #include <linux/sizes.h>
> #include <asm-generic/memory_layout.h>
>
> +void r4k_cache_init(void);
> void main_entry(void *fdt, u32 fdt_size);
> void relocate_code(void *fdt, u32 fdt_size, u32 relocaddr);
>
> @@ -146,6 +147,7 @@ void relocate_code(void *fdt, u32 fdt_size, u32 ram_size)
> apply_reloc(type, (void *)addr, off);
> }
>
> + r4k_cache_init();
> /* Ensure the icache is coherent */
> flush_cache_all();
>
> --
> 2.23.0
>
>
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] MIPS: init cache before flashing it
2019-10-15 20:41 ` Antony Pavlov
@ 2019-10-16 4:28 ` Oleksij Rempel
2019-10-16 4:34 ` Oleksij Rempel
1 sibling, 0 replies; 4+ messages in thread
From: Oleksij Rempel @ 2019-10-16 4:28 UTC (permalink / raw)
To: Antony Pavlov; +Cc: barebox
[-- Attachment #1.1: Type: text/plain, Size: 1950 bytes --]
Hi Antony,
On Tue, Oct 15, 2019 at 11:41:06PM +0300, Antony Pavlov wrote:
> On Tue, 15 Oct 2019 18:09:45 +0200
> Oleksij Rempel <o.rempel@pengutronix.de> wrote:
>
> Hi!
>
> Please review this thread http://lists.infradead.org/pipermail/barebox/2019-June/038530.html
> AFAIR we have to clear BSS before calling r4k_cache_init().
Ah... you right! Can you please resend your patch?
Best regards,
Oleksij
> --
> Best regards,
> Antony Pavlov
>
> > Cache information was not initialized on flush_cache_all(). This was the
> > reason for relatively slow boot speed on MIPS.
> >
> > Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
> > ---
> > arch/mips/lib/reloc.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/arch/mips/lib/reloc.c b/arch/mips/lib/reloc.c
> > index 9a9e404f7e..3d05ff1381 100644
> > --- a/arch/mips/lib/reloc.c
> > +++ b/arch/mips/lib/reloc.c
> > @@ -40,6 +40,7 @@
> > #include <linux/sizes.h>
> > #include <asm-generic/memory_layout.h>
> >
> > +void r4k_cache_init(void);
> > void main_entry(void *fdt, u32 fdt_size);
> > void relocate_code(void *fdt, u32 fdt_size, u32 relocaddr);
> >
> > @@ -146,6 +147,7 @@ void relocate_code(void *fdt, u32 fdt_size, u32 ram_size)
> > apply_reloc(type, (void *)addr, off);
> > }
> >
> > + r4k_cache_init();
> > /* Ensure the icache is coherent */
> > flush_cache_all();
> >
> > --
> > 2.23.0
> >
> >
> > _______________________________________________
> > 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 |
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 149 bytes --]
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] MIPS: init cache before flashing it
2019-10-15 20:41 ` Antony Pavlov
2019-10-16 4:28 ` Oleksij Rempel
@ 2019-10-16 4:34 ` Oleksij Rempel
1 sibling, 0 replies; 4+ messages in thread
From: Oleksij Rempel @ 2019-10-16 4:34 UTC (permalink / raw)
To: Antony Pavlov; +Cc: barebox
[-- Attachment #1.1: Type: text/plain, Size: 2094 bytes --]
On Tue, Oct 15, 2019 at 11:41:06PM +0300, Antony Pavlov wrote:
> On Tue, 15 Oct 2019 18:09:45 +0200
> Oleksij Rempel <o.rempel@pengutronix.de> wrote:
>
> Hi!
>
> Please review this thread http://lists.infradead.org/pipermail/barebox/2019-June/038530.html
> AFAIR we have to clear BSS before calling r4k_cache_init().
Hm... your patch need some rework as well. I'll send updated version.
> --
> Best regards,
> Antony Pavlov
>
> > Cache information was not initialized on flush_cache_all(). This was the
> > reason for relatively slow boot speed on MIPS.
> >
> > Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
> > ---
> > arch/mips/lib/reloc.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/arch/mips/lib/reloc.c b/arch/mips/lib/reloc.c
> > index 9a9e404f7e..3d05ff1381 100644
> > --- a/arch/mips/lib/reloc.c
> > +++ b/arch/mips/lib/reloc.c
> > @@ -40,6 +40,7 @@
> > #include <linux/sizes.h>
> > #include <asm-generic/memory_layout.h>
> >
> > +void r4k_cache_init(void);
> > void main_entry(void *fdt, u32 fdt_size);
> > void relocate_code(void *fdt, u32 fdt_size, u32 relocaddr);
> >
> > @@ -146,6 +147,7 @@ void relocate_code(void *fdt, u32 fdt_size, u32 ram_size)
> > apply_reloc(type, (void *)addr, off);
> > }
> >
> > + r4k_cache_init();
> > /* Ensure the icache is coherent */
> > flush_cache_all();
> >
> > --
> > 2.23.0
> >
> >
> > _______________________________________________
> > barebox mailing list
> > barebox@lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/barebox
>
> _______________________________________________
> 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 |
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 149 bytes --]
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-10-16 4:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-15 16:09 [PATCH] MIPS: init cache before flashing it Oleksij Rempel
2019-10-15 20:41 ` Antony Pavlov
2019-10-16 4:28 ` Oleksij Rempel
2019-10-16 4:34 ` Oleksij Rempel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox