From patchwork Wed Sep 26 11:36:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Zijlstra X-Patchwork-Id: 10615807 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4A994913 for ; Wed, 26 Sep 2018 11:55:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3E48726B41 for ; Wed, 26 Sep 2018 11:55:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 32A712A980; Wed, 26 Sep 2018 11:55:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1E93E26B41 for ; Wed, 26 Sep 2018 11:55:23 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 41F088E0010; Wed, 26 Sep 2018 07:55:02 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 3A9918E000F; Wed, 26 Sep 2018 07:55:02 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2781F8E0010; Wed, 26 Sep 2018 07:55:02 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by kanga.kvack.org (Postfix) with ESMTP id C4BE88E000F for ; Wed, 26 Sep 2018 07:55:01 -0400 (EDT) Received: by mail-pl1-f197.google.com with SMTP id t1-v6so1517092plz.17 for ; Wed, 26 Sep 2018 04:55:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:message-id:user-agent:date:from :to:cc:subject:references:mime-version; bh=WaLjinVEspX0O+0lLuyjlJBGguoL7I8ZRB9m9FveuTs=; b=mfZ52rmvXn46Q0a6kpLnxloeOcF4y2vJo4+n0EuNCEkGIaRWhNAGsAzYm+qfcDpaad L5SMXGSWVOLB+FzdR4m5gW8dJ4vgsTadnr3YQXvLsskC0Xb2DLxsRhCuW1k2JYMaoM8R D7r6CbcUPSx1bsmvm1WT/q3sVhi0NptlX0A5CXciHYRE7Y58rItdViphg7eN2l0gthF+ eYjn12psPkyOgHRKgbIlSt3dnVk1MfiOyXnqJmnG4DsoTPN8vzFC0X6fvydjfGBgQAzS /Hdc6jac4M+LEAqTwt8sM/B7EKNHODJogYKHJA//PH3JMbRMA8rSZg6trahHeHb51PQK TT1g== X-Gm-Message-State: ABuFfogIGmclOnvdD3t9s6xWKnB3OFgZEAEzY1ZL3X+JP1TjqnbDSBax /OHqMvdH9xAJsfjRS4Qh64jnm+4Nk9WXwtg1iHKlAh2xqScRKxEDA5NxoBVXS8HmxibfRQJtHDa ePmEsxCoBpE5Yv40FBb+FiwdjaZT+BmQ4xHt9+UXP1r2oy/kocJqXDMkWzwVWXZSc6Q== X-Received: by 2002:a17:902:599d:: with SMTP id p29-v6mr5837698pli.74.1537962901484; Wed, 26 Sep 2018 04:55:01 -0700 (PDT) X-Google-Smtp-Source: ACcGV60esggImTBk+tgqBrqEZ7O5ql20Qd/L+eq1mey4TA8uiDzHPhpZ1sseConO9eyaXpMwotdA X-Received: by 2002:a17:902:599d:: with SMTP id p29-v6mr5837641pli.74.1537962900782; Wed, 26 Sep 2018 04:55:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537962900; cv=none; d=google.com; s=arc-20160816; b=AngGEfjqBqZdsOpjvqwRGfLbXex4fiSnRNYdCgBsqlo04Kblzd3T5UmK4YoD8ny00t wfvnKahVTCnghyrbo3SJ5b5yXWNzqxpXW3rPFa2UQeATsWABhNIoHLNTOFZBdNJJkmDa D57R9pMsmWDBZGhINE1sxF0uw2b2XgrUoxDnsMzzAQgS8hzHPuBcsoBwEEre1fodm+xW QKMK3QPqyqfwERM83KzgziX6c06BCKSVQW2V1J5aseAKlQoC9z1BMuOE14NYs62UfYpi 5DRhltVOIsX3DvnlJ+TTppIBxtIFWFD8yv7r3YqwQ22MaR2A+t4dmPBGvliKWitlHyK+ lp/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:references:subject:cc:to:from:date:user-agent :message-id:dkim-signature; bh=WaLjinVEspX0O+0lLuyjlJBGguoL7I8ZRB9m9FveuTs=; b=b3VErj4lz5ovF1m+LudxwiEgM0hxE9gTSe6Y5Pp8WDauZorLsStRqbhI6BoW5EKg0P diA3dHU2rAFD4f/n9YGZXX61EgCtKD5ZjoFhpXfQigivLHvwfDQfXLZgjfuGneDry92Q yZK4QAkWbyr+ob/oA75WnDJIuHr8eYC5sUBSUlBWgLv4FutgiCd3cMxqGP7UqVs254N7 M3mOW+yIfbP8xjXCkxeDWJYqLjaF8NdgUg/zztEs+10UVgP11OCHdFXAupfVVIV55f4i ZlB7qE7vzqgHl7cYR//+N3cZIJllFZaRWyBfhjDog6TDfpbLHDHvPYX8F1VCj0IvGgnJ vGsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20170209 header.b=JAUZDEpV; spf=pass (google.com: best guess record for domain of peterz@infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom=peterz@infradead.org Received: from bombadil.infradead.org (bombadil.infradead.org. [2607:7c80:54:e::133]) by mx.google.com with ESMTPS id n28-v6si4679006pfg.127.2018.09.26.04.55.00 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 26 Sep 2018 04:55:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of peterz@infradead.org designates 2607:7c80:54:e::133 as permitted sender) client-ip=2607:7c80:54:e::133; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20170209 header.b=JAUZDEpV; spf=pass (google.com: best guess record for domain of peterz@infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom=peterz@infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Type:MIME-Version:References: Subject:Cc:To:From:Date:Message-ID:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=WaLjinVEspX0O+0lLuyjlJBGguoL7I8ZRB9m9FveuTs=; b=JAUZDEpVN1a7aakroh+E8gNgii Y7gvDl/yidhk8qNXrRuRKMorNEl1Wy08pNzMRNIcG4dz78hAhENWJhR8rMAK34JlEFyK+fbJ2lC6T sH4ISC17a+6T4fmBcb/A2ty0gSvS32cTLg3OYReiE9Z1ObwMBjxDFsPUyZMe0JnuL2EW7aBB6cLkS ObK7td3D0/PPYXvspU2El5Paj/AC7s6mEOe8/u1U7KytCrv9z88aM7JVDqU1F21nHGUkr0eVH6io4 kz+HumdQ57Q3bZSvf2HzpVLh796U13lvgScXPhoMndasUrQlYJj9iLn5zcFV/s8GgABFeHRk8Susg uiX1zidQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1g58Oy-00063O-8J; Wed, 26 Sep 2018 11:54:55 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 0) id C990E206F1838; Wed, 26 Sep 2018 13:54:04 +0200 (CEST) Message-ID: <20180926114801.468888082@infradead.org> User-Agent: quilt/0.65 Date: Wed, 26 Sep 2018 13:36:41 +0200 From: Peter Zijlstra To: will.deacon@arm.com, aneesh.kumar@linux.vnet.ibm.com, akpm@linux-foundation.org, npiggin@gmail.com Cc: linux-arch@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, peterz@infradead.org, linux@armlinux.org.uk, heiko.carstens@de.ibm.com, riel@surriel.com Subject: [PATCH 18/18] asm-generic/tlb: Remove tlb_table_flush() References: <20180926113623.863696043@infradead.org> MIME-Version: 1.0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP There are no external users of this API (nor should there be); remove it. Signed-off-by: Peter Zijlstra (Intel) --- include/asm-generic/tlb.h | 1 - mm/mmu_gather.c | 34 +++++++++++++++++----------------- 2 files changed, 17 insertions(+), 18 deletions(-) --- a/include/asm-generic/tlb.h +++ b/include/asm-generic/tlb.h @@ -174,7 +174,6 @@ struct mmu_table_batch { #define MAX_TABLE_BATCH \ ((PAGE_SIZE - sizeof(struct mmu_table_batch)) / sizeof(void *)) -extern void tlb_table_flush(struct mmu_gather *tlb); extern void tlb_remove_table(struct mmu_gather *tlb, void *table); #endif --- a/mm/mmu_gather.c +++ b/mm/mmu_gather.c @@ -91,22 +91,6 @@ bool __tlb_remove_page_size(struct mmu_g #endif /* HAVE_MMU_GATHER_NO_GATHER */ -static void tlb_flush_mmu_free(struct mmu_gather *tlb) -{ -#ifdef CONFIG_HAVE_RCU_TABLE_FREE - tlb_table_flush(tlb); -#endif -#ifndef CONFIG_HAVE_MMU_GATHER_NO_GATHER - tlb_batch_pages_flush(tlb); -#endif -} - -void tlb_flush_mmu(struct mmu_gather *tlb) -{ - tlb_flush_mmu_tlbonly(tlb); - tlb_flush_mmu_free(tlb); -} - #ifdef CONFIG_HAVE_RCU_TABLE_FREE /* @@ -159,7 +143,7 @@ static void tlb_remove_table_rcu(struct free_page((unsigned long)batch); } -void tlb_table_flush(struct mmu_gather *tlb) +static void tlb_table_flush(struct mmu_gather *tlb) { struct mmu_table_batch **batch = &tlb->batch; @@ -191,6 +175,22 @@ void tlb_remove_table(struct mmu_gather #endif /* CONFIG_HAVE_RCU_TABLE_FREE */ +static void tlb_flush_mmu_free(struct mmu_gather *tlb) +{ +#ifdef CONFIG_HAVE_RCU_TABLE_FREE + tlb_table_flush(tlb); +#endif +#ifndef CONFIG_HAVE_MMU_GATHER_NO_GATHER + tlb_batch_pages_flush(tlb); +#endif +} + +void tlb_flush_mmu(struct mmu_gather *tlb) +{ + tlb_flush_mmu_tlbonly(tlb); + tlb_flush_mmu_free(tlb); +} + /** * tlb_gather_mmu - initialize an mmu_gather structure for page-table tear-down * @tlb: the mmu_gather structure to initialize