Message ID | da29d71e-111-65d5-eb7f-5ad97e406e70@google.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp3377399vqo; Tue, 9 May 2023 22:25:56 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7pBvyCC/QF92y6CXlhOsE0nWZIfLviwfH8zcrfVeIBCFjThJtV4eYs+XibnvmL7beYotJs X-Received: by 2002:a17:903:1c6:b0:1ac:946e:468e with SMTP id e6-20020a17090301c600b001ac946e468emr6125016plh.57.1683696355967; Tue, 09 May 2023 22:25:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683696355; cv=none; d=google.com; s=arc-20160816; b=I0Mt9ox08q5fAZbeUzePtYj4gwTQQN72EUQstpV6Vaz75hkUzTVSpsrOV//eoCxKJy ZgXM+U1D7Gv23z/U3qnTH8WgfN+19+X1lbJnZcawRvHvpH4T9PIiIVxLar7jEAbW8vsY P2x/d6PNmdVp/dR1DPR2j94Hjh4V4/7pTAxa1wYWtLnW1p+tl1aVFX2IcXcNxKwz647G wZmll/5rbTTzbzozeWlJhZyv7V28pRLwi+Jlr/6cBZ8VZGqbyZlaOVul9FdBKffXWfMI Cov0M35IhfhLR6gUKsyWuG8y+1+AXFBevnpnETHYJ5Byb7+6BMhV3m0Km41C2advpI2v wtyA== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n18-20020a170902d2d200b001a1e4051da5si3607105plc.498.2023.05.09.22.25.42; Tue, 09 May 2023 22:25:55 -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 S235795AbjEJFFE (ORCPT <rfc822;baris.duru.linux@gmail.com> + 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 <rfc822;linux-kernel@vger.kernel.org>); 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 <linux-kernel@vger.kernel.org>; Tue, 9 May 2023 22:04:51 -0700 (PDT) Received: by mail-yw1-x1132.google.com with SMTP id 00721157ae682-55a214572e8so104475847b3.0 for <linux-kernel@vger.kernel.org>; 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 <hughd@google.com> X-X-Sender: hugh@ripple.attlocal.net To: Andrew Morton <akpm@linux-foundation.org> cc: Mike Kravetz <mike.kravetz@oracle.com>, Mike Rapoport <rppt@kernel.org>, "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>, Matthew Wilcox <willy@infradead.org>, David Hildenbrand <david@redhat.com>, Suren Baghdasaryan <surenb@google.com>, Qi Zheng <zhengqi.arch@bytedance.com>, Russell King <linux@armlinux.org.uk>, Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will@kernel.org>, Geert Uytterhoeven <geert@linux-m68k.org>, Greg Ungerer <gerg@linux-m68k.org>, Michal Simek <monstr@monstr.eu>, Thomas Bogendoerfer <tsbogend@alpha.franken.de>, Helge Deller <deller@gmx.de>, John David Anglin <dave.anglin@bell.net>, "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>, Michael Ellerman <mpe@ellerman.id.au>, Alexandre Ghiti <alexghiti@rivosinc.com>, Palmer Dabbelt <palmer@dabbelt.com>, Heiko Carstens <hca@linux.ibm.com>, Christian Borntraeger <borntraeger@linux.ibm.com>, Claudio Imbrenda <imbrenda@linux.ibm.com>, John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>, "David S. Miller" <davem@davemloft.net>, Chris Zankel <chris@zankel.net>, Max Filippov <jcmvbkbc@gmail.com>, 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: <da29d71e-111-65d5-eb7f-5ad97e406e70@google.com> 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1765483590474748585?= X-GMAIL-MSGID: =?utf-8?q?1765483590474748585?= |
Series |
arch: allow pte_offset_map[_lock]() to fail
|
|
Commit Message
Hugh Dickins
May 10, 2023, 5:04 a.m. UTC
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 <hughd@google.com>
---
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,