linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: jean.pihet@newoldbits.com (jean.pihet at newoldbits.com)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] OMAP: use fncpy to copy the PM code functions to SRAM
Date: Fri, 14 Jan 2011 16:21:10 +0100	[thread overview]
Message-ID: <1295018470-18099-1-git-send-email-j-pihet@ti.com> (raw)

From: Jean Pihet <j-pihet@ti.com>

The new fncpy API is better suited for copying some
code to SRAM at runtime. This patch changes the ad-hoc
code to the more generic fncpy API.

Tested OK on OMAP3 in low power modes (RET/OFF)
with !CONFIG_THUMB2_KERNEL

Signed-off-by: Jean Pihet <j-pihet@ti.com>
---
 arch/arm/plat-omap/sram.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c
index e26e504..e2982b0 100644
--- a/arch/arm/plat-omap/sram.c
+++ b/arch/arm/plat-omap/sram.c
@@ -23,7 +23,7 @@
 
 #include <asm/tlb.h>
 #include <asm/cacheflush.h>
-
+#include <asm/fncpy.h>
 #include <asm/mach/map.h>
 
 #include <plat/sram.h>
@@ -251,9 +251,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)omap_sram_ceil,
-		(unsigned long)(omap_sram_ceil + size));
+
+	fncpy((void *)omap_sram_ceil, start, size);
 
 	return (void *)omap_sram_ceil;
 }
-- 
1.7.2.3

             reply	other threads:[~2011-01-14 15:21 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-14 15:21 jean.pihet at newoldbits.com [this message]
2011-01-14 15:23 ` [PATCH] OMAP: use fncpy to copy the PM code functions to SRAM Jean Pihet
2011-01-14 15:58 ` Russell King - ARM Linux
2011-01-14 16:13   ` Jean Pihet
2011-01-14 17:34     ` Russell King - ARM Linux
2011-01-17 14:01       ` Jean Pihet
2011-01-17 15:46         ` Dave Martin
2011-01-18 12:05           ` Jean Pihet
2011-01-18 23:42             ` Russell King - ARM Linux
2011-01-18 23:44               ` Tony Lindgren
2011-01-19  8:06                 ` Jean Pihet
2011-01-19 19:10                   ` Tony Lindgren
2011-01-19 21:37                     ` Jean Pihet
2011-01-19 21:44                       ` Tony Lindgren
  -- strict thread matches above, loose matches on Subject: below --
2011-02-02 14:45 [PATCH] omap: " jean.pihet at newoldbits.com

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=1295018470-18099-1-git-send-email-j-pihet@ti.com \
    --to=jean.pihet@newoldbits.com \
    --cc=linux-arm-kernel@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;
as well as URLs for NNTP newsgroup(s).