aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k/kernel
diff options
context:
space:
mode:
authorAlexander Stein <alexander.stein@systec-electronic.com>2013-06-05 07:42:39 -0400
committerGreg Ungerer <gerg@uclinux.org>2013-08-26 02:51:13 -0400
commit42cb38bcb7a2a8f3a12bf4721e708476daf4f190 (patch)
treedf88018df489762bb52c87c22e4baf8922a4c51a /arch/m68k/kernel
parentdf592eb5dc07c5df26a16318ed4bf2f96fa38a4d (diff)
m68k/coldfire: flush cache when creating the signal stack frame
When the signal stack frame is created, it must be flushed in order to make sure the cache fetches the correct data. Without cache flush the icache might pick up old cached data from an older signal stack frame if the signal is raised again very fast. In case of copyback the data cache muist be pushed first, but is untested. Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com> Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Diffstat (limited to 'arch/m68k/kernel')
-rw-r--r--arch/m68k/kernel/signal.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/m68k/kernel/signal.c b/arch/m68k/kernel/signal.c
index 2a16df3d9312..57fd286e4b0b 100644
--- a/arch/m68k/kernel/signal.c
+++ b/arch/m68k/kernel/signal.c
@@ -50,6 +50,7 @@
50#include <asm/pgtable.h> 50#include <asm/pgtable.h>
51#include <asm/traps.h> 51#include <asm/traps.h>
52#include <asm/ucontext.h> 52#include <asm/ucontext.h>
53#include <asm/cacheflush.h>
53 54
54#ifdef CONFIG_MMU 55#ifdef CONFIG_MMU
55 56
@@ -181,6 +182,13 @@ static inline void push_cache (unsigned long vaddr)
181 asm volatile ("movec %0,%%caar\n\t" 182 asm volatile ("movec %0,%%caar\n\t"
182 "movec %1,%%cacr" 183 "movec %1,%%cacr"
183 : : "r" (vaddr + 4), "r" (temp)); 184 : : "r" (vaddr + 4), "r" (temp));
185 } else {
186 /* CPU_IS_COLDFIRE */
187#if defined(CONFIG_CACHE_COPYBACK)
188 flush_cf_dcache(0, DCACHE_MAX_ADDR);
189#endif
190 /* Invalidate instruction cache for the pushed bytes */
191 clear_cf_icache(vaddr, vaddr + 8);
184 } 192 }
185} 193}
186 194