From patchwork Thu Jun 8 19:14:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hugh Dickins X-Patchwork-Id: 105100 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp494040vqr; Thu, 8 Jun 2023 12:24:38 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ58859BfIZGFhRGwWKQVnvphEtYuYPVd1KYewjMOeDhidKQ9sKpY3FXKvbkgKvHWaJDLGrU X-Received: by 2002:a17:902:b701:b0:1b0:499f:7a8d with SMTP id d1-20020a170902b70100b001b0499f7a8dmr4749697pls.9.1686252278345; Thu, 08 Jun 2023 12:24:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686252278; cv=none; d=google.com; s=arc-20160816; b=vexBGxWvKMOaIYYC3qze4qm4r7y0kAXkQwQEL3fKKDUXT64NGsvedhzkhwOsGchPze 3BOe5G2xnlnTFhzrNbMuWGYI/IIo0IH/ZS2+8XeH82leEH8YGJ62Ipwsixa7g/yHm6a5 vwn5CJ/qVOylsQqYIWjCZ2LZq5+5H58FhqFOHIe1sLNm2Ye4C1loJ2E0Lq9+NXreCUDb Gn5N2lFkqzJKg8PoNIYoLOvi0iQFQjqZMvYEAiVRG834RFqB9ToAljPBTEXriARYftUx NJahZp7ruHdd3amEqv2MaUYuIakCy8Z3/LJQB0fJaTGbGmkRLTGrtcNIcpakw39uiUFL hwOA== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j5-20020a17090a734500b002564edc1320si1470942pjs.51.2023.06.08.12.24.25; Thu, 08 Jun 2023 12:24:38 -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 S235269AbjFHTQv (ORCPT + 99 others); Thu, 8 Jun 2023 15:16:51 -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 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?1768163669075170558?= X-GMAIL-MSGID: =?utf-8?q?1768163669075170558?= 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); } } }