From patchwork Wed Sep 12 10:26:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Deacon X-Patchwork-Id: 146546 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp4647066ljw; Wed, 12 Sep 2018 03:26:14 -0700 (PDT) X-Google-Smtp-Source: ANB0VdanaJ/FTPZIaTAsDfz7SNtpL7njnWTTBPoCyv8FF6HC203L1YfFlDB0WiHeU6AJUfInLf5L X-Received: by 2002:a65:448c:: with SMTP id l12-v6mr1432855pgq.277.1536747974765; Wed, 12 Sep 2018 03:26:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536747974; cv=none; d=google.com; s=arc-20160816; b=EKsvI4c84vfwtCNH7b2gEchBT3/0KyI08/3FLkBC0PeqDmNaB7rgvHJdtvJ+4BAKbt A6BuiukS5vtBrLgRCpRhA3+ntf7I7jo6AF9fcOYHmeA10UdRco+M30QW+so8a3WC21Ze P4zahDIoKj9QSvdY4MRV63pEFD87XH4psGWieDQVPJoOjfWLZUna5uDwpwQNIuEVixRx SPPODgNd9lYYmh1U7TmbhYNFxO/nVzP4Yb+OYgFIg2DjScAhXhk6a85n6tPHBVMqKqtu 8DfGB5vVXYS7R2E+HDFB3BPuNHZC+As7RuBaQwZ9Ks7J25prDSjq8UvgV33hmOY1yk96 Argg== 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=1JT3gBGB2fQ1eze1dftN8gxIxDA2nlm9MPmGKsks1qM=; b=zpcpdWBtm/LTdWtxrKJQ8hgpDBta2GqXqwfWwySgWIuuTLJt/uufl59zW10SbCg526 zCPQcsWfbh4Xi52o7vwYXy4Xb8Q8MABSxcqj3Y034d+wDr6y+42flSnqZiliypZ7SCJl MPNRDLnNIns0ip7I4vGIps+HYxl3YH8r3tidQMjn+JwAOuns6sFtjmRGXz3orT1d2Gai ROZWJ0N8FwUu9AKU0okp6B/SEqvOMTcxY51PA8NNn11GUpMZ4B6IzJ4wo60+Nwq4E0u9 /yq769iE/+8OyRTbcVx7TYZBdvHTDrTkwnmwwTgFoaIztNTJi1y8SIViMJZWE8I8PM1p jqcQ== 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 y3-v6si648528pgg.266.2018.09.12.03.26.14; Wed, 12 Sep 2018 03:26:14 -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 S1728014AbeILP3z (ORCPT + 32 others); Wed, 12 Sep 2018 11:29:55 -0400 Received: from foss.arm.com ([217.140.101.70]:56992 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727278AbeILP3z (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 111FC1682; 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 D766F3F907; Wed, 12 Sep 2018 03:26:01 -0700 (PDT) Received: by edgewater-inn.cambridge.arm.com (Postfix, from userid 1000) id A3E011AE33B8; 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 3/5] x86: pgtable: Drop pXd_none() checks from pXd_free_pYd_table() Date: Wed, 12 Sep 2018 11:26:12 +0100 Message-Id: <1536747974-25875-4-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/x86/mm/pgtable.c | 6 ------ 1 file changed, 6 deletions(-) -- 2.1.4 Reviewed-by: Toshi Kani diff --git a/arch/x86/mm/pgtable.c b/arch/x86/mm/pgtable.c index ae394552fb94..b4919c44a194 100644 --- a/arch/x86/mm/pgtable.c +++ b/arch/x86/mm/pgtable.c @@ -796,9 +796,6 @@ int pud_free_pmd_page(pud_t *pud, unsigned long addr) pte_t *pte; int i; - if (pud_none(*pud)) - return 1; - pmd = (pmd_t *)pud_page_vaddr(*pud); pmd_sv = (pmd_t *)__get_free_page(GFP_KERNEL); if (!pmd_sv) @@ -840,9 +837,6 @@ int pmd_free_pte_page(pmd_t *pmd, unsigned long addr) { pte_t *pte; - if (pmd_none(*pmd)) - return 1; - pte = (pte_t *)pmd_page_vaddr(*pmd); pmd_clear(pmd);