From patchwork Mon Aug 10 02:27:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11706913 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4E1CD913 for ; Mon, 10 Aug 2020 02:30:01 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 279632068F for ; Mon, 10 Aug 2020 02:30:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="cFgvdj7c"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="SMQPO073" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 279632068F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=mfV/AheEnWOxm0OR4Py+dnwmgB0q5ldjJMuL/CTQMT4=; b=cFgvdj7cEvQ5CwEAqsFLLnjWG KCqv7lpNi9mcOkvb2DsKuHw1ExK6Xpi7gZ5im+ykyIF+FVNwMBN6U9USkw+E7O2G25buOhu0Hc8Ke prCetlkmX/ooBzfD+swjmeOgYfiSYSt05qqBrFvdt1wqQDRwNk9SJeCd/R7OQlz6r5hzvJw6rpBOV rEQFscoDNxYEWeLoXKu2tmr2nfSWYCocV7J4dyWHQ04ot2JGYsTjzEVlXoQuXmq1BYt+/IXQ4taJf ZkUophngj7sHuDS8C/xQas04H1VGXb/TWAHvaBNhkB9ZQZeqidY7IR5N8vrTwsc8uyusEjIK7hexd YJ7CJSzIA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k4xXi-00051o-Cm; Mon, 10 Aug 2020 02:28:06 +0000 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k4xXg-00050W-G6 for linux-arm-kernel@lists.infradead.org; Mon, 10 Aug 2020 02:28:05 +0000 Received: by mail-pf1-x444.google.com with SMTP id m8so4381797pfh.3 for ; Sun, 09 Aug 2020 19:28:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=xoa50mjKdO+6rEo7JFgsM1iktECeAufQruBypQNx5uU=; b=SMQPO07308HbTz5R2bXEM/3gc3ItFl6g5ePYDHuBQx4pD8Y6rKeRum7JmixNo2JTPy F8e1S2IG7aEYVgVAu8HIbxKoAlslBlF27d5piH2FeaWK1c7upqS585JDLUhCBcKzQHTn wr9L/QH+bZwdnlKEEWwiDjWifyVhnVJzNCNcb2NqGD0npXFc9c+tb2z8LGK1AJDVAsNZ XiIbv0FFtFNWpoJD4OnZR6JRnhsts/5+BHgl3O3yu2m4Rl8JzRD3sJ042T61COweBtFC EM1Y+FQW7Nrt8jT95YSaPBYerMpBnEsZSojnMJJMiWbq+fSUxZ6KLcRbExu4ZjJFbrx8 PSOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=xoa50mjKdO+6rEo7JFgsM1iktECeAufQruBypQNx5uU=; b=iIaAsbfHFwxQvxBL2/o0AnplrRNSYuJ5DxIHcsCoJuRnvpzzbOfgTrGxfO9oR2KNku 3V9/muKf+LUcGpVzhSgc2n3holz3Bbikn+vkNKE0suQ1S5ECOGDINM/dGeTZwVEvPWMD XpxDfGLwsdhfXXi1DaYAdR7/GL2Amh7DRE+sV/VJnkW0AR9EDGhUKNpUfmAlhv2Hr6Fk 5UVVINumULgvWBG8J3qBR0sOV/YXUVRMDCUbupNjSLqRPXr/iDxj/jRFeNQozXPUTO9y D6AUTSzkxfjmf4XBGahlHBKfSsvEEy5V/4Hq0EYWJ0KcBM1lWcAt4NQlX8VIkJQzr15o QmEA== X-Gm-Message-State: AOAM533/w1uGQtvimMrqF8hTQVX9HBB72ohRylCJPk9/kXLS5hmfW5C7 tMihHjlNQWE+UXsFOgjD5vk= X-Google-Smtp-Source: ABdhPJyF0v331ifmF6+EZbg+clfmQWCPigoJ9Z+l4oz8cqoLCgmGsSnYR+bh1HGTwKbaJ/maQnmNDA== X-Received: by 2002:a62:6083:: with SMTP id u125mr24178457pfb.286.1597026482560; Sun, 09 Aug 2020 19:28:02 -0700 (PDT) Received: from bobo.ibm.com (193-116-100-32.tpgi.com.au. [193.116.100.32]) by smtp.gmail.com with ESMTPSA id l17sm21863475pff.126.2020.08.09.19.27.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Aug 2020 19:28:02 -0700 (PDT) From: Nicholas Piggin To: linux-mm@kvack.org Subject: [PATCH v3 3/8] mm/vmalloc: rename vmap_*_range vmap_pages_*_range Date: Mon, 10 Aug 2020 12:27:27 +1000 Message-Id: <20200810022732.1150009-4-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200810022732.1150009-1-npiggin@gmail.com> References: <20200810022732.1150009-1-npiggin@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200809_222804_540227_F9A7ABD4 X-CRM114-Status: GOOD ( 14.26 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:444 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [npiggin[at]gmail.com] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arch@vger.kernel.org, Zefan Li , Catalin Marinas , x86@kernel.org, linuxppc-dev@lists.ozlabs.org, Nicholas Piggin , linux-kernel@vger.kernel.org, Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Thomas Gleixner , Will Deacon , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The vmalloc mapper operates on a struct page * array rather than a linear physical address, re-name it to make this distinction clear. Signed-off-by: Nicholas Piggin --- mm/vmalloc.c | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 49f225b0f855..3a1e45fd1626 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -190,9 +190,8 @@ void unmap_kernel_range_noflush(unsigned long start, unsigned long size) arch_sync_kernel_mappings(start, end); } -static int vmap_pte_range(pmd_t *pmd, unsigned long addr, - unsigned long end, pgprot_t prot, struct page **pages, int *nr, - pgtbl_mod_mask *mask) +static int vmap_pages_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end, + pgprot_t prot, struct page **pages, int *nr, pgtbl_mod_mask *mask) { pte_t *pte; @@ -218,9 +217,8 @@ static int vmap_pte_range(pmd_t *pmd, unsigned long addr, return 0; } -static int vmap_pmd_range(pud_t *pud, unsigned long addr, - unsigned long end, pgprot_t prot, struct page **pages, int *nr, - pgtbl_mod_mask *mask) +static int vmap_pages_pmd_range(pud_t *pud, unsigned long addr, unsigned long end, + pgprot_t prot, struct page **pages, int *nr, pgtbl_mod_mask *mask) { pmd_t *pmd; unsigned long next; @@ -230,15 +228,14 @@ static int vmap_pmd_range(pud_t *pud, unsigned long addr, return -ENOMEM; do { next = pmd_addr_end(addr, end); - if (vmap_pte_range(pmd, addr, next, prot, pages, nr, mask)) + if (vmap_pages_pte_range(pmd, addr, next, prot, pages, nr, mask)) return -ENOMEM; } while (pmd++, addr = next, addr != end); return 0; } -static int vmap_pud_range(p4d_t *p4d, unsigned long addr, - unsigned long end, pgprot_t prot, struct page **pages, int *nr, - pgtbl_mod_mask *mask) +static int vmap_pages_pud_range(p4d_t *p4d, unsigned long addr, unsigned long end, + pgprot_t prot, struct page **pages, int *nr, pgtbl_mod_mask *mask) { pud_t *pud; unsigned long next; @@ -248,15 +245,14 @@ static int vmap_pud_range(p4d_t *p4d, unsigned long addr, return -ENOMEM; do { next = pud_addr_end(addr, end); - if (vmap_pmd_range(pud, addr, next, prot, pages, nr, mask)) + if (vmap_pages_pmd_range(pud, addr, next, prot, pages, nr, mask)) return -ENOMEM; } while (pud++, addr = next, addr != end); return 0; } -static int vmap_p4d_range(pgd_t *pgd, unsigned long addr, - unsigned long end, pgprot_t prot, struct page **pages, int *nr, - pgtbl_mod_mask *mask) +static int vmap_pages_p4d_range(pgd_t *pgd, unsigned long addr, unsigned long end, + pgprot_t prot, struct page **pages, int *nr, pgtbl_mod_mask *mask) { p4d_t *p4d; unsigned long next; @@ -266,7 +262,7 @@ static int vmap_p4d_range(pgd_t *pgd, unsigned long addr, return -ENOMEM; do { next = p4d_addr_end(addr, end); - if (vmap_pud_range(p4d, addr, next, prot, pages, nr, mask)) + if (vmap_pages_pud_range(p4d, addr, next, prot, pages, nr, mask)) return -ENOMEM; } while (p4d++, addr = next, addr != end); return 0; @@ -307,7 +303,7 @@ int map_kernel_range_noflush(unsigned long addr, unsigned long size, next = pgd_addr_end(addr, end); if (pgd_bad(*pgd)) mask |= PGTBL_PGD_MODIFIED; - err = vmap_p4d_range(pgd, addr, next, prot, pages, &nr, &mask); + err = vmap_pages_p4d_range(pgd, addr, next, prot, pages, &nr, &mask); if (err) return err; } while (pgd++, addr = next, addr != end);