Message ID | 1539188584-15819-3-git-send-email-will.deacon@arm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 6D76017E1 for <patchwork-linux-mm@patchwork.kernel.org>; Wed, 10 Oct 2018 16:23:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 276552A62F for <patchwork-linux-mm@patchwork.kernel.org>; Wed, 10 Oct 2018 16:23:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1B6272A660; Wed, 10 Oct 2018 16:23:22 +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.9 required=2.0 tests=BAYES_00,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 9B95F2A678 for <patchwork-linux-mm@patchwork.kernel.org>; Wed, 10 Oct 2018 16:23:21 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 611FA6B000D; Wed, 10 Oct 2018 12:23:15 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 548EF6B000A; Wed, 10 Oct 2018 12:23:15 -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 3F9A16B0008; Wed, 10 Oct 2018 12:23:15 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-oi1-f197.google.com (mail-oi1-f197.google.com [209.85.167.197]) by kanga.kvack.org (Postfix) with ESMTP id 18B696B0003 for <linux-mm@kvack.org>; Wed, 10 Oct 2018 12:23:15 -0400 (EDT) Received: by mail-oi1-f197.google.com with SMTP id w198-v6so3909240oiw.19 for <linux-mm@kvack.org>; Wed, 10 Oct 2018 09:23:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to:cc :subject:date:message-id:in-reply-to:references; bh=N4Cv0QE3PH+lPyq9AU+EbNnOQ1f2Mu7HygBKhQjY+BQ=; b=s0bbo/dUSNQLF1KC+fxetaT+P2d/cZPRQGzb2SIwXqxA5DOePzCDzp1uXdbZD5wiIp 9HSvj7fRBEsXJTwC47VzuqjSNrksIUGhrLXR+0niluUM8sQBpIsXqi4n8pzOaDT+Qmqf TQSlv/j1WiSwqEoitR2+apRIWxz+XnxY7qrJhYa21pFDAlNAzxBC5ERCUsKyd6vVDVYs +G21hKG/SOiBa+cgst1JP7aE/U56LaZ5UMVyRk2oaTIumP/+Iy8tXwNdQQx+4kpYJ2/Q Mo7bMdqxID7cEaNuLTyhjx59K/p52ex36nwL/K3J6tORz8UUnavsm01+EuNUda0D0OTz F3Cw== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of will.deacon@arm.com designates 217.140.101.70 as permitted sender) smtp.mailfrom=will.deacon@arm.com X-Gm-Message-State: ABuFfojA43Tn3XanMwcSZL2HL7yA1ie5wOyxImwwnt0nTAHEW7DoL4zT PwfjKdTuZn/OUY9GP1V8u6VitwrlegT2S65d1fchtwQB7MPY5U08wtNlUjwrZ71jvMrjypCFx+9 zuSoqZf9b6jGfJPvQv7hm+pH++FzKepDqac5GO2SR9RYkTql+R+X5/LVTpowoC5njkQ== X-Received: by 2002:a9d:409a:: with SMTP id n26mr1675736ote.6.1539188594862; Wed, 10 Oct 2018 09:23:14 -0700 (PDT) X-Google-Smtp-Source: ACcGV606MF/UKaqrLDu6fb5MII9CrBiIrgltXWSoBWkMuO0AFn+eaPiQViOC0MP8caxuWAsiTQoy X-Received: by 2002:a9d:409a:: with SMTP id n26mr1675699ote.6.1539188594117; Wed, 10 Oct 2018 09:23:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539188594; cv=none; d=google.com; s=arc-20160816; b=eyZM0ydzPGffZLyPP2qqP1o1KLnUGkiWbUDxJnw9Lks7x6SGBgnrza4xGl73EUWp0Y qgSXRmp/HQlU6+3hBdV6Attfde2nesUzvfvYJValx3Eq+tbUSBkO8BYBsY0RypuLATMK wK/PO6lpFrpKF7vakXdVwu4b7eSe8ZBbyA6BSqstJ1B0IFo8/rgzOgEW7rpxWIbS1cE6 vwd780xfWqTU0PaiMAVi0yG1DHqeIWvbWkCkMd2V/fY+JUVKX/s5UOQmFZjW0XxlWJGt xDVuNosh7NaPZAI/G8Lb+bzKMxYcHxtF40VmBZUD162SE4U6ypamHxWJX/TsrqHEv/Gr 722w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from; bh=N4Cv0QE3PH+lPyq9AU+EbNnOQ1f2Mu7HygBKhQjY+BQ=; b=oi1XTzK673eV+JUXXJlS6cIn5oXJtQl/YbN81zeKd4NqeTyJRix0qrOYDyWuQiT/jZ tFadl7XCEqnVIGT6aY+Pkx53yqBfYqME7XFslYgfl1klCTzMhyz5Mvv+uVmIcLJTtA7A 6Lo9mKdrx0+7H9qV/z06fbSuDu1I9JuBHHpzi3d7T9NljDw8Qb5QgvSH70qrXxH6b3vY FhHWDsFBC0LtNwC/CXDZ2TfHl4H/z1N0ui+9wlnS3zEBJNXXigVIx5b1P7BsULukHyJo lQ84yj5Z/Z75QchS5d6dl+0MBlj1iACvHKP2jCLWZlrgE/wzGenQcrgKZM4qWvFcSbA3 Qeig== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of will.deacon@arm.com designates 217.140.101.70 as permitted sender) smtp.mailfrom=will.deacon@arm.com Received: from foss.arm.com (foss.arm.com. [217.140.101.70]) by mx.google.com with ESMTP id t1si12748405otk.151.2018.10.10.09.23.13 for <linux-mm@kvack.org>; Wed, 10 Oct 2018 09:23:14 -0700 (PDT) Received-SPF: pass (google.com: domain of will.deacon@arm.com designates 217.140.101.70 as permitted sender) client-ip=217.140.101.70; Authentication-Results: mx.google.com; spf=pass (google.com: domain of will.deacon@arm.com designates 217.140.101.70 as permitted sender) smtp.mailfrom=will.deacon@arm.com 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 6C08C15B2; Wed, 10 Oct 2018 09:23:13 -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 3E11F3F7C3; Wed, 10 Oct 2018 09:23:13 -0700 (PDT) Received: by edgewater-inn.cambridge.arm.com (Postfix, from userid 1000) id E4FA01AE0964; Wed, 10 Oct 2018 17:23:12 +0100 (BST) From: Will Deacon <will.deacon@arm.com> To: linux-kernel@vger.kernel.org, linux-mm@kvack.org Cc: cpandya@codeaurora.org, toshi.kani@hpe.com, tglx@linutronix.de, mhocko@suse.com, akpm@linux-foundation.org, sean.j.christopherson@intel.com, Will Deacon <will.deacon@arm.com> Subject: [PATCH v3 2/5] arm64: mmu: Drop pXd_present() checks from pXd_free_pYd_table() Date: Wed, 10 Oct 2018 17:23:01 +0100 Message-Id: <1539188584-15819-3-git-send-email-will.deacon@arm.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1539188584-15819-1-git-send-email-will.deacon@arm.com> References: <1539188584-15819-1-git-send-email-will.deacon@arm.com> 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: <linux-mm.kvack.org> X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
Clean up huge vmap and ioremap code
|
expand
|
diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c index 8080c9f489c3..0dcb3354d6dd 100644 --- a/arch/arm64/mm/mmu.c +++ b/arch/arm64/mm/mmu.c @@ -985,10 +985,8 @@ int pmd_free_pte_page(pmd_t *pmdp, unsigned long addr) pmd = READ_ONCE(*pmdp); - if (!pmd_present(pmd)) - return 1; if (!pmd_table(pmd)) { - VM_WARN_ON(!pmd_table(pmd)); + VM_WARN_ON(1); return 1; } @@ -1008,10 +1006,8 @@ int pud_free_pmd_page(pud_t *pudp, unsigned long addr) pud = READ_ONCE(*pudp); - if (!pud_present(pud)) - return 1; if (!pud_table(pud)) { - VM_WARN_ON(!pud_table(pud)); + VM_WARN_ON(1); return 1; }
The core code already has a check for pXd_none(), so remove it from the architecture implementation. Cc: Chintan Pandya <cpandya@codeaurora.org> Cc: Toshi Kani <toshi.kani@hpe.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Michal Hocko <mhocko@suse.com> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Will Deacon <will.deacon@arm.com> --- arch/arm64/mm/mmu.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)