From patchwork Wed Oct 10 16:23:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Deacon X-Patchwork-Id: 148569 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp1062338lji; Wed, 10 Oct 2018 09:23:31 -0700 (PDT) X-Google-Smtp-Source: ACcGV60jC5mCCoesokkFE7pmhl4OI6VXR2oMapInKSx/Atl9MxZCWbh2FgMUBn5XcpOC4iDq0ZGx X-Received: by 2002:a63:fa09:: with SMTP id y9-v6mr30320520pgh.177.1539188611234; Wed, 10 Oct 2018 09:23:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539188611; cv=none; d=google.com; s=arc-20160816; b=Fp17vQWJJYE4VLtgYSmkljAJ34+L4mItYxq59S2wY1eZO/MyHvEfLKncj6eFx18Eyh /DXvPqOuqlWCZ1vo7sexni0ubTKsKI3uUm7jPacMAXvpaP1A6qE/zygKorG7PNOynF8n i9UxyUTuI6YpZc+kgeFO8tFIoqX+Gxe8sj+mPzqL66HAwnHCnvAVJmz6QDjtA2vFNjin ThrD0tNsucR76HK0E1SGLWsp0UD4QmY8zm5TOxxuXbLZvP6hxsqSvjkyHQh6aDp+naHC Ai2oFRthZz++ygVPjNS+Qthwb7fT7aEiFjM1sDusUgWz1NgpmEjDm7smDj+IJfWUtcJO 0FoA== 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; bh=N4Cv0QE3PH+lPyq9AU+EbNnOQ1f2Mu7HygBKhQjY+BQ=; b=t/VQ9RHFAVFGI4X1uVPeDOl9IUdmoijIX9+UaisUxC35EXPuHcjFe4Cf94gAh9bDJU OdA2rsMP7b4q+LezxCFf5An6ba/JRicKs+VMH6uf4Y0C86P1ocgfPNbT67ILmhR022fQ OimV9wokpicNGuVITn7GkPCjQExUfijB1sEZvj5bMHC+xP0hb16hyYIy0ov7zvUsrQzZ PK1Z+NjU/bFYJDHFPGDHlS/I/jeUomOvUwhXPuaAZYPo7X6Xj1hkh1rmf6n/LtgjqOyq HG/R3GEISSTefcI5XNKP5c1UQtYyMz6Gkcq28ILVYpCvhO9KtQyIC0dkcJXlvWeHqB9L /OIA== 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 s16-v6si23552017pgg.19.2018.10.10.09.23.30; Wed, 10 Oct 2018 09:23:31 -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 S1726728AbeJJXqG (ORCPT + 32 others); Wed, 10 Oct 2018 19:46:06 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:54812 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726515AbeJJXqG (ORCPT ); Wed, 10 Oct 2018 19:46:06 -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 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 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 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> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The core code already has a check for pXd_none(), so remove it from the architecture implementation. Cc: Chintan Pandya Cc: Toshi Kani Cc: Thomas Gleixner Cc: Michal Hocko Cc: Andrew Morton Signed-off-by: Will Deacon --- arch/arm64/mm/mmu.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) -- 2.1.4 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; }