From patchwork Fri Aug 21 04:44:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11728113 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 29BF5722 for ; Fri, 21 Aug 2020 04:44:53 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E1F65208E4 for ; Fri, 21 Aug 2020 04:44:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="cfi4mDOu" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E1F65208E4 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 0A9BA8D0015; Fri, 21 Aug 2020 00:44:52 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 032128D0005; Fri, 21 Aug 2020 00:44:51 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E644A8D0015; Fri, 21 Aug 2020 00:44:51 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0019.hostedemail.com [216.40.44.19]) by kanga.kvack.org (Postfix) with ESMTP id CDE688D0005 for ; Fri, 21 Aug 2020 00:44:51 -0400 (EDT) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 8E7802493 for ; Fri, 21 Aug 2020 04:44:51 +0000 (UTC) X-FDA: 77173335582.30.toe68_17029dd27036 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin30.hostedemail.com (Postfix) with ESMTP id 6171E180B3AA7 for ; Fri, 21 Aug 2020 04:44:51 +0000 (UTC) X-Spam-Summary: 1,0,0,a38618af589dd5d8,d41d8cd98f00b204,npiggin@gmail.com,,RULES_HIT:41:69:355:379:541:800:960:973:988:989:1260:1311:1314:1345:1359:1437:1515:1535:1543:1711:1730:1747:1777:1792:2393:2559:2562:3138:3139:3140:3141:3142:3355:3865:3867:3872:4117:4321:5007:6261:6653:7514:8603:9413:10004:11026:11473:11658:11914:12043:12297:12438:12517:12519:12555:12895:12986:13161:13229:13894:14096:14181:14394:14687:14721:21080:21444:21451:21627:21666:21990:30003:30054,0,RBL:209.85.216.67:@gmail.com:.lbl8.mailshell.net-62.50.0.100 66.100.201.100;04yfkngsbf8h5aqanognrsw4obo9bypm7h3jcjuakakfct3okjhqtqdb3qdxepp.cdos6t96pq8egchuruwbnqq8qf15tnqupi97ffyegf4mpp4rhoeu9bc6e3cxk35.e-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:23,LUA_SUMMARY:none X-HE-Tag: toe68_17029dd27036 X-Filterd-Recvd-Size: 6634 Received: from mail-pj1-f67.google.com (mail-pj1-f67.google.com [209.85.216.67]) by imf01.hostedemail.com (Postfix) with ESMTP for ; Fri, 21 Aug 2020 04:44:50 +0000 (UTC) Received: by mail-pj1-f67.google.com with SMTP id q93so412674pjq.0 for ; Thu, 20 Aug 2020 21:44:50 -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=cfi4mDOu03twyolblqmsiXSKLkWdrtP6DA32thuCHNC6mXen19Y+kwOWy25uSRuyAd Qa0bgRVU3+eP/5sefkTIIsZIeICp6AU1QK0DB6FIFGeK5xh2hEnGZU+nYr/VrW2rOUfc tV5MSHrfgtsv9vIlRDYAj4TdoEsWMfrh9gSbUHA0xIpWXvKqPDXaYOHOJj2GR400bxdp yTbeKz7R+/C0ewTgjav45Loptie3gcboNCy1eomfzJUs8waTkOxkU17vfX8XSv0uSzcC rNi2y4c5u7tA/ioI4pvh9ypWxzu1bFTMZ/o1CyfCiOAs420mJoSXUtb6Zc3TecHWn8CH sSgA== 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=kMxxGNbnnlJ/wVO58/8QnJg7lyT205g9i168Q7mrNt/RLBc2Vuh1yW+19TnetG3/bP aOzXK8XPvePDmB0mSzEQXfu63UYAq7m+lcgcoNHH7C6FxBmIlRa9MMIMH1rpeBrNm1Ly Ya/nQ7iCCcR6II70s/I+yZnabAn5+DT9OqDllWo5a+CZBv6HUWqvgYALGgyV7kAxRgY0 4TEJJkYPLS+FuquIUmsHHpZhYiKCitKHOnLsiGqEUGd9w/VKYO3vq3St3mU0X43IEB4w 1WXcbZ7Cmv6qDzYzT2RCjHcAJSBvMcBPMXA1PbDKFtsBzVO2qT2Lk4Dg8m9oy2rTWBxU 2iyA== X-Gm-Message-State: AOAM53381llRSAkYpLn9jgtdOIvtpOER8k0JNy1ELBzFkErO7/JCWbJ2 GBl+XRgROZ4sLFIWwbdgwxmJVbG/n/M= X-Google-Smtp-Source: ABdhPJxPggI04ETKTB3DdnitxxNiKgH+fgh1eKljj6tsD8xS6vufzUeeuZNnWtOgyMzr1fIMfPln9g== X-Received: by 2002:a17:902:8491:: with SMTP id c17mr942848plo.93.1597985089799; Thu, 20 Aug 2020 21:44:49 -0700 (PDT) Received: from bobo.ibm.com (61-68-212-105.tpgi.com.au. [61.68.212.105]) by smtp.gmail.com with ESMTPSA id l9sm683374pgg.29.2020.08.20.21.44.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Aug 2020 21:44:49 -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, linuxppc-dev@lists.ozlabs.org, Zefan Li , Jonathan Cameron Subject: [PATCH v5 3/8] mm/vmalloc: rename vmap_*_range vmap_pages_*_range Date: Fri, 21 Aug 2020 14:44:22 +1000 Message-Id: <20200821044427.736424-4-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200821044427.736424-1-npiggin@gmail.com> References: <20200821044427.736424-1-npiggin@gmail.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: 6171E180B3AA7 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam02 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 | 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);