Messages in this thread Patch in this message | | | Date | Fri, 14 Nov 2008 21:23:09 -0800 | From | Greg KH <> | Subject | [patch 08/22] ARM: 5329/1: Feroceon: fix feroceon_l2_inv_range |
| |
2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Nicolas Pitre <nico@cam.org>
commit 72bc2b1ad62f4d2f0a51b35829093d41f55accce upstream
Same fix as commit c7cf72dcadb: when 'start' and 'end' are less than a cacheline apart and 'start' is unaligned we are done after cleaning and invalidating the first cacheline.
Signed-off-by: Nicolas Pitre <nico@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
--- arch/arm/mm/cache-feroceon-l2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
--- a/arch/arm/mm/cache-feroceon-l2.c +++ b/arch/arm/mm/cache-feroceon-l2.c @@ -148,7 +148,7 @@ static void feroceon_l2_inv_range(unsign /* * Clean and invalidate partial last cache line. */ - if (end & (CACHE_LINE_SIZE - 1)) { + if (start < end && end & (CACHE_LINE_SIZE - 1)) { l2_clean_inv_pa(end & ~(CACHE_LINE_SIZE - 1)); end &= ~(CACHE_LINE_SIZE - 1); } @@ -156,7 +156,7 @@ static void feroceon_l2_inv_range(unsign /* * Invalidate all full cache lines between 'start' and 'end'. */ - while (start != end) { + while (start < end) { unsigned long range_end = calc_range_end(start, end); l2_inv_pa_range(start, range_end - CACHE_LINE_SIZE); start = range_end; --
| |