Commit 498c996e authored by Paul Walmsley's avatar Paul Walmsley Committed by Tony Lindgren

flush I-cache after omap_sram_push()

This patch implements a suggestion by Richard Woodruff
<r-woodruff2@ti.com>.  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: default avatarPaul Walmsley <paul@pwsan.com>
Signed-off-by: default avatarRichard Woodruff <r-woodruff2@ti.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 5e8a760e
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment