Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1130726rwd; Thu, 8 Jun 2023 12:38:11 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4Z9OVa4PsXhm2Ck1OxiztOI+NKP6vVpiQ1wSgWL1Qbmxcu5MjiaIknI1iP2IIocFCeQmbe X-Received: by 2002:a05:6a20:a108:b0:111:1bd6:2723 with SMTP id q8-20020a056a20a10800b001111bd62723mr8842698pzk.3.1686253091173; Thu, 08 Jun 2023 12:38:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686253091; cv=none; d=google.com; s=arc-20160816; b=fUIBlgdz351IsNZpGUASgG6JV4wVI1sMsG5vOjzH4nJhIXHdZiFwJEGfwlMgEJfA3U 27FVJc4yALcPh6O+73bUf7VyvhPqIxEzRBIRlWAG+/DDCdGWeK9BctLSdaWUTHWH0dQ3 2Mz3bSUjI3JRkAuU9upDv2RJG/rzuEI2Ca+z6AU149d3gE6MC+V6WExyNASWyBkRn+FL ZYmH05gWGSokS8/vxStXEG37/yMezd5Mbj50Q/0GQg5hjDyvTU2ayXQ4ObmXYR2NuZqb rTGcSQAiJY/xQS3nfnLvBhcxU+nRL/juOOq9AH/fr0Du913xsrtbam2WD5kW9vYhzKeT 1xMA== 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=mCwP+3tlZqvvMSbN25I242CI8N2o4w3/6RVIlVlj13g=; b=na7gGtVBd8MRHgcUfTN1SCar6ToANLp++QKM81bpVTuzhltBhhFeWCieiH2F/hkP4c kKDc3yu06/e8ANlO0i+q4/xItMmU0U0jv1LlIc3aX/frTUTkITi78O6uDGcBpp8zhsM3 6IUri4gOl4yOii5asCgntGkbFz+jqRc8iTPar9Qa6vbErG/xKpx6FnsIBcZoh5Btnlqo bUAR1LJWkcvejE91d046IYPXzf9Upb7y8UqpJ/NgdeAasD64sGFhYS5DTk7+zDp0fyif go8HZolgq8eLj91BxW5G0qcMEAhMgcUTy7EjOuohM0gVMC2noZQK7peT+jkGVSQnAbwe 5ThQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=Z+1ROWx9; 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 t13-20020a654b8d000000b00543d32f92ecsi1357074pgq.472.2023.06.08.12.37.58; Thu, 08 Jun 2023 12:38:11 -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=Z+1ROWx9; 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 S234398AbjFHTac (ORCPT + 99 others); Thu, 8 Jun 2023 15:30:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45438 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235589AbjFHTa2 (ORCPT ); Thu, 8 Jun 2023 15:30:28 -0400 Received: from mail-il1-x130.google.com (mail-il1-x130.google.com [IPv6:2607:f8b0:4864:20::130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF9312134 for ; Thu, 8 Jun 2023 12:30:19 -0700 (PDT) Received: by mail-il1-x130.google.com with SMTP id e9e14a558f8ab-33b04c8f3eeso4381495ab.0 for ; Thu, 08 Jun 2023 12:30:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1686252619; x=1688844619; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:from:to:cc:subject:date:message-id:reply-to; bh=mCwP+3tlZqvvMSbN25I242CI8N2o4w3/6RVIlVlj13g=; b=Z+1ROWx9LnxdX5nt3Yo9Gw9A1LjKJHFc2WtgcRAYaFIpj6m1+MueknjL2tetH/Yt/E Jkma5NMQVv2CGzmJBnvKYmHLILgxFTZBZe29Vg5F330+u2fSbBPVEtX3NRx2YFJBGUmp kCJjjc7KvjHhyEDucY5j+/eHT1OpuVlzl/VgAMVyKWRQ9P9ksfEE7oKQrQHB2ZVzogis AlGkparAM9e3I8OX/wc+UGRKJ9WTDNWGaUDF7YaTiCVpSxpo1NNn2hyrTeXSAmMOPutQ TUN3B1UmJFKBBqlJCwM8cMmQBeV6xJ4ogL/1WbFBc8kxJTJPQLfJ0hWbM0sLcNxIcm/D dTzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686252619; x=1688844619; 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=mCwP+3tlZqvvMSbN25I242CI8N2o4w3/6RVIlVlj13g=; b=HOM2GwKIR67WYuX8Vnyx9M97cqzy+DLF/lehMWxTlMG6vRJLbyGM+isz6mngd/lG74 4aeTewjkJ1LAt+z5nBVCWsUm0033HsWl2ugHlYFgfEJhltf/EP/+g2aQDzzzyn2d/Qhv AVWNtz0NuVaEGsy69/s33Og7MampQaZsjd/5VP6hVUF8RlfhnwR0zfn9NdU+Yr8aMKZb 29jfU8ma7sE3sH5odE0OGN6Aje5AM3tjc/Wb4XYsRw9rhlpYq84KB8piRl9kubXrS8Mw 8dO55eFj0E8w7bQGgFOqEV0vuuiGUx/m46aDPCSQxS3KYp21mXbM9OEkFAwTAZ8QE/pz IQSA== X-Gm-Message-State: AC+VfDwuRIV4q0SYiDOiUkRWFYpZZe4cp92MUg+JlkBWtSxSpcsYpcYa P7m8GhFqz4Ny/HLSsDCdahMnWQ== X-Received: by 2002:a92:d34a:0:b0:33b:820:41ad with SMTP id a10-20020a92d34a000000b0033b082041admr8096921ilh.9.1686252619199; Thu, 08 Jun 2023 12:30:19 -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 h184-20020a256cc1000000b00bad07875d9bsm450282ybc.11.2023.06.08.12.30.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jun 2023 12:30:18 -0700 (PDT) Date: Thu, 8 Jun 2023 12:30:14 -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 17/23] sh/hugetlb: pte_alloc_huge() pte_offset_huge() In-Reply-To: Message-ID: 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/sh/mm/hugetlbpage.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/sh/mm/hugetlbpage.c b/arch/sh/mm/hugetlbpage.c index 999ab5916e69..6cb0ad73dbb9 100644 --- a/arch/sh/mm/hugetlbpage.c +++ b/arch/sh/mm/hugetlbpage.c @@ -38,7 +38,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); } } } @@ -63,7 +63,7 @@ pte_t *huge_pte_offset(struct mm_struct *mm, if (pud) { pmd = pmd_offset(pud, addr); if (pmd) - pte = pte_offset_map(pmd, addr); + pte = pte_offset_huge(pmd, addr); } } } -- 2.35.3