From patchwork Thu Jun 8 19:24:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hugh Dickins X-Patchwork-Id: 13272758 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 20C00C7EE29 for ; Thu, 8 Jun 2023 19:24:40 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A90188E0002; Thu, 8 Jun 2023 15:24:39 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A3FF78E0001; Thu, 8 Jun 2023 15:24:39 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 908838E0002; Thu, 8 Jun 2023 15:24:39 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 8250C8E0001 for ; Thu, 8 Jun 2023 15:24:39 -0400 (EDT) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 5835F16048E for ; Thu, 8 Jun 2023 19:24:39 +0000 (UTC) X-FDA: 80880557478.13.63CD717 Received: from mail-oi1-f177.google.com (mail-oi1-f177.google.com [209.85.167.177]) by imf29.hostedemail.com (Postfix) with ESMTP id 81EED120010 for ; Thu, 8 Jun 2023 19:24:37 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=google.com header.s=20221208 header.b=Fizq3Xl2; spf=pass (imf29.hostedemail.com: domain of hughd@google.com designates 209.85.167.177 as permitted sender) smtp.mailfrom=hughd@google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1686252277; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=i7vs80eeAHoowuGiB3IXr1R0pQ52ZVhylKFRPge1iSc=; b=5il7rSG7SaGfv8CHVujWTyebY3bWaqLQSXR5xzwdyo7gspSvDWDPTzSqzO5QrIncFum0Iy rTWbwdqESQwgA3eNT1rViGdnRrgTZO8WxeEMr3W9R11QkM/vy7z+tDl2Xsa4eWmL4swblV xmckDWya5FqfCSYh8lP2gx1Hxzmtszc= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1686252277; a=rsa-sha256; cv=none; b=YNog+H9blGHusgA2xTGTN4T5g25OWvHqXEBD0jL2WaclXdb8HgjWnzFNCaOZ8i1yUo1S1s 28NK6LCUIMHSBkcMRyjRgLegaQteLait/li5AddD9Uajr5uPQ8SHFsr55DvEJSERvV9KAA BI+x/AqL+pLDwiodLewF8HcfEQ7DzH8= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=pass header.d=google.com header.s=20221208 header.b=Fizq3Xl2; spf=pass (imf29.hostedemail.com: domain of hughd@google.com designates 209.85.167.177 as permitted sender) smtp.mailfrom=hughd@google.com; dmarc=pass (policy=reject) header.from=google.com Received: by mail-oi1-f177.google.com with SMTP id 5614622812f47-39c7f78c237so36098b6e.3 for ; Thu, 08 Jun 2023 12:24:37 -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=RZd38jvoMIEr0fWLM97mQzSHnZYmQQTwR4sUWNJyPBo+UEaZDBROzFjvWHXVxJWCyD Wy1kbhjJYUse+heH/jxnIHZszTjlegkL9ZczO6DoXG/kuVGAq+HXDlB88IqiqzdLoXgj MsCJhqUmvYzeELeTQpJvIsqvBAEsHOb6OHkxNDpxf0s0nztaGVQ3tF3XDC4ccdgyIpXW HQJGTFk8MmPmxBA9uiTg9CEh0loNGB6cL7Bx/faqoJs0FBXVSITVapsd6v495rLnJ/yR GgKdQIdDKZpKNUNRsW7WtSEUy1hQl0NaQf+4WhdPUMbANXtv1PWcQRGCke9zF9Kb7uGg UPBA== X-Gm-Message-State: AC+VfDzL2B8m2ZI5sLI2n6OSbbbgMa6K8UjmM4J5JnTJDoVF14NaK+9O ErsrPyTjp9HqXK7RRFvk5bus8A== X-Google-Smtp-Source: ACHHUZ7q/V1z+M3JmfzPQUSgwqST3P0/aMtaG97EoZD5q0BXyKYRTA5dvNNFRGy2eGKWgHikkJ/mpQ== 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 X-Rspamd-Queue-Id: 81EED120010 X-Rspam-User: X-Stat-Signature: 19h7zspju1gx41nrm7k7ujtjxra48ked X-Rspamd-Server: rspam03 X-HE-Tag: 1686252277-204170 X-HE-Meta: U2FsdGVkX183xQsC7OjWN1t7QQgwudBKbBRbWawxwgy8frHbs+5we5X/sKgLDruwsj+0oqqMuqxjdl7gqgJUd8c4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tq777688uAg8zcwO00+sZIWvcLk6wIzoUYjLUOwBgqPuUr8VEBXufkfflBFX5GlPC1edB2iVjONNjMb1fAw10TyEfruOkgnwVgXTZAtCefZxhiIypcoAv42G8zTCcaxi3tS5tjA+gHybxWUsj63wmXX2gwlcsX62zMc61akS5lhK34ATx1J22lSYHoidzUOzgV6MxXIi5DEOWyNeILMmgJ5j8uq9hOr3yKFRx27QlBQo+eiMIzm9aYqQ+pKy48RcA== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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));