From patchwork Wed May 10 04:47:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hugh Dickins X-Patchwork-Id: 91852 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp3364893vqo; Tue, 9 May 2023 21:53:10 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4cFFpwCVC3GVC3fu1DGhuOEqAj20i5zqcXtCv44dUOK6CL/cioXvHbf2xnthX0v5t921FK X-Received: by 2002:a05:6a20:1587:b0:100:af1c:f6b4 with SMTP id h7-20020a056a20158700b00100af1cf6b4mr11350051pzj.41.1683694389677; Tue, 09 May 2023 21:53:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683694389; cv=none; d=google.com; s=arc-20160816; b=fDes8OEfx9wOYARFDQBme1yX0dnVOYw5WM2AnAIc1Pdoa3ckYTuwTlu2suSq8W+hIX O6EdDj2SxWMKF6tB4bT0nRhdJ6+6djIOkTOs6vKo5SKEOtyu9od1R0KAMbxsDZKmpr0h XVn/JkGddHPK2xh+AONnLIpNZMBvxgosTEMKAOsFjUgJbHlRyzYPxewwlPRcN5v9vwmU N+6cYOBpIcUp7C+hIpyNQfl+Q3IYCsrt385Wvhz+cpWLEiz6MHrgeV8Nh3H3Jhewq3Az rKMJFQ08t1KcrJQAuJv6mHcKCGNSanyWFZKAvLdvjsqsM4IpTsgVAwPsfZc8k0ehumYA jo/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:message-id:in-reply-to :subject:cc:to:from:date:dkim-signature; bh=hqbvyW6crf6toTfKG311uSxHzLZVjYgM3m9zpPIhyDA=; b=KfDsMIBirhBzDXZDOxHtx565XrTOoIsl53YvzvpcvBntm58IXJgtxQAV0QRMlLOBH+ RUP7eLvsHT3RjfGV9KGg4W/oNIPhf6XlSXmnPXpuRvZltONObiHY89uXe+EsdWlQDYKo cZKJdOxqCOnHCghtSH20/sJGJ/eHCdAFtDZE4r75Az+qLsWfa50gGtfDeyF9xGR+6EdR 2+AtqLHlvtSDLiNXH+J7ZuNGvBUqjFrxodFWR2+LyZBPuQMPhjGjyCD5gCIdC2kUz+gF gJ+Hp8qDk7m9Ikd9HA++ewGnauI39cofxpYqomM3/6inVUlibvFlUWmpSXsnL/+F1rKM dnkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b="o+pw/Fxe"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x190-20020a6386c7000000b005303a78b41asi3196573pgd.75.2023.05.09.21.52.57; Tue, 09 May 2023 21:53:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b="o+pw/Fxe"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232299AbjEJEr1 (ORCPT + 99 others); Wed, 10 May 2023 00:47:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46378 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235093AbjEJErT (ORCPT ); Wed, 10 May 2023 00:47:19 -0400 Received: from mail-yb1-xb35.google.com (mail-yb1-xb35.google.com [IPv6:2607:f8b0:4864:20::b35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1F2940CE for ; Tue, 9 May 2023 21:47:16 -0700 (PDT) Received: by mail-yb1-xb35.google.com with SMTP id 3f1490d57ef6-b9a7e639656so10168422276.0 for ; Tue, 09 May 2023 21:47:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1683694036; x=1686286036; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:from:to:cc:subject:date:message-id:reply-to; bh=hqbvyW6crf6toTfKG311uSxHzLZVjYgM3m9zpPIhyDA=; b=o+pw/FxefUIAOoasXSGcewgZKtzCiK6gey4asLS52yE6RcSKCLcg/5+Oke4t4tL5mt WY+uEeh7LusBVdVQVoeJLXBzhVEJAgg/+wrnr5YnLWD3Y+xgGcCb1JLs6JvP8/f0rR6I tOIJAEnPqeFziCHRIMxBgLXFbcRpC1yoUKiEwz+VxRsKMOaCzI+eqG6JH5jyJ802ZkSp N+BiAknrKD5ka0lvzxWcjKQzAZAWQASg3Zoa2F4mVxsPlzCTR7qCguvvguU/AtX+AHcL WDe1lJ7cP45MCFknO9sG2YoZVBoQ/kny4LfOudEYqHVSkK2nfJ78GhDEjEHbvmzj6Rt9 PQHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683694036; x=1686286036; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=hqbvyW6crf6toTfKG311uSxHzLZVjYgM3m9zpPIhyDA=; b=PvbMZx8fNUsbmu+m0cDLTBymGgjYjxc2Ivx4qq2JMFGbQWHsyGn4GEFajiiks0GrqZ Jzss23XmdSLSEXiU/pKCTF1De5vbo599Qxc/TOBYeBvodZn0y+XvEiV3KCGAUvnhg6Tq jNwZ/0zZlT4nj0MTNrzRGoaYPQ7ATTqXNfuf1xQzFdq7KltF+g9dwQhMCUa6yawSmzHI yNg7RuYuySeTcQJUB+HYDPWyJT+ejkWEQUV94L6qCAkLo4PukgfNVAEfYfQyffDza45k 6PGesLxF8KTVA4ncZgvAy2Rig47/6/GnzdByvgJecSI/uaIxC5oVKBm56z++FbPIF1Vp oMkw== X-Gm-Message-State: AC+VfDx3ad0d/+NeugEcERsjI64fZZ03gBq6xnGDGLxqyxcvhEwrAuml 7AUoREOoNLMfH0Ks4NLOkI2lVA== X-Received: by 2002:a05:6902:1883:b0:b9d:58d9:8c with SMTP id cj3-20020a056902188300b00b9d58d9008cmr22251628ybb.11.1683694035986; Tue, 09 May 2023 21:47:15 -0700 (PDT) Received: from ripple.attlocal.net (172-10-233-147.lightspeed.sntcca.sbcglobal.net. [172.10.233.147]) by smtp.gmail.com with ESMTPSA id 185-20020a2506c2000000b00b9dc4620f95sm3505720ybg.6.2023.05.09.21.47.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 May 2023 21:47:15 -0700 (PDT) Date: Tue, 9 May 2023 21:47:11 -0700 (PDT) From: Hugh Dickins X-X-Sender: hugh@ripple.attlocal.net To: Andrew Morton cc: Mike Kravetz , Mike Rapoport , "Kirill A. Shutemov" , Matthew Wilcox , David Hildenbrand , Suren Baghdasaryan , Qi Zheng , Russell King , Catalin Marinas , Will Deacon , Geert Uytterhoeven , Greg Ungerer , Michal Simek , Thomas Bogendoerfer , Helge Deller , John David Anglin , "Aneesh Kumar K.V" , Michael Ellerman , Alexandre Ghiti , Palmer Dabbelt , Heiko Carstens , Christian Borntraeger , Claudio Imbrenda , John Paul Adrian Glaubitz , "David S. Miller" , Chris Zankel , Max Filippov , x86@kernel.org, linux-arm-kernel@lists.infradead.org, linux-ia64@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH 04/23] ia64/hugetlb: pte_alloc_huge() pte_offset_huge() In-Reply-To: <77a5d8c-406b-7068-4f17-23b7ac53bc83@google.com> Message-ID: References: <77a5d8c-406b-7068-4f17-23b7ac53bc83@google.com> MIME-Version: 1.0 X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1765481528019970241?= X-GMAIL-MSGID: =?utf-8?q?1765481528019970241?= pte_alloc_map() expects to be followed by pte_unmap(), but hugetlb omits that: to keep balance in future, use the recently added pte_alloc_huge() instead; with pte_offset_huge() a better name for pte_offset_kernel(). Signed-off-by: Hugh Dickins --- arch/ia64/mm/hugetlbpage.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/ia64/mm/hugetlbpage.c b/arch/ia64/mm/hugetlbpage.c index 78a02e026164..adc49f2d22e8 100644 --- a/arch/ia64/mm/hugetlbpage.c +++ b/arch/ia64/mm/hugetlbpage.c @@ -41,7 +41,7 @@ huge_pte_alloc(struct mm_struct *mm, struct vm_area_struct *vma, if (pud) { pmd = pmd_alloc(mm, pud, taddr); if (pmd) - pte = pte_alloc_map(mm, pmd, taddr); + pte = pte_alloc_huge(mm, pmd, taddr); } return pte; } @@ -64,7 +64,7 @@ huge_pte_offset (struct mm_struct *mm, unsigned long addr, unsigned long sz) if (pud_present(*pud)) { pmd = pmd_offset(pud, taddr); if (pmd_present(*pmd)) - pte = pte_offset_map(pmd, taddr); + pte = pte_offset_huge(pmd, taddr); } } }