diff mbox

OMAP SRAM: flush the right address after memcpy in omap_sram_push

Message ID af3ea28a0908280226p69175f97m88b8eac5e0bd2502@mail.gmail.com (mailing list archive)
State Awaiting Upstream, archived
Delegated to: Tony Lindgren
Headers show

Commit Message

ye janboe Aug. 28, 2009, 9:26 a.m. UTC
the original flush operation is to flush the function address which is
copied from.
But we do not change the function code and it is not necessary to flush it.

Signed-off-by: janboe <janboe.ye@gmail.com>
---
 arch/arm/plat-omap/sram.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Paul Walmsley Aug. 28, 2009, 10:43 a.m. UTC | #1
On Fri, 28 Aug 2009, ye janboe wrote:

> the original flush operation is to flush the function address which is
> copied from.
> But we do not change the function code and it is not necessary to flush it.
> 
> Signed-off-by: janboe <janboe.ye@gmail.com>

Acked-by: Paul Walmsley <paul@pwsan.com>

thanks Janboe.

Tony, you want to take this one, or do you want me to?

- Paul


> ---
>  arch/arm/plat-omap/sram.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c
> index f2b0fa6..f549d8a 100644
> --- a/arch/arm/plat-omap/sram.c
> +++ b/arch/arm/plat-omap/sram.c
> @@ -270,7 +270,8 @@ void * omap_sram_push(void * start, unsigned long size)
>         omap_sram_ceil -= size;
>         omap_sram_ceil = ROUND_DOWN(omap_sram_ceil, sizeof(void *));
>         memcpy((void *)omap_sram_ceil, start, size);
> -       flush_icache_range((unsigned long)start, (unsigned long)(start + size));
> +       flush_icache_range((unsigned long)omap_sram_ceil,
> +               (unsigned long)(omap_sram_ceil + size));
> 
>         return (void *)omap_sram_ceil;
>  }
> 


--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Tony Lindgren Aug. 28, 2009, 4:03 p.m. UTC | #2
* Paul Walmsley <paul@pwsan.com> [090828 03:43]:
> On Fri, 28 Aug 2009, ye janboe wrote:
> 
> > the original flush operation is to flush the function address which is
> > copied from.
> > But we do not change the function code and it is not necessary to flush it.
> > 
> > Signed-off-by: janboe <janboe.ye@gmail.com>
> 
> Acked-by: Paul Walmsley <paul@pwsan.com>
> 
> thanks Janboe.
> 
> Tony, you want to take this one, or do you want me to?

I can add it to my omap-fixes unless you have a fixes series of your
own coming up.

Tony
 
> - Paul
> 
> 
> > ---
> >  arch/arm/plat-omap/sram.c |    3 ++-
> >  1 files changed, 2 insertions(+), 1 deletions(-)
> > 
> > diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c
> > index f2b0fa6..f549d8a 100644
> > --- a/arch/arm/plat-omap/sram.c
> > +++ b/arch/arm/plat-omap/sram.c
> > @@ -270,7 +270,8 @@ void * omap_sram_push(void * start, unsigned long size)
> >         omap_sram_ceil -= size;
> >         omap_sram_ceil = ROUND_DOWN(omap_sram_ceil, sizeof(void *));
> >         memcpy((void *)omap_sram_ceil, start, size);
> > -       flush_icache_range((unsigned long)start, (unsigned long)(start + size));
> > +       flush_icache_range((unsigned long)omap_sram_ceil,
> > +               (unsigned long)(omap_sram_ceil + size));
> > 
> >         return (void *)omap_sram_ceil;
> >  }
> > 
> 
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c
index f2b0fa6..f549d8a 100644
--- a/arch/arm/plat-omap/sram.c
+++ b/arch/arm/plat-omap/sram.c
@@ -270,7 +270,8 @@  void * omap_sram_push(void * start, unsigned long size)
        omap_sram_ceil -= size;
        omap_sram_ceil = ROUND_DOWN(omap_sram_ceil, sizeof(void *));
        memcpy((void *)omap_sram_ceil, start, size);
-       flush_icache_range((unsigned long)start, (unsigned long)(start + size));
+       flush_icache_range((unsigned long)omap_sram_ceil,
+               (unsigned long)(omap_sram_ceil + size));

        return (void *)omap_sram_ceil;
 }