From mboxrd@z Thu Jan 1 00:00:00 1970 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=-13.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 0F0F8C433ED for ; Tue, 20 Apr 2021 03:44:01 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3D4FD613B4 for ; Tue, 20 Apr 2021 03:44:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3D4FD613B4 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=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4FPV0Z67d8z3bSs for ; Tue, 20 Apr 2021 13:43:58 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ellerman.id.au header.i=@ellerman.id.au header.a=rsa-sha256 header.s=201909 header.b=k6jJY9Wr; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=ellerman.id.au (client-ip=2401:3900:2:1::2; helo=ozlabs.org; envelope-from=mpe@ellerman.id.au; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ellerman.id.au header.i=@ellerman.id.au header.a=rsa-sha256 header.s=201909 header.b=k6jJY9Wr; dkim-atps=neutral Received: from ozlabs.org (bilbo.ozlabs.org [IPv6:2401:3900:2:1::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4FPV070KlFz2xfk for ; Tue, 20 Apr 2021 13:43:35 +1000 (AEST) 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 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-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Aneesh Kumar K.V" , npiggin@gmail.com, kaleshsingh@google.com, joel@joelfernandes.org, linuxppc-dev@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" "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