From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752196AbbJFOC7 (ORCPT ); Tue, 6 Oct 2015 10:02:59 -0400 Received: from 2.236.17.93.rev.sfr.net ([93.17.236.2]:20157 "EHLO mailhub1.si.c-s.fr" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750999AbbJFOC6 (ORCPT ); Tue, 6 Oct 2015 10:02:58 -0400 Subject: Re: [PATCH v2 07/25] powerpc32: refactor x_mapped_by_bats() and x_mapped_by_tlbcam() together To: Scott Wood References: <20150928234702.GD6161@home.buserror.net> Cc: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org From: Christophe Leroy Message-ID: <5613D490.9060704@c-s.fr> Date: Tue, 6 Oct 2015 16:02:56 +0200 User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <20150928234702.GD6161@home.buserror.net> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 29/09/2015 01:47, Scott Wood a écrit : > On Tue, Sep 22, 2015 at 06:50:42PM +0200, Christophe Leroy wrote: >> x_mapped_by_bats() and x_mapped_by_tlbcam() serve the same kind of >> purpose, so lets group them into a single function. >> >> Signed-off-by: Christophe Leroy >> --- >> No change in v2 >> >> arch/powerpc/mm/pgtable_32.c | 33 ++++++++++++++++++++++++++------- >> 1 file changed, 26 insertions(+), 7 deletions(-) >> >> diff --git a/arch/powerpc/mm/pgtable_32.c b/arch/powerpc/mm/pgtable_32.c >> index 03a073a..3fd9083 100644 >> --- a/arch/powerpc/mm/pgtable_32.c >> +++ b/arch/powerpc/mm/pgtable_32.c >> @@ -67,6 +67,28 @@ extern unsigned long p_mapped_by_tlbcam(phys_addr_t pa); >> #define p_mapped_by_tlbcam(x) (0UL) >> #endif /* HAVE_TLBCAM */ >> >> +static inline unsigned long p_mapped_by_other(phys_addr_t pa) >> +{ >> + unsigned long v; >> + >> + v = p_mapped_by_bats(pa); >> + if (v /*&& p_mapped_by_bats(p+size-1)*/) >> + return v; >> + >> + return p_mapped_by_tlbcam(pa); >> +} > Did you forget to remove that comment? > > No I didn't, I though it was there for a reason, it has been there since 2005. Do you think I should remove it ? Christophe