Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp5422087pxu; Thu, 22 Oct 2020 01:40:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyRZ6uNjOn3y/Ls2q7TNPS+Cb+bDJNp5wdPtSW3/pkAxM8EhQc8/OZsdLgSYbk3nqlt60MH X-Received: by 2002:a17:906:154c:: with SMTP id c12mr1249100ejd.427.1603356002006; Thu, 22 Oct 2020 01:40:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603356002; cv=none; d=google.com; s=arc-20160816; b=Obb9O8HhujOJA+VUswZf732dsVGZKfUNcttIHkxAakCnTJdHIPbIRKh0txZxY12IEP eAGsy2tYR49opESfEF7kjHN7Yh+f92++R0K48uMw0pChDS8m8mSWfgZuoQgCcrHQdLWz z9+7pa73IO4hthL4HQfFXBDPkEUQLHWsSXm68bw6FQSSaigyHNewVtPe0DcNk7E3BSGo hmBTXMatyF1/yC2zjyW0M4/nDphfNgus7UQdGaWZZDsvWeUv9039p7f+h+Haas5JFuq4 /kD7YHNoVKdcTQLXp4O18m1RskrmdjoAG41sTeh8ZafRxFiVAXiVuQEocIqLU/Szf75U dsZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:cc:to:subject:from:references:in-reply-to :message-id; bh=3G8KTJBkhirWx18Tx1O6ES36cNPjh9tFI6G16+WBBG4=; b=ywYQJe0kA3lwtfLLo1JyuCEENPILOHnHBMYWgrA9gS8RHxeygNFeAMtSp2aBhN8wfE TiIIXffSZB42oFxrR1Ja20U2Ve1txMOAHDPjP/iBt3QYgUYpG9+NQ+PgLPCryNmkZcLx KzIBrfRYgf7GVa3jkGikTVrckLMrdwvjUOzOxFR4/WIl5YmnN4QgOB1dnDvxCht90v4O g4PI5XJ2D2Vyj9ubniQs4mdvNEeseEp8Obee5IpVph+vRirmwWHcksOyOzjD+1PFjRtq EHn+JcvhRmAfttF5kJCilsJ8EiWlJyh4DAmYo49Pcdm48d9XqkgZJDDEoSffFfFrwFco dv4g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f15si464915ejr.2.2020.10.22.01.39.39; Thu, 22 Oct 2020 01:40:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2895626AbgJVG3r (ORCPT + 99 others); Thu, 22 Oct 2020 02:29:47 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:42521 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2508251AbgJVG3i (ORCPT ); Thu, 22 Oct 2020 02:29:38 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 4CGyBk38CQz9vBKx; Thu, 22 Oct 2020 08:29:34 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id Lly7IQ7jR6WI; Thu, 22 Oct 2020 08:29:34 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 4CGyBk2CWsz9vBKw; Thu, 22 Oct 2020 08:29:34 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 3B3E68B806; Thu, 22 Oct 2020 08:29:35 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id qhdYHAtasZ3q; Thu, 22 Oct 2020 08:29:35 +0200 (CEST) Received: from po17688vm.idsi0.si.c-s.fr (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id AA4F28B769; Thu, 22 Oct 2020 08:29:34 +0200 (CEST) Received: by po17688vm.idsi0.si.c-s.fr (Postfix, from userid 0) id 8F2AA667EF; Thu, 22 Oct 2020 06:29:34 +0000 (UTC) Message-Id: <475136425541db5c7c8a0395d19d400525b251bc.1603348103.git.christophe.leroy@csgroup.eu> In-Reply-To: <648e2448e938d52d0b5887445e018ca584edc06d.1603348103.git.christophe.leroy@csgroup.eu> References: <648e2448e938d52d0b5887445e018ca584edc06d.1603348103.git.christophe.leroy@csgroup.eu> From: Christophe Leroy Subject: [PATCH v1 09/20] powerpc/32s: Inline _tlbie() on non SMP To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Date: Thu, 22 Oct 2020 06:29:34 +0000 (UTC) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On non SMP, _tlbie() is just a tlbie plus a sync instruction. Make it static inline. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/book3s/32/tlbflush.h | 7 +++++++ arch/powerpc/mm/book3s32/hash_low.S | 7 ++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/include/asm/book3s/32/tlbflush.h b/arch/powerpc/include/asm/book3s/32/tlbflush.h index 3043e7af70aa..f392a619138d 100644 --- a/arch/powerpc/include/asm/book3s/32/tlbflush.h +++ b/arch/powerpc/include/asm/book3s/32/tlbflush.h @@ -12,7 +12,14 @@ extern void flush_tlb_range(struct vm_area_struct *vma, unsigned long start, unsigned long end); extern void flush_tlb_kernel_range(unsigned long start, unsigned long end); +#ifdef CONFIG_SMP void _tlbie(unsigned long address); +#else +static inline void _tlbie(unsigned long address) +{ + asm volatile ("tlbie %0; sync" : : "r" (address) : "memory"); +} +#endif void _tlbia(void); static inline void local_flush_tlb_page(struct vm_area_struct *vma, diff --git a/arch/powerpc/mm/book3s32/hash_low.S b/arch/powerpc/mm/book3s32/hash_low.S index b2c912e517b9..006e9a452bde 100644 --- a/arch/powerpc/mm/book3s32/hash_low.S +++ b/arch/powerpc/mm/book3s32/hash_low.S @@ -637,8 +637,8 @@ _ASM_NOKPROBE_SYMBOL(flush_hash_pages) /* * Flush an entry from the TLB */ -_GLOBAL(_tlbie) #ifdef CONFIG_SMP +_GLOBAL(_tlbie) lwz r8,TASK_CPU(r2) oris r8,r8,11 mfmsr r10 @@ -662,12 +662,9 @@ _GLOBAL(_tlbie) stw r0,0(r9) /* clear mmu_hash_lock */ mtmsr r10 isync -#else /* CONFIG_SMP */ - tlbie r3 - sync -#endif /* CONFIG_SMP */ blr _ASM_NOKPROBE_SYMBOL(_tlbie) +#endif /* CONFIG_SMP */ /* * Flush the entire TLB. 603/603e only -- 2.25.0