Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp5252952imm; Wed, 12 Sep 2018 03:26:55 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZRQa//Nk2GSzx4p2/IOG7DMf1Sh+iqqXyIjOqp4RH347uAGz3mM1jccGox1uYlMoLv+kK2 X-Received: by 2002:a63:334c:: with SMTP id z73-v6mr1423587pgz.220.1536748015139; Wed, 12 Sep 2018 03:26:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536748015; cv=none; d=google.com; s=arc-20160816; b=olrwTaN6pgxlc/gmDcsr45IsQqUDC43DD0s7EgOGlL1kYpiSpr88WXvuJeW7+Ghbcs 635v6MPz/fRvfkA4nqGg6GYcNmcV2mF0O7WYyW3kYS2cwmhwz5tcpGUigjBMz1KXoeBw sPDaKMi3b8nY7phHGCwVx4Bf02qjI3kVf4b62i7LI8paSzO4NgQuWKKmehmi1QOeJNiL ngdmSdoW9+BGP5CWpHfxliNuI62ZsMgfbbgB1rReC/tUaE8G2wX7f5rddYMOcY984OyQ kuH9PBEvsN+50jBra4Ks8k+Xw2Pay77PNxioa7yqDh/aFqzc8mb5ysePS2XUmOKlqx/K wWPQ== 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 g16-v6si651714pgj.35.2018.09.12.03.26.39; Wed, 12 Sep 2018 03:26:55 -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 S1728010AbeILP3z (ORCPT + 99 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(-) 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); -- 2.1.4