From patchwork Thu Jun 8 19:21:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hugh Dickins X-Patchwork-Id: 105119 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp506389vqr; Thu, 8 Jun 2023 12:53:15 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4RqLD5xw7Z3qZYo+kjbe7W7hXPGqy7gx5bDu6+LvXA3/7pr1zB3ozLx5l8tyDI6ahgzjBa X-Received: by 2002:a17:90a:e645:b0:258:8731:4e3f with SMTP id ep5-20020a17090ae64500b0025887314e3fmr5073207pjb.44.1686253994557; Thu, 08 Jun 2023 12:53:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686253994; cv=none; d=google.com; s=arc-20160816; b=gIuYZytYO0Zpcln+QzEb9oaEMOIa8mboEz4ilHqQRerVmlznchwlvzw9XbhO0H/3Bx X3uSdOVHkgcTz6z+LTWRSK28H0PlgBgNMwAXGMwPqeAIoZriV3ett05Db4LnBLqFij0R EOMxtIPTC6NI7M5gN5F3a5obpKzP6mOnJmmVwH4uzn16R+vihLwMaByInlMPf1C5tGJG pHTriZWDywrd9sZuSOHEOhz4n8udyvAmS9J9B7CV7dZ8ci5N0XLwaB+itmxCAUo18abL bcRAAN9ASjRUEAgP+WMuyRs/7vEkveX59u6E61Tn5VVOf3JwchTZVdXKUGduoFhTDjAT IBOA== 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=alKFmwAdxdkIViw1WjkjX/OCKeQtR2IpGs2zcY6rd0M=; b=hY+oJXGAOCqFB/7xS7JFtkO/ujJZXVZMCz2BusV2vV3qDaRxPhMkyKwAStsOZabBXn s0kTHdSYFolwdbFuiNpZO3thsjL68Qg8nHg7Nls/Zv5rsfHAqh+VsPzl7cj0XXjSk12A Mi6JwLkOuXe7A+7R5azGi0Rr8PQqQTNdBCWvUOl8N1r3VyqV6SeKfycARC8NM3/p9gor CclA3zGoZQhHzMwkBMsjhYYeXMldePWVuvrMmG1PhFC9Kx4NhTFRsYHn8tMS9UoHDacj zwBFARx+AD0kM9Gyl/eSQ4DY3AnekYHJW0nbhUfOtMv6jQaeKC9pq4Ynf1gfJz0VIjYF g6BA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=HKd31Lqv; 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 125-20020a630083000000b0050bea5bf413si1468805pga.705.2023.06.08.12.53.00; Thu, 08 Jun 2023 12:53:14 -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=HKd31Lqv; 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 S236828AbjFHTVz (ORCPT + 99 others); Thu, 8 Jun 2023 15:21:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235928AbjFHTVw (ORCPT ); Thu, 8 Jun 2023 15:21:52 -0400 Received: from mail-yw1-x1136.google.com (mail-yw1-x1136.google.com [IPv6:2607:f8b0:4864:20::1136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 604D930C4 for ; Thu, 8 Jun 2023 12:21:18 -0700 (PDT) Received: by mail-yw1-x1136.google.com with SMTP id 00721157ae682-565cd2fc9acso9199057b3.0 for ; Thu, 08 Jun 2023 12:21:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1686252072; x=1688844072; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:from:to:cc:subject:date:message-id:reply-to; bh=alKFmwAdxdkIViw1WjkjX/OCKeQtR2IpGs2zcY6rd0M=; b=HKd31LqvAwT3pdB9H8RTJjakAJAT9HvglTvKC+OkvKmv5VhsoaZHAtLpo2tFkCpDhK eaJn1uAawotb3pLd5xLGg7DzD6kDQrKAHxas7kU/r2KN0gO+8LwEgaLotjlfcSI+ExXP OsTJ1O2tfGB1hyPd2BGfO1Hv0XjmUpnPR5LgmonoIasqGq2fAG/aN3V/iTrXbCwGdrUM I50yE5ZJKvbdrlam2CeJEmfXKvbJkG9Wl49W11ZHf6B9xR5DJRVBfUy3eWMAtZhLeFU3 MFev89ALFBnRCYsOlrl0s+V0pK/HvUPQhOTjtpCkmArqzAHuVaF4G3AF2HiTPrlcql5n hmyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686252072; x=1688844072; 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=alKFmwAdxdkIViw1WjkjX/OCKeQtR2IpGs2zcY6rd0M=; b=mBi/91iAv6hG8C1SnzgCzqkgUHCIw53Usi8wBiAygpVzV0IQys+3YrzBDtrP8iOB0k eiTWtJqPYgAJrY7KN8jmp6gk4ir4wMIT02rDyjjHFd8w8zHPxuRFHOmBI1youSotgm04 /9SbfqPirPQI0xbJ52RVxu+YQ2eQwClatv1rxp9ifXz9zDfPObVxfdkNdCJBB7c2ykjc 6bhXqnYgFTCN35moj4AbjkBOF1+NjADk+VPoe3RHEOvzi83ptpS60/a1+BoiXXBG4TgR r0ySbsJ2HTweNDBV1LgnHCfyjQYFOB4gEaw5lglWDp2f4Z83RVdQfkgsn4mCHjN82KC3 kSsA== X-Gm-Message-State: AC+VfDzwnNay7q6syx+NO1VRrrp/TqFgfwMvAun2oMTjN2q0JIMe5X90 HB/dLwV0pAmlW9veUDgNLA7wAw== X-Received: by 2002:a0d:d98f:0:b0:565:ba4b:aa81 with SMTP id b137-20020a0dd98f000000b00565ba4baa81mr612161ywe.45.1686252072277; Thu, 08 Jun 2023 12:21:12 -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 f184-20020a0ddcc1000000b00552ccda9bb3sm108635ywe.92.2023.06.08.12.21.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jun 2023 12:21:11 -0700 (PDT) Date: Thu, 8 Jun 2023 12:21:07 -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 10/23] parisc/hugetlb: pte_alloc_huge() pte_offset_huge() In-Reply-To: Message-ID: <7963aeed-f7d2-e0-f3c6-3680c5572444@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?1768165469047471514?= X-GMAIL-MSGID: =?utf-8?q?1768165469047471514?= 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/parisc/mm/hugetlbpage.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/parisc/mm/hugetlbpage.c b/arch/parisc/mm/hugetlbpage.c index d1d3990b83f6..a8a1a7c1e16e 100644 --- a/arch/parisc/mm/hugetlbpage.c +++ b/arch/parisc/mm/hugetlbpage.c @@ -66,7 +66,7 @@ pte_t *huge_pte_alloc(struct mm_struct *mm, struct vm_area_struct *vma, if (pud) { pmd = pmd_alloc(mm, pud, addr); if (pmd) - pte = pte_alloc_map(mm, pmd, addr); + pte = pte_alloc_huge(mm, pmd, addr); } return pte; } @@ -90,7 +90,7 @@ pte_t *huge_pte_offset(struct mm_struct *mm, if (!pud_none(*pud)) { pmd = pmd_offset(pud, addr); if (!pmd_none(*pmd)) - pte = pte_offset_map(pmd, addr); + pte = pte_offset_huge(pmd, addr); } } }