Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp6777353rwr; Tue, 9 May 2023 22:09:17 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5txpqXRZPhQvluC2EGri8AMRqSJj+t78nHqoWhbVIsRAwEiYpE+si0MGahfXjQqcOVO/W6 X-Received: by 2002:a17:902:eacb:b0:1a5:4ff:33c0 with SMTP id p11-20020a170902eacb00b001a504ff33c0mr16290545pld.12.1683695357361; Tue, 09 May 2023 22:09:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683695357; cv=none; d=google.com; s=arc-20160816; b=akdiORR1ONxGXj6NxfUDUwuqgPtTXlXFa8zzw3eEykSaHtVsxaGXw3l2tNnHLKCTAZ UYjI7cwZgb6U5yU0sYk7ZUkFM6dcN0dcxeMJVTpEER4c/aDfugIWV6lPeL1FaDEAAkEv wDggQq1XHCiLsrr25OZjEBytVlLWDSqrxZwcnf7QGO+Q63KxxLoZctNtgP027UvSID5s wy4Yx25zuVy+tk+MoDjh5SBHQmhXG8L4apSJxBFU11crPujyo9A6K2vRey/7ZXbcLrEM 8V1bFVLgrYITItdxkx7w6SxJacxe9TjeuAv0OnZWVNCne3PHMM8QdTu4Z/uGHs00XgaA d5KQ== 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=LRrENG7fj4nSEA3qiqmp7KZ6RwcG7U0j5SldGyBNlNI=; b=QogZkSDI6C6g53/LHGmlejDM8uMe5Ulx08xAF5qndMxHab7aHH4GDk/F1YcfPyoqHC 1BYZZINgrB9hPt+cl7KpNha0m5V9aSkb81tiX7gqVUhyy+JQe6Y3nVMPTPBeb7XHfApe 0DxZTjUUxiLx6H3kM3joxIN7IQZ0MzHPras5ZF7i9Uy5lKQzhfotR16F44cuONssBOOk 8XwcpOYAu2gyfuaD5RZ47u1vmPVhcCbkCUvLSpodzT+0zX3k4RH07UYHkFLW1+UY+Ijy 8p0ALT/J/nGIO9BwxUSkI0ALRAoyntrDhenJyFPyNJda+fqz/s1hikAfUic72jJ1N46U pcnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=QuBkLiQN; 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 f11-20020a170902ab8b00b001ab1a00d95dsi3017115plr.250.2023.05.09.22.09.05; Tue, 09 May 2023 22:09:17 -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=QuBkLiQN; 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 S230035AbjEJFFE (ORCPT + 99 others); Wed, 10 May 2023 01:05:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57058 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235820AbjEJFEx (ORCPT ); Wed, 10 May 2023 01:04:53 -0400 Received: from mail-yw1-x1132.google.com (mail-yw1-x1132.google.com [IPv6:2607:f8b0:4864:20::1132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3BCBE1BFE for ; Tue, 9 May 2023 22:04:51 -0700 (PDT) Received: by mail-yw1-x1132.google.com with SMTP id 00721157ae682-55a214572e8so104475847b3.0 for ; Tue, 09 May 2023 22:04:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1683695090; x=1686287090; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:from:to:cc:subject:date:message-id:reply-to; bh=LRrENG7fj4nSEA3qiqmp7KZ6RwcG7U0j5SldGyBNlNI=; b=QuBkLiQNgKJXlZ/XtUu/Zcc1TO/yNvtmxeCEZWPuo0Ut+/Dr2uj7N/fYaVeLSLWaoT dm0LsrTZl+fdsuIU70XZlX8Jdat219pOrdD5tmXxlOJq6I9xvJ8OBX2I3sC2/GzC7pIG XUtWl6K8CddosokWCD5JWnq8C0Qt/Y0GNquPBcUW8sOkTJGqV76KRSYlIi1jOPSqgjjT xhQu7yGeLyA8b6NgZMivw3GAn6e1+z3lgr3LgyDkQncSxt5H12sTmgDyT6BBdhQ0rxwG mDoCtTBYmNMU6XzQs1MJn/66oGLzS3WRb3BIObV6fJVnQHGlEpGSXCP7I8vkrI+sg4mt TgtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683695090; x=1686287090; 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=LRrENG7fj4nSEA3qiqmp7KZ6RwcG7U0j5SldGyBNlNI=; b=HdWxkAwxg8iSHFlgCU+K/MUirp/cdACELI+Nh4JcRaGhpjWUhyqs3Plwlo21h3fL4Z +VfLyccWtlRzCmmnvLmt/re4c/uJARLafp+5U1AFC2nd0/OZ5A9qIubYX6MfWXA0zhig kdM50FUIC2QTRTs1ugFGAD4sttYAMjmGUriQdE+VIp39IEiRHeSDNiVA+lE8nc3U2f2w GwBPzC69SUNB5s89AD3uNM0IGy2DcF5pRmgGw+ZYk37fmPOm5LRyxMGI8cfb6FnpT35z JItQRdld7l1vbo/kgRXwhAqau4oByEvDrupTUpRESdccLA4hu2xyu1+sFWsUosf3ocAV VqbQ== X-Gm-Message-State: AC+VfDxJXkkXWcwPeaqKnrcJSK0LluXOTDSwLS849Gn1aKT4QLeh+EkS YtAlyFWVeF0tHodK5T0q5Zelfw== X-Received: by 2002:a81:488c:0:b0:55a:6769:1197 with SMTP id v134-20020a81488c000000b0055a67691197mr18307004ywa.41.1683695090358; Tue, 09 May 2023 22:04:50 -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 z184-20020a8189c1000000b00560beb1c97bsm948270ywf.97.2023.05.09.22.04.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 May 2023 22:04:50 -0700 (PDT) Date: Tue, 9 May 2023 22:04:46 -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 18/23] sparc/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 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/sparc/mm/hugetlbpage.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/sparc/mm/hugetlbpage.c b/arch/sparc/mm/hugetlbpage.c index d8e0e3c7038d..d7018823206c 100644 --- a/arch/sparc/mm/hugetlbpage.c +++ b/arch/sparc/mm/hugetlbpage.c @@ -298,7 +298,7 @@ pte_t *huge_pte_alloc(struct mm_struct *mm, struct vm_area_struct *vma, return NULL; if (sz >= PMD_SIZE) return (pte_t *)pmd; - return pte_alloc_map(mm, pmd, addr); + return pte_alloc_huge(mm, pmd, addr); } pte_t *huge_pte_offset(struct mm_struct *mm, @@ -325,7 +325,7 @@ pte_t *huge_pte_offset(struct mm_struct *mm, return NULL; if (is_hugetlb_pmd(*pmd)) return (pte_t *)pmd; - return pte_offset_map(pmd, addr); + return pte_offset_huge(pmd, addr); } void set_huge_pte_at(struct mm_struct *mm, unsigned long addr, -- 2.35.3