From patchwork Wed Mar 17 06:23:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 12144885 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7344FC433E0 for ; Wed, 17 Mar 2021 06:24:54 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 187FE64F96 for ; Wed, 17 Mar 2021 06:24:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 187FE64F96 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id A1A266B0078; Wed, 17 Mar 2021 02:24:53 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9C8B46B007B; Wed, 17 Mar 2021 02:24:53 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 869396B007D; Wed, 17 Mar 2021 02:24:53 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0139.hostedemail.com [216.40.44.139]) by kanga.kvack.org (Postfix) with ESMTP id 6E5206B0078 for ; Wed, 17 Mar 2021 02:24:53 -0400 (EDT) Received: from smtpin12.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 277DA181AF5F7 for ; Wed, 17 Mar 2021 06:24:53 +0000 (UTC) X-FDA: 77928378066.12.278DD7C Received: from mail-pj1-f48.google.com (mail-pj1-f48.google.com [209.85.216.48]) by imf01.hostedemail.com (Postfix) with ESMTP id B3BEF2000380 for ; Wed, 17 Mar 2021 06:24:52 +0000 (UTC) Received: by mail-pj1-f48.google.com with SMTP id k23-20020a17090a5917b02901043e35ad4aso2601732pji.3 for ; Tue, 16 Mar 2021 23:24:52 -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=+xmdg+oguUa4M/qcJiA222ig1GYXN3tw39BVcZkinh4=; b=NysTe01Qi/lq0Ht3OBvm9MWdyBi269aHJZROee19b3GT6tTuVgso8DZWIypkSEWVei MIStA43kMPyyNIgYTc1aAkSORGUfWZTtezxniheDN0v8dDpOM8IvS8m9nqk9rbG0qIww jTnTF/fxLh97yIBfg/xeDwsbpENKUYgcTkpsGvrhM8jr4rVF458afW8p3tUQKc0JdpNr UuuKQ0vixeo2YBmZNqMk2u68kF/bCAfiV6EtiWC+nhBLpZxoWqb5Ovye0SmxH3MOs6+u T9vxKsbH9IVmUYLqKef3KrNPedjeqeqtMdF/YVhYFnGrX8efRXKdUkT4p2i0aTQAzxcs +Flw== 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=+xmdg+oguUa4M/qcJiA222ig1GYXN3tw39BVcZkinh4=; b=QKP7mVNwYkJR7KtuKpPO5zf9UHmMSKPSWRMfJ/g9szln44BtwBfZ092opfu41BhzcG T7zHksmEp49jGtZS69cPAfyqGbFZSPZ8fwbeT7B03kN5P7sDylGzB+LB7+osvLCLtkke Khd6cxaP9S+8i39tHuGm54Ps4aOYsBUi5wbCSWhDi1dQaVAm+F8T9ZPRRnJwro/cSGSG S37xXvYys0PYvRJu3EOCt1aFV9p/oKxpUAw5s6r59MYRxJWyvkolOGTWpNedC/pm0v7x mE8qUkyaQQpKVhNNjsxv4uKRHnKhQBQ6HdColrESEiovfBprk+7FxMdxY6K5c7WCT6AB KqVA== X-Gm-Message-State: AOAM530uuBRdyBvegBRJWcTvpKJ2SZ8G021qrDs3kcBM87JULdU/GGnN 1wT8o5kjyPewjg1UpuEwjm3AP6UcUwM= X-Google-Smtp-Source: ABdhPJwIpCK+UztE2dSFSAGTC2mdGpU/wz+pQ7ycJS9tKfG5lpPF/AfONMNNhsSTDkWz5X60+l9YJA== X-Received: by 2002:a17:90a:868c:: with SMTP id p12mr2816303pjn.82.1615962291549; Tue, 16 Mar 2021 23:24:51 -0700 (PDT) Received: from bobo.ozlabs.ibm.com (58-6-239-121.tpgi.com.au. [58.6.239.121]) by smtp.gmail.com with ESMTPSA id s19sm17959620pfh.168.2021.03.16.23.24.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Mar 2021 23:24:51 -0700 (PDT) From: Nicholas Piggin To: linux-mm@kvack.org, Andrew Morton Cc: Nicholas Piggin , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, Jonathan Cameron , Christoph Hellwig , Christophe Leroy , Rick Edgecombe , Ding Tianhong , Miaohe Lin , Christoph Hellwig Subject: [PATCH v13 04/14] mm/vmalloc: rename vmap_*_range vmap_pages_*_range Date: Wed, 17 Mar 2021 16:23:52 +1000 Message-Id: <20210317062402.533919-5-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20210317062402.533919-1-npiggin@gmail.com> References: <20210317062402.533919-1-npiggin@gmail.com> MIME-Version: 1.0 X-Stat-Signature: qh6n4wocdanjwrqouo9y8woc5qetp5c6 X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: B3BEF2000380 Received-SPF: none (gmail.com>: No applicable sender policy available) receiver=imf01; identity=mailfrom; envelope-from=""; helo=mail-pj1-f48.google.com; client-ip=209.85.216.48 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1615962292-186856 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: The vmalloc mapper operates on a struct page * array rather than a linear physical address, re-name it to make this distinction clear. Reviewed-by: Miaohe Lin Reviewed-by: Christoph Hellwig Signed-off-by: Nicholas Piggin --- mm/vmalloc.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 98e697ac764c..4693fab4f42a 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -189,7 +189,7 @@ 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, +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) { @@ -217,7 +217,7 @@ static int vmap_pte_range(pmd_t *pmd, unsigned long addr, return 0; } -static int vmap_pmd_range(pud_t *pud, unsigned long addr, +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) { @@ -229,13 +229,13 @@ 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, +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) { @@ -247,13 +247,13 @@ 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, +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) { @@ -265,7 +265,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; @@ -306,7 +306,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);