From patchwork Wed Oct 10 16:23:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Deacon X-Patchwork-Id: 148571 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp1062505lji; Wed, 10 Oct 2018 09:23:40 -0700 (PDT) X-Google-Smtp-Source: ACcGV63/yFaBAUT1/EvJjluNtuIP0+Y3XLIqT/XOTBgSuXWCd/hYWLuFPAGbeFUQoOQ5VjGWDTi+ X-Received: by 2002:a17:902:728e:: with SMTP id d14-v6mr117826pll.51.1539188620074; Wed, 10 Oct 2018 09:23:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539188620; cv=none; d=google.com; s=arc-20160816; b=DZFxAKEYN90A/m6HuyJ7bE+/cxyy2C6+3AMnaJ1VQXuF61KUw+HOhuugH8zcyVjaKm LvXN6DU7HOjwDo9BqGaApG7msKv0KSTgJUCSuMUrxq7fhDBVfXoI6OVk1+Ui4AccXkMd q1ndb8xEy5R4VBKvQMKfoRXQhHSWEG9yNRYBmCuIfgVhvDonRdC6GoF235izZvTk1OSP sYc5o33Q22O5vw6Ae73tbqH7tslFXHc7yj0c1Ej2DiQ1R8a/LkctsTo2g5fd1+gpJ1UC p7cpDaRFGb5gjw6LaYoTLd64tOCd4D8XxJgeaVBT9bTAmSEsziE92crPngmkVerFMNZ+ ptEw== 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=Knz78Us/CKYc8fbiR3DNa1DlNQlZ1CX9pImVCVrcNmY=; b=sg3guJgJVfS7QSZ9wVaXG4QVOi9qs+6rY0Q2cRrofN+G+E1vmaewGk0piI3N57ZPZ+ R1U6P8AdBHX8MqpqOB0x/thz6mHAk8y2x8EJyQZq9lNxplcc69kwq9dEwqxCB3+fOO4T 9Ii4PbAVsjBnmIGCHsKfIx6Bdl2x+4+CblZKpRvFDY6Ue0imHKQYpRmx1HY9QBTKKCo/ 6dUNA3/RXCfELKm+5qVDz3mi6F9APCG93FEc22ejT2yror3muPseOFykNqvFVfDLLxkW d2/+iJ6w2XG+iMvJHLjuDLXFFwOMf9w5ljMN4G3cCTFIaDBgw2cCXZWHNKlhpGVhS8kS rpQA== 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 y30-v6si24306378pgk.13.2018.10.10.09.23.39; Wed, 10 Oct 2018 09:23:40 -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 S1727007AbeJJXqb (ORCPT + 32 others); Wed, 10 Oct 2018 19:46:31 -0400 Received: from foss.arm.com ([217.140.101.70]:54828 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726562AbeJJXqG (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 7BE6315BE; 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 4DDEC3F909; Wed, 10 Oct 2018 09:23:13 -0700 (PDT) Received: by edgewater-inn.cambridge.arm.com (Postfix, from userid 1000) id 034541AE189D; 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 3/5] x86/pgtable: Drop pXd_none() checks from pXd_free_pYd_table() Date: Wed, 10 Oct 2018 17:23:02 +0100 Message-Id: <1539188584-15819-4-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: Michal Hocko Cc: Andrew Morton Acked-by: Thomas Gleixner Reviewed-by: Toshi Kani Signed-off-by: Will Deacon --- arch/x86/mm/pgtable.c | 6 ------ 1 file changed, 6 deletions(-) -- 2.1.4 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);