From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751590AbcIGXfK (ORCPT ); Wed, 7 Sep 2016 19:35:10 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:36033 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750991AbcIGXfD (ORCPT ); Wed, 7 Sep 2016 19:35:03 -0400 Subject: Re: [PATCH] MIPS: c-r4k: Fix size calc when avoiding IPIs for small icache flushes To: Paul Burton , linux-mips@linux-mips.org References: <20160905142454.30530-1-paul.burton@imgtec.com> Cc: James Hogan , Huacai Chen , linux-kernel@vger.kernel.org, Ralf Baechle From: Florian Fainelli Message-ID: <2c0ffccf-5ccb-7693-099d-efd688a01eec@gmail.com> Date: Wed, 7 Sep 2016 16:34:59 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <20160905142454.30530-1-paul.burton@imgtec.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/05/2016 07:24 AM, Paul Burton wrote: > Commit f70ddc07b637 ("MIPS: c-r4k: Avoid small flush_icache_range SMP > calls") adds checks to force use of hit-type cache ops for small icache > flushes where they are globalised & index-type cache ops aren't, in > order to avoid the overhead of IPIs in those cases. However it > calculated the size of the region being flushed incorrectly, subtracting > the end address from the start address rather than the reverse. This > would have led to an overflow with size wrapping round to some large > value, and likely to the special case for avoiding IPIs not actually > being hit. > > Signed-off-by: Paul Burton > Cc: James Hogan > Fixes: f70ddc07b637 ("MIPS: c-r4k: Avoid small flush_icache_range SMP calls") Reviewed-by: Florian Fainelli Yes would be good to get that in v4.8. -- Florian