From patchwork Tue Jan 26 04:45:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 12045197 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,URIBL_BLOCKED, 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 AC254C433E6 for ; Tue, 26 Jan 2021 04:45:41 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 59A2E22B2C for ; Tue, 26 Jan 2021 04:45:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 59A2E22B2C 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 E94088D007D; Mon, 25 Jan 2021 23:45:40 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id E449C8D0076; Mon, 25 Jan 2021 23:45:40 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D5B118D007D; Mon, 25 Jan 2021 23:45:40 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0092.hostedemail.com [216.40.44.92]) by kanga.kvack.org (Postfix) with ESMTP id BB69F8D0076 for ; Mon, 25 Jan 2021 23:45:40 -0500 (EST) Received: from smtpin26.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 8DCC2180ACF9A for ; Tue, 26 Jan 2021 04:45:40 +0000 (UTC) X-FDA: 77746688040.26.bikes24_18083572758b Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin26.hostedemail.com (Postfix) with ESMTP id 683871804B65A for ; Tue, 26 Jan 2021 04:45:40 +0000 (UTC) X-HE-Tag: bikes24_18083572758b X-Filterd-Recvd-Size: 6413 Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) by imf48.hostedemail.com (Postfix) with ESMTP for ; Tue, 26 Jan 2021 04:45:39 +0000 (UTC) Received: by mail-pl1-f171.google.com with SMTP id j21so4537780pls.7 for ; Mon, 25 Jan 2021 20:45:39 -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=5DEowptUwTfPDCMussMIbiVZhaeAlKFwS/BCdRa1CbQ=; b=XJK7tG9SvtTGxWs3TOVQ6fHZwRaw5VyqizXAmj67yIEfyHNbc3e9UCyfIF8qPyusjA rrC4odf7MiUP9VqOLP2v6acz5sT2GmevGHRV6OiP11IBbKReyvlt0KxzOEz9BkfACiLv nTWhm93X0gCoNhFUHbYf7axau6wnKMI82qDpU8OMNlK3zxM7YZ4XAnBBuWEWqKmv1fMH J7Ev+wzH5EuiNl17/i3hfjWd0OqOBOLn/TLm/xdsFYktFp6wfP2J1Qvd0/u7C3plfAdq 1hibv5GoG5/ajjgyjD9i0Q3inKGfesOBEL516Hoxs3sH0uZK9HoMF29D+5Vn7F6lIn8A SOWQ== 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=5DEowptUwTfPDCMussMIbiVZhaeAlKFwS/BCdRa1CbQ=; b=KPwfuvylUAuRH2EYiUeuSTKMjJg8adwTA9pXQJBi562mFdzWZPtG+HSmXwXg7fwFfv u48b0ehopfKFP6xl+So+JTjypSMhIlf9LmqJqOTczRgStgcJxBbwlao4vptiwi3RADqS C1f5vCNcDFplSKABpOSZAMvhGCw6pvMjhEnQuecPqVHkh5ZSTuL66Rah8WHRhKBVo1Tp /GDft8up5hV4heIk6Eo3iLCEPAgQsvDJpplrXnWUHuKb83OGOvPQvdKzw4rcRdQfVTH5 tSVpbhLQM6kzafCroYvD/dDTzUI+bweExALEwnjpH0xvGuoeVOy49CLcC5tJkLmlpLV8 6vZQ== X-Gm-Message-State: AOAM531t4hoO4P2lEsDrKnpr3zsxWmslu0PVPCGTUNgr/Me77Kf8qZH9 n+c0E4QIj2yScy4UAdZacDYlfuK0qPk= X-Google-Smtp-Source: ABdhPJyUK0q6PQk//45Rqh+tNd1BCuCVLTelVDJer0Preys832RKide+3fnd1LhVRvhDXW9RWBXjew== X-Received: by 2002:a17:90a:77ca:: with SMTP id e10mr4080733pjs.53.1611636338859; Mon, 25 Jan 2021 20:45:38 -0800 (PST) Received: from bobo.ozlabs.ibm.com (192.156.221.203.dial.dynamic.acc50-nort-cbr.comindico.com.au. [203.221.156.192]) by smtp.gmail.com with ESMTPSA id 68sm19272293pfg.90.2021.01.25.20.45.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Jan 2021 20:45:38 -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, Jonathan Cameron , Christoph Hellwig , Christophe Leroy , Rick Edgecombe , Ding Tianhong , Christoph Hellwig Subject: [PATCH v11 03/13] mm/vmalloc: rename vmap_*_range vmap_pages_*_range Date: Tue, 26 Jan 2021 14:45:00 +1000 Message-Id: <20210126044510.2491820-4-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20210126044510.2491820-1-npiggin@gmail.com> References: <20210126044510.2491820-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. Reviewed-by: Christoph Hellwig Signed-off-by: Nicholas Piggin Reviewed-by: Miaohe Lin --- 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);