Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7034AC433B4 for ; Tue, 20 Apr 2021 03:43:41 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8744860E0B for ; Tue, 20 Apr 2021 03:43:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8744860E0B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id B6DB26B0036; Mon, 19 Apr 2021 23:43:39 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B1C3B6B006E; Mon, 19 Apr 2021 23:43:39 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 96EC76B0070; Mon, 19 Apr 2021 23:43:39 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0050.hostedemail.com [216.40.44.50]) by kanga.kvack.org (Postfix) with ESMTP id 70A2F6B0036 for ; Mon, 19 Apr 2021 23:43:39 -0400 (EDT) Received: from smtpin27.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 2135D8249980 for ; Tue, 20 Apr 2021 03:43:39 +0000 (UTC) X-FDA: 78051350958.27.5B71942 Received: from ozlabs.org (bilbo.ozlabs.org [203.11.71.1]) by imf10.hostedemail.com (Postfix) with ESMTP id 712F540002C3 for ; Tue, 20 Apr 2021 03:43:31 +0000 (UTC) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4FPV055YrFz9vFD; Tue, 20 Apr 2021 13:43:33 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ellerman.id.au; s=201909; t=1618890214; bh=jxmTx0ZoVRaEB7nRR/gUMFpdqQqapvdEocelqPt1wTs=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=k6jJY9WrR/0O7CjJyN3N7nXe1Hu4GwfDNn3en9SPZ55OBPPipQe8mhrv0m2DYBf7N k58RcU/d96WEZ1WbwR5PTrUfh6M+7sPBQJpRpo97yDn32WEAxRhzd0qyUULmvRsJbO nULlirbofIIlMzDEiwTwb6Ku1MtfMHGGcl3t9gOugHPzUK0muw1rXCK7yiEmH0YNgC tkfHPFhBcEoFK7+xoIcn14YxQ2cY/XoVTF7T6JOF+3lJ2OUo6VeXbr39YsIQo1emoC N0+VrkcjQ7wQQ17+V2ZL5EcQ/HHyP5U9mm4pJ6N04agF5z4YBFh7RjcPrJq+PBG0tz 0Llwet/PhB3iA== From: Michael Ellerman To: "Aneesh Kumar K.V" , linux-mm@kvack.org, akpm@linux-foundation.org Cc: linuxppc-dev@lists.ozlabs.org, kaleshsingh@google.com, npiggin@gmail.com, joel@joelfernandes.org, "Aneesh Kumar K.V" , Christophe Leroy Subject: Re: [PATCH v4 4/9] powerpc/mm/book3s64: Fix possible build error In-Reply-To: <20210414085915.301189-5-aneesh.kumar@linux.ibm.com> References: <20210414085915.301189-1-aneesh.kumar@linux.ibm.com> <20210414085915.301189-5-aneesh.kumar@linux.ibm.com> Date: Tue, 20 Apr 2021 13:43:33 +1000 Message-ID: <87k0oxd3iy.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 712F540002C3 X-Stat-Signature: p7de6u4d43c61ej99zq9idq8de5f3ufn X-Rspamd-Server: rspam02 Received-SPF: none (ellerman.id.au>: No applicable sender policy available) receiver=imf10; identity=mailfrom; envelope-from=""; helo=ozlabs.org; client-ip=203.11.71.1 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1618890211-387624 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: "Aneesh Kumar K.V" writes: > Update _tlbiel_pid() such that we can avoid build errors like below when > using this function in other places. > > arch/powerpc/mm/book3s64/radix_tlb.c: In function =E2=80=98__radix__flush= _tlb_range_psize=E2=80=99: > arch/powerpc/mm/book3s64/radix_tlb.c:114:2: warning: =E2=80=98asm=E2=80= =99 operand 3 probably does not match constraints > 114 | asm volatile(PPC_TLBIEL(%0, %4, %3, %2, %1) > | ^~~ > arch/powerpc/mm/book3s64/radix_tlb.c:114:2: error: impossible constraint = in =E2=80=98asm=E2=80=99 > make[4]: *** [scripts/Makefile.build:271: arch/powerpc/mm/book3s64/radix_= tlb.o] Error 1 > m > > With this fix, we can also drop the __always_inline in __radix_flush_tlb_= range_psize > which was added by commit e12d6d7d46a6 ("powerpc/mm/radix: mark __radix__= flush_tlb_range_psize() as __always_inline") > > Reviewed-by: Christophe Leroy > Signed-off-by: Aneesh Kumar K.V > --- > arch/powerpc/mm/book3s64/radix_tlb.c | 26 +++++++++++++++++--------- > 1 file changed, 17 insertions(+), 9 deletions(-) Acked-by: Michael Ellerman cheers > diff --git a/arch/powerpc/mm/book3s64/radix_tlb.c b/arch/powerpc/mm/book3= s64/radix_tlb.c > index 409e61210789..817a02ef6032 100644 > --- a/arch/powerpc/mm/book3s64/radix_tlb.c > +++ b/arch/powerpc/mm/book3s64/radix_tlb.c > @@ -291,22 +291,30 @@ static inline void fixup_tlbie_lpid(unsigned long l= pid) > /* > * We use 128 set in radix mode and 256 set in hpt mode. > */ > -static __always_inline void _tlbiel_pid(unsigned long pid, unsigned long= ric) > +static inline void _tlbiel_pid(unsigned long pid, unsigned long ric) > { > int set; >=20=20 > asm volatile("ptesync": : :"memory"); >=20=20 > - /* > - * Flush the first set of the TLB, and if we're doing a RIC_FLUSH_ALL, > - * also flush the entire Page Walk Cache. > - */ > - __tlbiel_pid(pid, 0, ric); > + switch (ric) { > + case RIC_FLUSH_PWC: >=20=20 > - /* For PWC, only one flush is needed */ > - if (ric =3D=3D RIC_FLUSH_PWC) { > + /* For PWC, only one flush is needed */ > + __tlbiel_pid(pid, 0, RIC_FLUSH_PWC); > ppc_after_tlbiel_barrier(); > return; > + case RIC_FLUSH_TLB: > + __tlbiel_pid(pid, 0, RIC_FLUSH_TLB); > + break; > + case RIC_FLUSH_ALL: > + default: > + /* > + * Flush the first set of the TLB, and if > + * we're doing a RIC_FLUSH_ALL, also flush > + * the entire Page Walk Cache. > + */ > + __tlbiel_pid(pid, 0, RIC_FLUSH_ALL); > } >=20=20 > if (!cpu_has_feature(CPU_FTR_ARCH_31)) { > @@ -1176,7 +1184,7 @@ void radix__tlb_flush(struct mmu_gather *tlb) > } > } >=20=20 > -static __always_inline void __radix__flush_tlb_range_psize(struct mm_str= uct *mm, > +static void __radix__flush_tlb_range_psize(struct mm_struct *mm, > unsigned long start, unsigned long end, > int psize, bool also_pwc) > { > --=20 > 2.30.2