From: Will Deacon <will.deacon@arm.com>
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 <will.deacon@arm.com>
Subject: [PATCH v2 3/5] x86: pgtable: Drop pXd_none() checks from pXd_free_pYd_table()
Date: Tue, 2 Oct 2018 12:06:01 +0100 [thread overview]
Message-ID: <1538478363-16255-4-git-send-email-will.deacon@arm.com> (raw)
In-Reply-To: <1538478363-16255-1-git-send-email-will.deacon@arm.com>
Now that the core code checks this for us, we don't need to do it in the
backend.
Cc: Chintan Pandya <cpandya@codeaurora.org>
Cc: Toshi Kani <toshi.kani@hpe.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Toshi Kani <toshi.kani@hpe.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
---
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
next prev parent reply other threads:[~2018-10-02 11:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-02 11:05 [PATCH v2 0/5] Clean up huge vmap and ioremap code Will Deacon
2018-10-02 11:05 ` [PATCH v2 1/5] ioremap: Rework pXd_free_pYd_page() API Will Deacon
2018-10-02 11:06 ` [PATCH v2 2/5] arm64: mmu: Drop pXd_present() checks from pXd_free_pYd_table() Will Deacon
2018-10-02 11:06 ` Will Deacon [this message]
2018-10-02 11:30 ` [PATCH v2 3/5] x86: pgtable: Drop pXd_none() " Thomas Gleixner
2018-10-02 11:06 ` [PATCH v2 4/5] lib/ioremap: Ensure phys_addr actually corresponds to a physical address Will Deacon
2018-10-02 11:06 ` [PATCH v2 5/5] lib/ioremap: Ensure break-before-make is used for huge p4d mappings Will Deacon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1538478363-16255-4-git-send-email-will.deacon@arm.com \
--to=will.deacon@arm.com \
--cc=akpm@linux-foundation.org \
--cc=cpandya@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=sean.j.christopherson@intel.com \
--cc=tglx@linutronix.de \
--cc=toshi.kani@hpe.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).