Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1117962rwd; Thu, 8 Jun 2023 12:23:23 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6+Yr5t9gaIt4NiHjxyFg9sielPeX+YnXiLhDk3JJ84v6Chvh7i7L/7jfcL49ErX7wavPeQ X-Received: by 2002:a05:6a21:3394:b0:ef:7aa2:3cfd with SMTP id yy20-20020a056a21339400b000ef7aa23cfdmr5139626pzb.50.1686252203065; Thu, 08 Jun 2023 12:23:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686252203; cv=none; d=google.com; s=arc-20160816; b=XJfYupC/1Dc4bfLLpzYzyFVzLwwHHajjU6XiSISIc8/nkfmQspVG5u/LzcK/RgJD9R sEzQplnZ50QvWNQaOOp8uVbCCwYsMgrWjhpDchxPnssMa2x1vOYM8npFWyxLnyhzFVok lSbFrka3e+055KVhhMZftbrZ8ddaLBig57czyr4igo4mJQxKO0yjD50ojikiNeHN+yIo 4Gx08nEYmRwP/qfNUAZiWe51daoU9wOpv+DoS0oF1tGI3v4u0y9dWKYAWSkdPV5ssFJZ q7xdI5ptY2FvaoyMSyp/ckn9TUL2t01AQ12U1VoEjkhALMZqkKQU64Lup/e9qdummbFU ohGA== 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=B4FIkrG2Fazd98TajOhy2CBvsw4DYuK/8Hk1Yo8+t3XQvrfUKCJ7pi7sl/bJ9MlTHb 0Q7q2+zgp8JITUor0WaC2drhi2/uVAu8s2/yLC8J7TQLJ0sYr4k8H/CYFnhSJXK4Ovd1 rQeVblna7n4SyYpiw7YE0eTm9Awp90bYF3wgd7xExjTBHmef1B60xwtk1WmKQcemsh/z yE1Aq2d2kDyBX8wyfeuWeCmizrcwScBfVUM7AkRvu0vpRnpnBxjK0Zmw2AMLsEBPtHO/ oznQJSXSQbXt6M6d9/yS6WsWE5GurKowfJ2vZ/uOstSY/BNeqH8DcbIAlEQPJuvelqv6 hFbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b="2n/XtD7A"; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b5-20020a63eb45000000b0054403507e7bsi1423471pgk.77.2023.06.08.12.23.10; Thu, 08 Jun 2023 12:23:23 -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="2n/XtD7A"; 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 S234009AbjFHTQu (ORCPT + 99 others); Thu, 8 Jun 2023 15:16:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34216 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232731AbjFHTQt (ORCPT ); Thu, 8 Jun 2023 15:16:49 -0400 Received: from mail-yb1-xb2e.google.com (mail-yb1-xb2e.google.com [IPv6:2607:f8b0:4864:20::b2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 545852733 for ; Thu, 8 Jun 2023 12:16:14 -0700 (PDT) Received: by mail-yb1-xb2e.google.com with SMTP id 3f1490d57ef6-ba81ded8d3eso1042812276.3 for ; Thu, 08 Jun 2023 12:16:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1686251670; x=1688843670; 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=2n/XtD7AqYzwMObmNTcTXdhdmtrivr6xS0a6hxh2028Gq3sNV9XO29gB5O2y3L9l/t L2rqH6x4Pz17FgKoR1Y4rQPo+pjlVHFvq4Uxf6V5Z1hVLY+dk3dbsKixOg2g0+O6MH3o wHR7UhzFBUpyNSTJP8nVTqWIyYA0el7GHtc3GU+0DrUYPDVBZCtJf3wyrCUqLLZR09lv VqBAJ8/LNlL6ViTV2apFi54AS+jw7a1Zjo/eBl1kmHqeluHIV3N/nqy10dITHeklJsgD IGKWlS4umLi9ypWs+T7OEHIYU3YkWJ3FbGyXJ6NMN9TADYksX23kqJlAINxQPvIJDTtX gwNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686251670; x=1688843670; 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=QF+TKxHOeWjnutrhEgwHahkOWAobUx0zXupdCu+ET4vh6hlOiihO8obiPDVpmHjQkx uT/QETLrIoEI/OA9ESdt7Zl3x8PCUfcHJohuQ0RWouJjUTSf0elTaUkIfYhzuK+J10aa leJkMNGXBPo2QaVsUjLBHE1DMAJQJU21ZNojAU9n354d5hFzoNKGuXZKIWe7VQEdD0uF dAR0IiSbMmhYEBFvMsg/rj4ehm0RNfhTSJIEEMX3zTmi18A4H3T779mW29s7DP0y/tAp 42jvbwDdnmPsX1EiBuiQTaU/ktvki3EXh8SBhyD1oNriy5/m7u2zDWNE6zQQy4B8qQAJ tUyg== X-Gm-Message-State: AC+VfDyBWVx9WOevYAzIG4nscaPchHHD2eFqBQzHG5/sRkuim+quCMnF LZE9+IitjniTJtmQVUc6CLCbsw== X-Received: by 2002:a25:e302:0:b0:bb1:5a06:70ed with SMTP id z2-20020a25e302000000b00bb15a0670edmr543635ybd.19.1686251670430; Thu, 08 Jun 2023 12:14:30 -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 e10-20020a25874a000000b00b9e5b28dbd8sm429689ybn.17.2023.06.08.12.14.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jun 2023 12:14:29 -0700 (PDT) Date: Thu, 8 Jun 2023 12:14:26 -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 , Peter Zijlstra , 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 , Alexander Gordeev , 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 v2 04/23] ia64/hugetlb: pte_alloc_huge() pte_offset_huge() In-Reply-To: Message-ID: <1c2c7837-bfea-9640-a74-985379fcc5a@google.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII 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 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); } } } -- 2.35.3