Message ID | 36b4e5d-954b-8569-4fe2-bd1797362441@google.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp500517vqr; Thu, 8 Jun 2023 12:38:40 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5nfLLGvzNM1PllrRnI6HfQWgNO7oMlh9hgvvS3z8dMXLN+qkqB0j9oR2VpvC8SOg6EQYaW X-Received: by 2002:a17:90b:e93:b0:255:6c5b:3660 with SMTP id fv19-20020a17090b0e9300b002556c5b3660mr4549058pjb.20.1686253120620; Thu, 08 Jun 2023 12:38:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686253120; cv=none; d=google.com; s=arc-20160816; b=GNYSO7VuSz6GEhqNi0IuffQ38paiXIDfYgQIHdxSlMzeGluOXtXczfUsBcPW5Gi0NV X+goyDHvZXawkSAAwujcIFbZsOXLE2sJq2G4RMi3Yg7jwD6DkwRBFIEvbMOV/Zf0vKxD 16Pvbfo2A66Ot7UAqGXGRnm4OilOIhTQn5opFV8T8kcooo3N0oxO2w2KrHQiy6RqBWKs MKZP0H6TNvcAEl4wmB4e6399ci/+aAR1g1CkCCkbEyDHlRClOlsmNOwTIT75KUBv+AQq i5t+ybTVrxdpjD9ducecDxBKj679WauqM1T2gh6Ks04BV49/VxvyruOw/DU6FPCV3nCz kR5Q== 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=i7vs80eeAHoowuGiB3IXr1R0pQ52ZVhylKFRPge1iSc=; b=T8W/lxfRNMuSiMPi4VVK/nF+vlFbEQ4cibUBYwTfFRql4JEpnvWnNZdHxK9dheYFg7 8jGNWfWYDFwTOEYzJJ5Nq0u5YQgKGnxvw5Jt/zDYx9qpZ3s0QKHzfpmHkMm50Z7pBzkM zsU44f8Hy0Aco53HP1zcvgpEePJBaOzXoSbBIKSs7wrFBZYCIy1OJNLzvNzw3f0nUJpa PXtcxKaf6A21TEtSgSvkP2kWJAP+CfZT0YStwyzH0hj0Y5TBtJdewGeb89f6svAgwwOH BSCNUt83zkAi6EKGWtoQD3kM2jq4KpbfJT0LhgNJSYY0/DeLWkQ9mo9FntHbUaTs27+d 0NaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=Fizq3Xl2; 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 lb14-20020a17090b4a4e00b0024bc03cfa95si3136947pjb.156.2023.06.08.12.38.27; Thu, 08 Jun 2023 12:38:40 -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=Fizq3Xl2; 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 S236639AbjFHTZY (ORCPT <rfc822;literming00@gmail.com> + 99 others); Thu, 8 Jun 2023 15:25:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236902AbjFHTZU (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 8 Jun 2023 15:25:20 -0400 Received: from mail-oi1-x229.google.com (mail-oi1-x229.google.com [IPv6:2607:f8b0:4864:20::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 031EF2D68 for <linux-kernel@vger.kernel.org>; Thu, 8 Jun 2023 12:24:48 -0700 (PDT) Received: by mail-oi1-x229.google.com with SMTP id 5614622812f47-39c84863e34so36943b6e.2 for <linux-kernel@vger.kernel.org>; Thu, 08 Jun 2023 12:24:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1686252276; x=1688844276; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:from:to:cc:subject:date:message-id:reply-to; bh=i7vs80eeAHoowuGiB3IXr1R0pQ52ZVhylKFRPge1iSc=; b=Fizq3Xl20k0s99bdV61+X0NES9CrzdKWOse7eCbwtn1uu9/h4mE0n0kQt9PwBBK2XD BLlYV7LOU26RY2UNjTt4eTKg2MiSFQ+mNE44PGkBbtphVk3O0XARXhUyyawmE+XPjZkM EIuZgR8dgqHGa9xPUigE/FawhK1QiFlabNgVMomZeu9AjaWaPJZt0b1g6ImgUkyGd5Ls fLctCunPng5YblGLwKbDucX0igX9BBdDWTKtQ02LRRmnejkHdR4rcW59H7SIyTy+bUtn UJH+uR4By3Rz8RGak7Nu20/xco5IlkAXPoTxOravmVmGg5IIQRwIeYxmwmVdJLgwdVhQ Kkaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686252276; x=1688844276; 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=i7vs80eeAHoowuGiB3IXr1R0pQ52ZVhylKFRPge1iSc=; b=G/nDSg0JsyX/vTAmDBIioOzGVmXtsHa0z0RyU973voyVz1i8BImYU2WTSJIBD7EIj+ hSTnbNK7zM2VIaqKpUUqy5H5gSfXG6aFSMKiEtN9Aq1jWgwDD1XI72un5OVsNgkCi29k hpyaG2YKDpF5dbPblfTOyXf4CzsoNHb45qgZFZ2BKEw8b1VCViRpx2x+SBfjui6I5wl+ LRr71aZWlXlR+2uu8qhAsqxqI4P2X8y2n7aH6SnQR8YX7pv07dvV5Te0oBNIPH3s/Dqw rQ1Q/6QTKBqxmJbiCWrJ9RTqxSjinBRMDQXhP4Bq/+L24siRp068QQxPm2PoWsdxDyux 7fhQ== X-Gm-Message-State: AC+VfDwWaVxKpPlgR7mb3+dltDQj0L9XlevjAUcFxO4V+QYL3UR/IVvo qtX0/7dFEYE/oO0c98T074/EEw== X-Received: by 2002:aca:231a:0:b0:398:2e8d:3ca8 with SMTP id e26-20020aca231a000000b003982e8d3ca8mr9311006oie.52.1686252276532; Thu, 08 Jun 2023 12:24:36 -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 p127-20020a0dcd85000000b0055db91a6ddfsm111980ywd.73.2023.06.08.12.24.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jun 2023 12:24:35 -0700 (PDT) Date: Thu, 8 Jun 2023 12:24:32 -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>, Peter Zijlstra <peterz@infradead.org>, 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>, Alexander Gordeev <agordeev@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 v2 13/23] powerpc/hugetlb: pte_alloc_huge() In-Reply-To: <a4963be9-7aa6-350-66d0-2ba843e1af44@google.com> Message-ID: <36b4e5d-954b-8569-4fe2-bd1797362441@google.com> References: <a4963be9-7aa6-350-66d0-2ba843e1af44@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?1768164552255001983?= X-GMAIL-MSGID: =?utf-8?q?1768164552255001983?= |
Series |
arch: allow pte_offset_map[_lock]() to fail
|
|
Commit Message
Hugh Dickins
June 8, 2023, 7:24 p.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. huge_pte_offset() is using __find_linux_pte(), which is using
pte_offset_kernel() - don't rename that to _huge, it's more complicated.
Signed-off-by: Hugh Dickins <hughd@google.com>
---
arch/powerpc/mm/hugetlbpage.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c index b900933507da..f7c683b672c1 100644 --- a/arch/powerpc/mm/hugetlbpage.c +++ b/arch/powerpc/mm/hugetlbpage.c @@ -183,7 +183,7 @@ pte_t *huge_pte_alloc(struct mm_struct *mm, struct vm_area_struct *vma, return NULL; if (IS_ENABLED(CONFIG_PPC_8xx) && pshift < PMD_SHIFT) - return pte_alloc_map(mm, (pmd_t *)hpdp, addr); + return pte_alloc_huge(mm, (pmd_t *)hpdp, addr); BUG_ON(!hugepd_none(*hpdp) && !hugepd_ok(*hpdp));