1 From eba69831e8f35174e2e15e373a66f40dc0be8929 Mon Sep 17 00:00:00 2001
2 From: Kurt Mahan <kmahan@freescale.com>
3 Date: Wed, 14 May 2008 12:23:12 -0600
4 Subject: [PATCH] Force branch-cache invalidate on task switch.
6 When finishing a task switch make sure the branch cache
7 gets invalidated to ensure no stale entries exist for
10 LTIBName: mcfv4e-brcache-inval
11 Signed-off-by: Kurt Mahan <kmahan@freescale.com>
13 include/asm-m68k/system.h | 15 +++++++++++++++
14 1 files changed, 15 insertions(+), 0 deletions(-)
16 --- a/include/asm-m68k/system.h
17 +++ b/include/asm-m68k/system.h
19 #include <linux/kernel.h>
20 #include <asm/segment.h>
21 #include <asm/entry.h>
22 +#include <asm/cfcache.h>
26 +#ifdef CONFIG_COLDFIRE
27 +#define FLUSH_BC (0x00040000)
29 +#define finish_arch_switch(prev) do { \
30 + unsigned long tmpreg; \
31 + asm volatile ( "move.l %2,%0\n" \
35 + : "id" (FLUSH_BC), "m" (shadow_cacr)); \
41 * switch_to(n) should switch tasks to task ptr, first checking that
42 * ptr isn't the current task, in which case it does nothing. This