From patchwork Sat Dec 5 06:57:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11952949 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 DE723C433FE for ; Sat, 5 Dec 2020 06:57:55 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 89F9B22D58 for ; Sat, 5 Dec 2020 06:57:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 89F9B22D58 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 2B0E86B006C; Sat, 5 Dec 2020 01:57:55 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 2395C6B006E; Sat, 5 Dec 2020 01:57:55 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 129676B0070; Sat, 5 Dec 2020 01:57:55 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0251.hostedemail.com [216.40.44.251]) by kanga.kvack.org (Postfix) with ESMTP id EC4246B006C for ; Sat, 5 Dec 2020 01:57:54 -0500 (EST) Received: from smtpin26.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id AFF2C1EE6 for ; Sat, 5 Dec 2020 06:57:54 +0000 (UTC) X-FDA: 77558323668.26.shelf48_340db7b273cb Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin26.hostedemail.com (Postfix) with ESMTP id 834E41804B656 for ; Sat, 5 Dec 2020 06:57:54 +0000 (UTC) X-HE-Tag: shelf48_340db7b273cb X-Filterd-Recvd-Size: 6312 Received: from mail-pf1-f193.google.com (mail-pf1-f193.google.com [209.85.210.193]) by imf23.hostedemail.com (Postfix) with ESMTP for ; Sat, 5 Dec 2020 06:57:54 +0000 (UTC) Received: by mail-pf1-f193.google.com with SMTP id b26so5359279pfi.3 for ; Fri, 04 Dec 2020 22:57:53 -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=Wf66xeGBT+zLBJ325IKif/6Ivp+txfeM6xGRJ6CQfBE=; b=fcGKhIppJJa4HGaXNdZBhdNLob29Ivf9BES+4C8PfV5PbxTaC14ALc7yzgbzTh1Cf2 LjY1qEbDYZiXN0mvRHB9kiU1bHI8141d6FpINWNGUwiZuAMlwJh7UbCitM0jugtSzM+e uuVzySGmGdz/Yxt1V7K/3YHoHcW8tcgLe1Yp12EMc82n5ttvwmI/rb1/KAYWS1plwtbs C3P/hnxWcEW+9SZQ68McBxZbgcmjUDMkfkRVryruxzpH8n3TAVWd3jxOUtaInOlv1kWv 90Gz53+ICxtmSLTNCU1YyD9uSx4stnX42USHoS8I9tMkYSCB4FkeuO7N/K7et3LRpziZ MFNw== 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=Wf66xeGBT+zLBJ325IKif/6Ivp+txfeM6xGRJ6CQfBE=; b=g6srQGjdBHOnFjStKmbZFRrJUSDLnBP8jm5JVB7nOC0jLvQur7vK//kytr9ywln523 95Z7fPWDqJRSfgRw0Bdt6Td+p2zKvn2Vc5ni3m2a8Sof+LAVP33Wfsd+k4auSJDLgvtJ LBuad+imzrAtsJlHhvmrhA8UsJeKZba1R+mCKLuAHwLraXmEZVz22zWC+COfPdbWkSVR FlYIc5vMPh7EwyDo/8qR5sro0gAKstZ8SvCU9AW3vRUaKrcUU4wxZMtOiLx/zWzBudSx K1ZbdHBWEtumW+iC29h/aUbF4iJj2c9x7oOSzY1ekSVcvwRb/Xn35wKIK+KUkmEltvsY Rf7w== X-Gm-Message-State: AOAM533ttvdgl/v8wbnKS66SmiUKSJxw91zi+0JBIkVWFmRZz5h2oq2H gT1gcEj6Ze4xXGAZjr9sEtfDbpQFQcEbAg== X-Google-Smtp-Source: ABdhPJxONuxdsKc3Y9tSWgtmcHfGYtNDoscWaaTlNa/hUFWSKu5YHYgn5z4+YBtAOkosOqfGAZt7dA== X-Received: by 2002:a62:ab13:0:b029:197:ca83:7720 with SMTP id p19-20020a62ab130000b0290197ca837720mr7159021pff.78.1607151472903; Fri, 04 Dec 2020 22:57:52 -0800 (PST) Received: from bobo.ozlabs.ibm.com ([1.129.145.238]) by smtp.gmail.com with ESMTPSA id a14sm1110848pfl.141.2020.12.04.22.57.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Dec 2020 22:57:52 -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 Subject: [PATCH v9 03/12] mm/vmalloc: rename vmap_*_range vmap_pages_*_range Date: Sat, 5 Dec 2020 16:57:16 +1000 Message-Id: <20201205065725.1286370-4-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20201205065725.1286370-1-npiggin@gmail.com> References: <20201205065725.1286370-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 --- mm/vmalloc.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/mm/vmalloc.c b/mm/vmalloc.c index f85124e88bdb..42326dbffaf0 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);