From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757013AbYKQHXx (ORCPT ); Mon, 17 Nov 2008 02:23:53 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752734AbYKQHVD (ORCPT ); Mon, 17 Nov 2008 02:21:03 -0500 Received: from kroah.org ([198.145.64.141]:38254 "EHLO coco.kroah.org" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752198AbYKQHUz (ORCPT ); Mon, 17 Nov 2008 02:20:55 -0500 Date: Sun, 16 Nov 2008 23:14:41 -0800 From: Greg KH To: linux-kernel@vger.kernel.org, stable@kernel.org Cc: Justin Forbes , Zwane Mwaikambo , "Theodore Ts'o" , Randy Dunlap , Dave Jones , Chuck Wolber , Chris Wedgwood , Michael Krufky , Chuck Ebbert , Domenico Andreoli , Willy Tarreau , Rodrigo Rubira Branco , Jake Edge , Eugene Teo , torvalds@linux-foundation.org, akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk, Nicolas Pitre , Russell King , Greg Kroah-Hartman Subject: [patch 08/46] ARM: 5329/1: Feroceon: fix feroceon_l2_inv_range Message-ID: <20081117071441.GI29522@kroah.com> References: <20081117070621.430169021@blue.kroah.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline; filename="arm-5329-1-feroceon-fix-feroceon_l2_inv_range.patch" In-Reply-To: <20081117071333.GA29522@kroah.com> User-Agent: Mutt/1.5.16 (2007-06-09) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2.6.27-stable review patch. If anyone has any objections, please let us know. ------------------ From: Nicolas Pitre 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 Signed-off-by: Russell King Signed-off-by: Greg Kroah-Hartman --- 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; --