public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] OMAP SRAM: flush the right address after memcpy in omap_sram_push
@ 2009-08-28  9:26 ye janboe
  2009-08-28 10:43 ` Paul Walmsley
  0 siblings, 1 reply; 3+ messages in thread
From: ye janboe @ 2009-08-28  9:26 UTC (permalink / raw)
  To: Paul Walmsley, tony, khilman; +Cc: linux-omap

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(-)

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;
 }

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] OMAP SRAM: flush the right address after memcpy in omap_sram_push
  2009-08-28  9:26 [PATCH] OMAP SRAM: flush the right address after memcpy in omap_sram_push ye janboe
@ 2009-08-28 10:43 ` Paul Walmsley
  2009-08-28 16:03   ` Tony Lindgren
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Walmsley @ 2009-08-28 10:43 UTC (permalink / raw)
  To: ye janboe; +Cc: tony, khilman, linux-omap

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;
>  }
> 



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] OMAP SRAM: flush the right address after memcpy in omap_sram_push
  2009-08-28 10:43 ` Paul Walmsley
@ 2009-08-28 16:03   ` Tony Lindgren
  0 siblings, 0 replies; 3+ messages in thread
From: Tony Lindgren @ 2009-08-28 16:03 UTC (permalink / raw)
  To: Paul Walmsley; +Cc: ye janboe, khilman, linux-omap

* 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;
> >  }
> > 
> 
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-08-28 16:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-28  9:26 [PATCH] OMAP SRAM: flush the right address after memcpy in omap_sram_push ye janboe
2009-08-28 10:43 ` Paul Walmsley
2009-08-28 16:03   ` Tony Lindgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox