From patchwork Thu Dec 6 18:21:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Deacon X-Patchwork-Id: 153057 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp10860001ljp; Thu, 6 Dec 2018 10:21:30 -0800 (PST) X-Google-Smtp-Source: AFSGD/VCUqO3zweS8u6XiB4GwqZUHmBJyMUvEg+WEPw3OF4lLL4JiAOxx9+ndWzzkgKKlViYWL+N X-Received: by 2002:a17:902:3281:: with SMTP id z1mr29858763plb.296.1544120490485; Thu, 06 Dec 2018 10:21:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544120490; cv=none; d=google.com; s=arc-20160816; b=LiCK2jfAhESrmlxWP1gPicXEg/BvPm2riJvr+XerJ5nLEunp3yiXfaKL0C/q7WRCtc FKV0gyLLdSJKiVAPA5jw815wp9D1Xk/jlC1zuONX0i2wJSgxP3AQYlDy0O2mQMhl0VYr QVJFKvoJp40Xdf/4o8+xHJpa6yaEONUQuf1uCrp/q/f5uPX2ToSg/LVk1cSH/mB7f/9/ Q+R27KG8Jk0LTPVSIOZ9luzgwye7+0vYylPzecYUoYjTy7pL+pKnQ+Rz8I5jdulMv5z5 rVZaQ4nRRBYh3SCey7HseMuL/eU5KtIV+PDVKMU9IQpFMGeAVaSkN3mZ2imV+qRLCZ1G tp7A== 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=S3Pe7jCrFGE7JxF6m5RucqgSGzB7M8lCaWDcweULJ1Y=; b=fGnPBAEl7m2MI+rf80d7O9Y1xFoq46MhRkmBE7g0S53dN3w7VGaREulkRh8/70n+NZ RFivKLel3MbFRHUVXGM43iGshgFp+DCdshiZICbLCpxT5MEw86cHOidMPHOURQ4206+i /401ilDvScOYCdJN0BKhMCg1nXItPJOAEvQrfddpIsXShmNPse17NOoJQ8WCqthm7M1j 2z2VhzP9x80P1qbXBDMx782m9IALBhXCGdU86HsZeivLVolFTHEWatjD5Jv8383GMxjb TKj0sRVQ+KSq0Nd0f2MVt2R0D+9PVAxczgibELjbNy+vPv5htTLSwpE/4ld8M6tFUeag GnsA== 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 h13si700592pgs.17.2018.12.06.10.21.30; Thu, 06 Dec 2018 10:21:30 -0800 (PST) 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 S1726129AbeLFSVU (ORCPT + 31 others); Thu, 6 Dec 2018 13:21:20 -0500 Received: from foss.arm.com ([217.140.101.70]:57854 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725942AbeLFSVQ (ORCPT ); Thu, 6 Dec 2018 13:21:16 -0500 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 B3DDA15AB; Thu, 6 Dec 2018 10:21:15 -0800 (PST) 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 8483C3F5AF; Thu, 6 Dec 2018 10:21:15 -0800 (PST) Received: by edgewater-inn.cambridge.arm.com (Postfix, from userid 1000) id 9A6A91AE0BE3; Thu, 6 Dec 2018 18:21:36 +0000 (GMT) From: Will Deacon To: akpm@linux-foundation.org Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, cpandya@codeaurora.org, toshi.kani@hpe.com, tglx@linutronix.de, mhocko@suse.com, sean.j.christopherson@intel.com, Will Deacon Subject: [RESEND PATCH v4 3/5] x86/pgtable: Drop pXd_none() checks from pXd_free_pYd_table() Date: Thu, 6 Dec 2018 18:21:33 +0000 Message-Id: <1544120495-17438-4-git-send-email-will.deacon@arm.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1544120495-17438-1-git-send-email-will.deacon@arm.com> References: <1544120495-17438-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 59274e2c1ac4..e95a7d6ac8f8 100644 --- a/arch/x86/mm/pgtable.c +++ b/arch/x86/mm/pgtable.c @@ -811,9 +811,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) @@ -855,9 +852,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);