Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1127299rwd; Thu, 8 Jun 2023 12:34:07 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5hk5NBGdW9F1Y7nyFIsAilGJcGMcxN3SlNziIGwnvUP8s9ipDRnFqWuNJiDXIHQBXXfodp X-Received: by 2002:a05:6a00:2e01:b0:64d:123d:cc74 with SMTP id fc1-20020a056a002e0100b0064d123dcc74mr7368383pfb.4.1686252846660; Thu, 08 Jun 2023 12:34:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686252846; cv=none; d=google.com; s=arc-20160816; b=hj2VY5nR9AsfV+OqQsovjbIqRkVRjZ1IVc0WfcJJh6ZAspomAswl6ceL1rmtGplzmm ScWG7ouloAczIu1wKW4oEZx/chhbjZbm1SkyU9FyTIJImrfnpVgD5iBRN2abs5lNeUR6 SsLr8hKtYqfOUQu+ZkFE9HDefGJYZ+3FRlKnWgF7ROazJp1/S/KHli73WFTBs6TJfL+V jybQg0D2CzIYwt7sHXO+NhyjF1BzDIx/pNkP6ydVHHiZliBvZXJBAselklcEQQkM5Ger CE4M2kjreHX8tZQlwLyHO8/uwyR3DI/iEH7ywpPDahB6i8YdWTH+aMp0WBkb6q/wpiCx Lzsw== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q29-20020aa7961d000000b006546d0d5832si1233158pfg.183.2023.06.08.12.33.53; Thu, 08 Jun 2023 12:34:06 -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 S236509AbjFHTZX (ORCPT + 99 others); Thu, 8 Jun 2023 15:25:23 -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 ); 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 ; Thu, 8 Jun 2023 12:24:48 -0700 (PDT) Received: by mail-oi1-x229.google.com with SMTP id 5614622812f47-39c84863e34so36943b6e.2 for ; 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 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 13/23] powerpc/hugetlb: pte_alloc_huge() In-Reply-To: Message-ID: <36b4e5d-954b-8569-4fe2-bd1797362441@google.com> 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. 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 --- 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)); -- 2.35.3