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=-10.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 C43CFC433E6 for ; Tue, 1 Sep 2020 07:31:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9C75E206CD for ; Tue, 1 Sep 2020 07:31:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=ellerman.id.au header.i=@ellerman.id.au header.b="a/bpJOhS" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726674AbgIAHbI (ORCPT ); Tue, 1 Sep 2020 03:31:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36590 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726006AbgIAHbH (ORCPT ); Tue, 1 Sep 2020 03:31:07 -0400 Received: from ozlabs.org (bilbo.ozlabs.org [IPv6:2401:3900:2:1::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA5D0C061244; Tue, 1 Sep 2020 00:31:06 -0700 (PDT) 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 4Bgdz92lPxz9sTC; Tue, 1 Sep 2020 17:31:01 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ellerman.id.au; s=201909; t=1598945461; bh=03sHYm631sdFvHM5NaS/cwjM4VK1GZ0RfuJMTFnqpEc=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=a/bpJOhSiqrggdqpabXGJruLmgoojqIjNOtKdWPNocerR0Tx+kpxlpwOBXWByNo/u 4MMDvjMJXHZd3qpIFjDpNQwir2JtlbC9QuIRNfQv7+DKiRCdMAqVS2zB0NNm3xvlxi hvo4hfX2X+T6n9TewBPyqOaQPF1dB6lLff4nNk3wepYL7lE7hDv4mTN4tfQemSqXSJ WI1dVOLHIsHxXYqamewX3UAYivUNxFlBxI1JOPhVmYtR5K6iqZSaxTQcLo/zn3B6PJ QNOduqvxUP/5omK0ZAxn1i6wfTDPjM1ab8plb48Tm0DDJw3DYQUCXwF5Hbpl36yYaa HcDxgeuynTQ2A== From: Michael Ellerman To: Nicholas Piggin , linux-arch@vger.kernel.org Cc: Nicholas Piggin , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Arnd Bergmann , Benjamin Herrenschmidt , Paul Mackerras , linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH v2 16/23] powerpc: use asm-generic/mmu_context.h for no-op implementations In-Reply-To: <20200826145249.745432-17-npiggin@gmail.com> References: <20200826145249.745432-1-npiggin@gmail.com> <20200826145249.745432-17-npiggin@gmail.com> Date: Tue, 01 Sep 2020 17:30:59 +1000 Message-ID: <87sgc20x8s.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Nicholas Piggin writes: > Cc: Michael Ellerman > Cc: Benjamin Herrenschmidt > Cc: Paul Mackerras > Cc: linuxppc-dev@lists.ozlabs.org > Signed-off-by: Nicholas Piggin > --- > arch/powerpc/include/asm/mmu_context.h | 22 +++++++--------------- > 1 file changed, 7 insertions(+), 15 deletions(-) Acked-by: Michael Ellerman (powerpc) cheers > diff --git a/arch/powerpc/include/asm/mmu_context.h b/arch/powerpc/include/asm/mmu_context.h > index 7f3658a97384..bc22e247ab55 100644 > --- a/arch/powerpc/include/asm/mmu_context.h > +++ b/arch/powerpc/include/asm/mmu_context.h > @@ -14,7 +14,9 @@ > /* > * Most if the context management is out of line > */ > +#define init_new_context init_new_context > extern int init_new_context(struct task_struct *tsk, struct mm_struct *mm); > +#define destroy_context destroy_context > extern void destroy_context(struct mm_struct *mm); > #ifdef CONFIG_SPAPR_TCE_IOMMU > struct mm_iommu_table_group_mem_t; > @@ -235,27 +237,15 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, > } > #define switch_mm_irqs_off switch_mm_irqs_off > > - > -#define deactivate_mm(tsk,mm) do { } while (0) > - > -/* > - * After we have set current->mm to a new value, this activates > - * the context for the new mm so we see the new mappings. > - */ > -static inline void activate_mm(struct mm_struct *prev, struct mm_struct *next) > -{ > - switch_mm(prev, next, current); > -} > - > -/* We don't currently use enter_lazy_tlb() for anything */ > +#ifdef CONFIG_PPC_BOOK3E_64 > +#define enter_lazy_tlb enter_lazy_tlb > static inline void enter_lazy_tlb(struct mm_struct *mm, > struct task_struct *tsk) > { > /* 64-bit Book3E keeps track of current PGD in the PACA */ > -#ifdef CONFIG_PPC_BOOK3E_64 > get_paca()->pgd = NULL; > -#endif > } > +#endif > > extern void arch_exit_mmap(struct mm_struct *mm); > > @@ -298,5 +288,7 @@ static inline int arch_dup_mmap(struct mm_struct *oldmm, > return 0; > } > > +#include > + > #endif /* __KERNEL__ */ > #endif /* __ASM_POWERPC_MMU_CONTEXT_H */ > -- > 2.23.0