From: Paul Walmsley Date: Mon, 19 Nov 2007 19:11:43 +0000 (-0700) Subject: flush I-cache after omap_sram_push() X-Git-Tag: v2.6.24-omap1~181 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=498c996e43219fe1bd335e1946225a84d25a9a65;p=linux-2.6-omap-h63xx.git flush I-cache after omap_sram_push() This patch implements a suggestion by Richard Woodruff . omap_sram_push() copies executable code into SRAM memory. Currently this happens before Linux executes anything from the SRAM, so we don't have to worry about evicting any SRAM lines from the I-cache. But at some point in the future, the SRAM might be used more dynamically, adding and removing code while the system is running. So we should ensure that the I-cache is clean or at least up-to-date after the copy. Signed-off-by: Paul Walmsley Signed-off-by: Richard Woodruff Signed-off-by: Tony Lindgren --- diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c index 0df156fdbd0..a3f9d097cf1 100644 --- a/arch/arm/plat-omap/sram.c +++ b/arch/arm/plat-omap/sram.c @@ -216,6 +216,7 @@ 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)); return (void *)omap_sram_ceil; }