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/028-mcfv4e_cache_ck_0_len.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/028-mcfv4e_cache_ck_0_len.patch')
-rw-r--r-- | target/linux/coldfire/patches/028-mcfv4e_cache_ck_0_len.patch | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/target/linux/coldfire/patches/028-mcfv4e_cache_ck_0_len.patch b/target/linux/coldfire/patches/028-mcfv4e_cache_ck_0_len.patch new file mode 100644 index 0000000000..a160f5600a --- /dev/null +++ b/target/linux/coldfire/patches/028-mcfv4e_cache_ck_0_len.patch @@ -0,0 +1,55 @@ +From 679a5be6f06b909adccc9c588feb26bf6d6df402 Mon Sep 17 00:00:00 2001 +From: Kurt Mahan <kmahan@freescale.com> +Date: Thu, 6 Dec 2007 16:40:39 -0700 +Subject: [PATCH] Add zero length checking to cache routines. + +LTIBName: mcfv4e-cache-ck-0-len +Signed-off-by: Kurt Mahan <kmahan@freescale.com> +--- + include/asm-m68k/cf_cacheflush.h | 14 +++++++++++--- + 1 files changed, 11 insertions(+), 3 deletions(-) + +--- a/include/asm-m68k/cf_cacheflush.h ++++ b/include/asm-m68k/cf_cacheflush.h +@@ -127,7 +127,9 @@ static inline void flush_bcache(void) + static inline void cf_cache_clear(unsigned long paddr, int len) + { + /* number of lines */ +- len = (len + (CACHE_LINE_SIZE-1)) / CACHE_LINE_SIZE; ++ len = (len + (CACHE_LINE_SIZE-1)) / CACHE_LINE_SIZE; ++ if (len == 0) ++ return; + + /* align on set boundary */ + paddr &= 0xfffffff0; +@@ -161,7 +163,9 @@ static inline void cf_cache_clear(unsign + static inline void cf_cache_push(unsigned long paddr, int len) + { + /* number of lines */ +- len = (len + (CACHE_LINE_SIZE-1)) / CACHE_LINE_SIZE; ++ len = (len + (CACHE_LINE_SIZE-1)) / CACHE_LINE_SIZE; ++ if (len == 0) ++ return; + + /* align on set boundary */ + paddr &= 0xfffffff0; +@@ -195,7 +199,9 @@ static inline void cf_cache_push(unsigne + static inline void cf_cache_flush(unsigned long paddr, int len) + { + /* number of lines */ +- len = (len + (CACHE_LINE_SIZE-1)) / CACHE_LINE_SIZE; ++ len = (len + (CACHE_LINE_SIZE-1)) / CACHE_LINE_SIZE; ++ if (len == 0) ++ return; + + /* align on set boundary */ + paddr &= 0xfffffff0; +@@ -234,6 +240,8 @@ static inline void cf_cache_flush_range( + vstart &= 0xfffffff0; + vend = PAGE_ALIGN((vend + (CACHE_LINE_SIZE-1))) & 0xfffffff0; + len = vend - vstart; ++ if (len == 0) ++ return; + vstart = __pa(vstart); + vend = vstart + len; + |