From patchwork Sun Jan 24 08:22:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 12042151 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 0D932C433DB for ; Sun, 24 Jan 2021 08:23:12 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 9BD2A22582 for ; Sun, 24 Jan 2021 08:23:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9BD2A22582 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 37B1B6B000C; Sun, 24 Jan 2021 03:23:11 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 303FB6B000D; Sun, 24 Jan 2021 03:23:11 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1F2F36B000E; Sun, 24 Jan 2021 03:23:11 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0100.hostedemail.com [216.40.44.100]) by kanga.kvack.org (Postfix) with ESMTP id 0374A6B000C for ; Sun, 24 Jan 2021 03:23:10 -0500 (EST) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id B990F1EE6 for ; Sun, 24 Jan 2021 08:23:10 +0000 (UTC) X-FDA: 77739978540.30.lead37_6212af12757b Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin30.hostedemail.com (Postfix) with ESMTP id 9675D180B3C96 for ; Sun, 24 Jan 2021 08:23:10 +0000 (UTC) X-HE-Tag: lead37_6212af12757b X-Filterd-Recvd-Size: 6302 Received: from mail-pj1-f48.google.com (mail-pj1-f48.google.com [209.85.216.48]) by imf41.hostedemail.com (Postfix) with ESMTP for ; Sun, 24 Jan 2021 08:23:10 +0000 (UTC) Received: by mail-pj1-f48.google.com with SMTP id cq1so6440771pjb.4 for ; Sun, 24 Jan 2021 00:23:10 -0800 (PST) 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=X5+HXwlV+fH03hyDjK/J9gg0LI2GnzY0puUeRChOcaU=; b=FJfdd+BvQdR6QZkiZ000WG4imKauyp2TKUd7ov3ARyWxKn9AdZ+Iu4WtGCe5ie6eDS vVUlTE6CnRm3Tadsj4m7umH0Ualy1+haHVe8kCZNtzl9/N4AfiAvBwK7MM8SVDRkcxx2 uIFx9idE1UVJeHCqo40pWH9whW3qPus1jrBhVSn7VsTMtSoq5vEiAKcLtbvAsvScqrMZ jd+hUZtOerguD/k/PIucqPjZFFFSamH4N15v7pMpk+eRk5kpVc+M0lyg9OPkFFsDD6tv EobQG4c2j9PZ8ppw8yGmN596LFVFT4SFzF6UBSPS8AGKM8et8PuJoy7zc8LxFndX5Mt2 rsjw== 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=X5+HXwlV+fH03hyDjK/J9gg0LI2GnzY0puUeRChOcaU=; b=VHzzTRqyHkOiuvaF8m/zHGxnjvpyHlQmkMR3Qn3ErjSzz4uoYyL9oxOyxp0l1sFR2Q u6DjJPay0AVHn9oSnZkSElCKwPWtPl74S4aFRaZH+RNOF06UxnwcgQO5089Tj7DKb87W b5k6Md3cod4gbXt4U+IWRpOx6yO6TkPIh+wIDxNQkLy4wfyyRWfHuJh2qEUteGwXApQS cCDQ6STl4fPXM2YeM3e3+7EHgxz8Ri6yy+I9vZ0NdG+3ZjTq1k1uPDLm4ejTcqsgC+p3 8S3GoIt57vaGfCWZtJVYH+KovHyg5jF+4o4uyMt8PuBtrnIlSilg1xIoPu4UFhRFN+rk oaDQ== X-Gm-Message-State: AOAM530U9tclZfC/+WZdEbdbePDSveL/5geMIR6sqwzJdyyVUHXFtGCs juT5NAiq9WaK+CNe0hI5B6YDWFZ+n9o= X-Google-Smtp-Source: ABdhPJxD5UwSXKWxq077HcNekHjHCxP9n4SGcDoENgLvY1RR9GktbirNa0o0jUS4EhthEUeob+SvKw== X-Received: by 2002:a17:90a:ce10:: with SMTP id f16mr1347598pju.136.1611476589276; Sun, 24 Jan 2021 00:23:09 -0800 (PST) Received: from bobo.ozlabs.ibm.com ([124.170.13.62]) by smtp.gmail.com with ESMTPSA id gb12sm11799757pjb.51.2021.01.24.00.23.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Jan 2021 00:23:08 -0800 (PST) From: Nicholas Piggin To: linux-mm@kvack.org, Andrew Morton Cc: Nicholas Piggin , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Zefan Li , Jonathan Cameron , Christoph Hellwig , Christophe Leroy , Rick Edgecombe , Ding Tianhong Subject: [PATCH v10 03/12] mm/vmalloc: rename vmap_*_range vmap_pages_*_range Date: Sun, 24 Jan 2021 18:22:21 +1000 Message-Id: <20210124082230.2118861-4-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20210124082230.2118861-1-npiggin@gmail.com> References: <20210124082230.2118861-1-npiggin@gmail.com> MIME-Version: 1.0 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. Signed-off-by: Nicholas Piggin Reviewed-by: Christoph Hellwig --- mm/vmalloc.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 62372f9e0167..7f2f36116980 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);