Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp5254545imm; Wed, 12 Sep 2018 03:28:34 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZFJQl2z//GeFL4l3Jdo7P8nu5ATdtT8Qa0MTef8Pblc4TiBvfsqLg9Yp3ASZkwOrd6THkF X-Received: by 2002:a65:6398:: with SMTP id h24-v6mr1432841pgv.245.1536748114689; Wed, 12 Sep 2018 03:28:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536748114; cv=none; d=google.com; s=arc-20160816; b=yXkZSyR/fNXz9sLmpmeFKwxZSTx+ldE/3VrmJlejeVFgJ3s5UI6by4auWgZxHGzWdX +0+B5J3DN5uNUKxt/8GHQSpEjyACgbkY0GCFDohuN7nSqQ/capn9asQThDSKmJl2SGzZ Ri4f3ml6hQukkxNRj2WJBVhtRsujpsimZcexvO1w+gPfvw/5VJcBI/6R9FhS4W/plspF WLr7Dwl3Zjqcx5r/i73W5YvHFMLJbKRtx/x/oyr/dgmBsrTHCA7VVZnsBFW1RJYaLa6L PKJoEivyrEudolIxKiF6Uie3UnXbwpKENzpVCZZEYZaPLZGY+PuljUFM9WDpgdDdQIbb YOJg== 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=5Z6J2RQTqMWhpJ0pzFttI0SwIzpZ6lRPEY1BeHTRt8o=; b=mloKecCYlYQgPxO+MmYczi9r5B+BWiL47+TqDeCZ/Wh30K4Mshk++LNcVjg1UeQ99T zDQUrCTnXzo5YY1yDSdeTTgS37oYxipYHzLdKVfR9KcsAxhj8LC6Thg7qovDDYnndqQu 321KzpqbNefX6G6AygshzYjv1OqhaB3K4iJXv/imhAHCcLhh7y9sm/+mclPH54gSG3UC qs19Rp4d8vTKYbJNEhsdZz9Z8VLij84qpVrV/fzTCE4OBQFL7TFsSnJYb4JAQjE3aZuo Fl1XW/ZnLgbHc9X1Ku1HXBqPpjJS4puoTA5rY10OiU/GRS5GlVZe0zcCGMMH1fJBznHe V+qg== 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 q2-v6si658572pgs.108.2018.09.12.03.28.20; Wed, 12 Sep 2018 03:28:34 -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 S1727859AbeILP3z (ORCPT + 99 others); Wed, 12 Sep 2018 11:29:55 -0400 Received: from foss.arm.com ([217.140.101.70]:56980 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727161AbeILP3z (ORCPT ); Wed, 12 Sep 2018 11:29:55 -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 01D3B15BF; Wed, 12 Sep 2018 03:26:02 -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 C76BD3F7DB; Wed, 12 Sep 2018 03:26:01 -0700 (PDT) Received: by edgewater-inn.cambridge.arm.com (Postfix, from userid 1000) id 939EC1AE3318; Wed, 12 Sep 2018 11:26:18 +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, Will Deacon Subject: [PATCH 2/5] arm64: mmu: Drop pXd_present() checks from pXd_free_pYd_table() Date: Wed, 12 Sep 2018 11:26:11 +0100 Message-Id: <1536747974-25875-3-git-send-email-will.deacon@arm.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1536747974-25875-1-git-send-email-will.deacon@arm.com> References: <1536747974-25875-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 Now that the core code checks this for us, we don't need to do it in the backend. 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(-) 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; } -- 2.1.4