diff options
author | Imre Kaloz <kaloz@openwrt.org> | 2009-06-23 21:04:37 +0000 |
---|---|---|
committer | Imre Kaloz <kaloz@openwrt.org> | 2009-06-23 21:04:37 +0000 |
commit | ec03ced5fa6eb25eee164839268b538abb965e99 (patch) | |
tree | 6d3382662fa3ad4119d3a3cda223c53949ca4894 /target/linux/coldfire/patches/053-mcfv4e_brcache_inval.patch | |
parent | 777de3a39c4b92ad53b2b9363f405d0c4c28847a (diff) | |
download | upstream-ec03ced5fa6eb25eee164839268b538abb965e99.tar.gz upstream-ec03ced5fa6eb25eee164839268b538abb965e99.tar.bz2 upstream-ec03ced5fa6eb25eee164839268b538abb965e99.zip |
use broken-out patches for the coldfire to make it easier to follow differences against the bsp
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@16547 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/coldfire/patches/053-mcfv4e_brcache_inval.patch')
-rw-r--r-- | target/linux/coldfire/patches/053-mcfv4e_brcache_inval.patch | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/target/linux/coldfire/patches/053-mcfv4e_brcache_inval.patch b/target/linux/coldfire/patches/053-mcfv4e_brcache_inval.patch new file mode 100644 index 0000000000..dc551babf3 --- /dev/null +++ b/target/linux/coldfire/patches/053-mcfv4e_brcache_inval.patch @@ -0,0 +1,42 @@ +From eba69831e8f35174e2e15e373a66f40dc0be8929 Mon Sep 17 00:00:00 2001 +From: Kurt Mahan <kmahan@freescale.com> +Date: Wed, 14 May 2008 12:23:12 -0600 +Subject: [PATCH] Force branch-cache invalidate on task switch. + +When finishing a task switch make sure the branch cache +gets invalidated to ensure no stale entries exist for +the next user space. + +LTIBName: mcfv4e-brcache-inval +Signed-off-by: Kurt Mahan <kmahan@freescale.com> +--- + include/asm-m68k/system.h | 15 +++++++++++++++ + 1 files changed, 15 insertions(+), 0 deletions(-) + +--- a/include/asm-m68k/system.h ++++ b/include/asm-m68k/system.h +@@ -5,9 +5,24 @@ + #include <linux/kernel.h> + #include <asm/segment.h> + #include <asm/entry.h> ++#include <asm/cfcache.h> + + #ifdef __KERNEL__ + ++#ifdef CONFIG_COLDFIRE ++#define FLUSH_BC (0x00040000) ++ ++#define finish_arch_switch(prev) do { \ ++ unsigned long tmpreg; \ ++ asm volatile ( "move.l %2,%0\n" \ ++ "orl %1,%0\n" \ ++ "movec %0,%%cacr" \ ++ : "=&d" (tmpreg) \ ++ : "id" (FLUSH_BC), "m" (shadow_cacr)); \ ++ } while(0) ++ ++#endif ++ + /* + * switch_to(n) should switch tasks to task ptr, first checking that + * ptr isn't the current task, in which case it does nothing. This |