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=-5.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT 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 EDC96C43382 for ; Wed, 26 Sep 2018 12:54:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B061520838 for ; Wed, 26 Sep 2018 12:54:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B061520838 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728435AbeIZTHE (ORCPT ); Wed, 26 Sep 2018 15:07:04 -0400 Received: from foss.arm.com ([217.140.101.70]:45470 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726768AbeIZTHD (ORCPT ); Wed, 26 Sep 2018 15:07:03 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id F072815AD; Wed, 26 Sep 2018 05:54:11 -0700 (PDT) Received: from brain-police (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2A2C93F5B7; Wed, 26 Sep 2018 05:54:08 -0700 (PDT) Date: Wed, 26 Sep 2018 13:54:06 +0100 From: Will Deacon To: Peter Zijlstra Cc: aneesh.kumar@linux.vnet.ibm.com, akpm@linux-foundation.org, npiggin@gmail.com, linux-arch@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux@armlinux.org.uk, heiko.carstens@de.ibm.com, riel@surriel.com Subject: Re: [PATCH 08/18] arm/tlb: Convert to generic mmu_gather Message-ID: <20180926125405.GH2979@brain-police> References: <20180926113623.863696043@infradead.org> <20180926114800.927066872@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180926114800.927066872@infradead.org> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 26, 2018 at 01:36:31PM +0200, Peter Zijlstra wrote: > Generic mmu_gather provides everything that ARM needs: > > - range tracking > - RCU table free > - VM_EXEC tracking > - VIPT cache flushing > > The one notable curiosity is the 'funny' range tracking for classical > ARM in __pte_free_tlb(). > > Cc: Nick Piggin > Cc: Andrew Morton > Cc: "Aneesh Kumar K.V" > Cc: Will Deacon > Cc: Russell King > Signed-off-by: Peter Zijlstra (Intel) > --- > arch/arm/include/asm/tlb.h | 255 ++------------------------------------------- > 1 file changed, 14 insertions(+), 241 deletions(-) [...] > static inline void > -tlb_remove_pmd_tlb_entry(struct mmu_gather *tlb, pmd_t *pmdp, unsigned long addr) > +__pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmdp, unsigned long addr) > { > - tlb_add_flush(tlb, addr); > -} > - > -#define pte_free_tlb(tlb, ptep, addr) __pte_free_tlb(tlb, ptep, addr) > -#define pmd_free_tlb(tlb, pmdp, addr) __pmd_free_tlb(tlb, pmdp, addr) > -#define pud_free_tlb(tlb, pudp, addr) pud_free((tlb)->mm, pudp) > - > -#define tlb_migrate_finish(mm) do { } while (0) > - > -static inline void tlb_change_page_size(struct mmu_gather *tlb, > - unsigned int page_size) > -{ > -} > - > -static inline void tlb_flush_remove_tables(struct mm_struct *mm) > -{ > -} > +#ifdef CONFIG_ARM_LPAE > + struct page *page = virt_to_page(pmdp); > > -static inline void tlb_flush_remove_tables_local(void *arg) > -{ > + pgtable_pmd_page_dtor(page); The dtor() is a NOP for Arm, so I don't think you need too call it (and we never call the ctor() afaict). I wonder if should be caring about this on arm64... Other than that: Acked-by: Will Deacon Will