From patchwork Thu Aug 30 16:15:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Deacon X-Patchwork-Id: 145548 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp92127ljw; Thu, 30 Aug 2018 09:16:28 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdb2C1CGTrR3JEzK217nVnhPxzmUDXPlbCZcv/vfQ+0o8CXIzWjY2z9/S5DoFBK23AsYWFEW X-Received: by 2002:a63:bd01:: with SMTP id a1-v6mr10348831pgf.12.1535645787687; Thu, 30 Aug 2018 09:16:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535645787; cv=none; d=google.com; s=arc-20160816; b=0c09nQazy7kT1BF2K5QaKdS6+jiTWA4tIzZz4oWhr5yV3DuP9/VEa2hhEinvCDLpuL 9Mn2cZMNzgmlTVTD79VQoSvlygUO9foBl/yKDn0wIV67atlCuinu0xxlhsgXUP7oDRrH kfG9ei641psm43JcbXPqO33KEczWq+3jWb4vvlhR0ljIUdLJ5zK1KCgFQsl8/oqefKK9 3oOnH9UVF2hB6cB9NBpUtPx844NFKW2DfhwXSjm7kIZsIaTF4H5d17tJ2BJYF+5duqOT PY7gT4AC5bespgnPSsLvZZpsLfcIpCdeL2KPr6svETqHJtFiTTkkeW1pK6hSGGhwyv/q mXRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=7vykjle0yOPkLV1is8B9sNa/1dZFWFfaIAu1AcfOKwU=; b=HZL5ui/7tFFY5CKEXpQGOc7oW1Wggsy3T7EEuy0L0Wre8SXMRe3admo+KZBrGA5iZN EWDQZ7+vLq/U9Gl2i+tTqXA4ljBxGEyH/HE+GCsKQRhxSDEghSDv+Kcb2HEM/oQqbfr/ mIjnQPysUPyPmz/Oht0AraBYTT8AULu4lfvhJbwVknC6XgVWGtB2HmUIl4MQF3xp3jlx krPdFrNwydfpW54EjGsrQbsZT5xYmcex7pzyOQDbqcPiJt/ULtWTuM9gstN1Kwew+PH1 x2W/g7uQyuTa0+C0UNFJ07WhPWPkrE2pPNg04Ibs3k83iHu9GJrI3T8diZ9IpHa3vT+S 512Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 22-v6si7124203pfl.220.2018.08.30.09.16.27; Thu, 30 Aug 2018 09:16:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727819AbeH3UTR (ORCPT + 32 others); Thu, 30 Aug 2018 16:19:17 -0400 Received: from foss.arm.com ([217.140.101.70]:44854 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727579AbeH3USm (ORCPT ); Thu, 30 Aug 2018 16:18:42 -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 E7B6C19BF; Thu, 30 Aug 2018 09:15:49 -0700 (PDT) Received: from edgewater-inn.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id B8ED23F738; Thu, 30 Aug 2018 09:15:49 -0700 (PDT) Received: by edgewater-inn.cambridge.arm.com (Postfix, from userid 1000) id 6900C1AE3719; Thu, 30 Aug 2018 17:16:01 +0100 (BST) From: Will Deacon To: linux-kernel@vger.kernel.org Cc: peterz@infradead.org, benh@au1.ibm.com, torvalds@linux-foundation.org, npiggin@gmail.com, catalin.marinas@arm.com, linux-arm-kernel@lists.infradead.org, Will Deacon Subject: [PATCH 06/12] arm64: tlb: Remove redundant !CONFIG_HAVE_RCU_TABLE_FREE code Date: Thu, 30 Aug 2018 17:15:40 +0100 Message-Id: <1535645747-9823-7-git-send-email-will.deacon@arm.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1535645747-9823-1-git-send-email-will.deacon@arm.com> References: <1535645747-9823-1-git-send-email-will.deacon@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If there's one thing the RCU-based table freeing doesn't need, it's more ifdeffery. Remove the redundant !CONFIG_HAVE_RCU_TABLE_FREE code, since this option is unconditionally selected in our Kconfig. Signed-off-by: Will Deacon --- arch/arm64/include/asm/tlb.h | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) -- 2.1.4 diff --git a/arch/arm64/include/asm/tlb.h b/arch/arm64/include/asm/tlb.h index 1e1f68ce28f4..bd00017d529a 100644 --- a/arch/arm64/include/asm/tlb.h +++ b/arch/arm64/include/asm/tlb.h @@ -22,16 +22,10 @@ #include #include -#ifdef CONFIG_HAVE_RCU_TABLE_FREE - -#define tlb_remove_entry(tlb, entry) tlb_remove_table(tlb, entry) static inline void __tlb_remove_table(void *_table) { free_page_and_swap_cache((struct page *)_table); } -#else -#define tlb_remove_entry(tlb, entry) tlb_remove_page(tlb, entry) -#endif /* CONFIG_HAVE_RCU_TABLE_FREE */ static void tlb_flush(struct mmu_gather *tlb); @@ -61,7 +55,7 @@ static inline void __pte_free_tlb(struct mmu_gather *tlb, pgtable_t pte, { __flush_tlb_pgtable(tlb->mm, addr); pgtable_page_dtor(pte); - tlb_remove_entry(tlb, pte); + tlb_remove_table(tlb, pte); } #if CONFIG_PGTABLE_LEVELS > 2 @@ -69,7 +63,7 @@ static inline void __pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmdp, unsigned long addr) { __flush_tlb_pgtable(tlb->mm, addr); - tlb_remove_entry(tlb, virt_to_page(pmdp)); + tlb_remove_table(tlb, virt_to_page(pmdp)); } #endif @@ -78,7 +72,7 @@ static inline void __pud_free_tlb(struct mmu_gather *tlb, pud_t *pudp, unsigned long addr) { __flush_tlb_pgtable(tlb->mm, addr); - tlb_remove_entry(tlb, virt_to_page(pudp)); + tlb_remove_table(tlb, virt_to_page(pudp)); } #endif