From patchwork Thu Jun 8 19:14:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hugh Dickins X-Patchwork-Id: 13272697 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 1F32DC7EE29 for ; Thu, 8 Jun 2023 19:14:34 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B0A7E8E0002; Thu, 8 Jun 2023 15:14:33 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id ADF518E0001; Thu, 8 Jun 2023 15:14:33 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9A82E8E0002; Thu, 8 Jun 2023 15:14:33 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 8AFC38E0001 for ; Thu, 8 Jun 2023 15:14:33 -0400 (EDT) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 645021C79AE for ; Thu, 8 Jun 2023 19:14:33 +0000 (UTC) X-FDA: 80880532026.26.0B6FCF5 Received: from mail-yb1-f177.google.com (mail-yb1-f177.google.com [209.85.219.177]) by imf12.hostedemail.com (Postfix) with ESMTP id 6E7CC4000F for ; Thu, 8 Jun 2023 19:14:31 +0000 (UTC) Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=google.com header.s=20221208 header.b="2n/XtD7A"; spf=pass (imf12.hostedemail.com: domain of hughd@google.com designates 209.85.219.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=1686251671; 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=hqbvyW6crf6toTfKG311uSxHzLZVjYgM3m9zpPIhyDA=; b=2ObKoI0cIRXvt2AF+ZDfLa9ChpMyRQ3NcqEzhlmdetIzvR35v+ntbH2VvJluSdTbFM7DAq QtXZRZuyZf0ddSoQYEiJM0RdlTPdSMsgAZX1RULPqDDGSSmknUjtgmv5DG4PjlNAH4rsgA UMygWN9FvnmFroL7YJeq8sPHGTySKTg= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1686251671; a=rsa-sha256; cv=none; b=m1Tn2MIm4K96uUfN+7BhfFVh9Ly6vFtMdkTtJmm42bcUWIhr7kiWjNAM2JUVfsXRyY+WfQ 9iUjZAob/nFPM/MDBWnjWn3QrxJTlrep55xdzR3//x0rJ4fchEbLZCnWebYDapBJ6v2ziM 9PBkN9Q+fDuB3OA/ok09708Yx9sjOCw= ARC-Authentication-Results: i=1; imf12.hostedemail.com; dkim=pass header.d=google.com header.s=20221208 header.b="2n/XtD7A"; spf=pass (imf12.hostedemail.com: domain of hughd@google.com designates 209.85.219.177 as permitted sender) smtp.mailfrom=hughd@google.com; dmarc=pass (policy=reject) header.from=google.com Received: by mail-yb1-f177.google.com with SMTP id 3f1490d57ef6-bad010e1e50so1054150276.1 for ; Thu, 08 Jun 2023 12:14:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1686251670; x=1688843670; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:from:to:cc:subject:date:message-id:reply-to; bh=hqbvyW6crf6toTfKG311uSxHzLZVjYgM3m9zpPIhyDA=; b=2n/XtD7AqYzwMObmNTcTXdhdmtrivr6xS0a6hxh2028Gq3sNV9XO29gB5O2y3L9l/t L2rqH6x4Pz17FgKoR1Y4rQPo+pjlVHFvq4Uxf6V5Z1hVLY+dk3dbsKixOg2g0+O6MH3o wHR7UhzFBUpyNSTJP8nVTqWIyYA0el7GHtc3GU+0DrUYPDVBZCtJf3wyrCUqLLZR09lv VqBAJ8/LNlL6ViTV2apFi54AS+jw7a1Zjo/eBl1kmHqeluHIV3N/nqy10dITHeklJsgD IGKWlS4umLi9ypWs+T7OEHIYU3YkWJ3FbGyXJ6NMN9TADYksX23kqJlAINxQPvIJDTtX gwNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686251670; x=1688843670; 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=hqbvyW6crf6toTfKG311uSxHzLZVjYgM3m9zpPIhyDA=; b=Qq/IfhE5fMM5cjIcRw1V+Z2IvbpcpRWNe9gorl6gQmRjbsvVhkUFlJHE40Ume6Tx4P yBtRvSp/BWkXJ/dWJgNtYyrBVVXC7A4fUOlBu0KOwlEy9mlr0kq79V7J8iJfnMxnu6KK hylI63VP6/o6a+HGQbrGqXu7K9nQOKyDUh8uG+BKNECbylH2QcZT9VR1JQuDYhb9s8jl jWXmYq3GJiDb1ckfBkeXxhRj8BKzsCQ3z45W4C9sXSZ84ljVuvfEhdTDVxv1CpAXyXWz hND4cM8st14Upyy3MEN2m+V+qJWp5kwthist6wtf21WCrAMHPwPQUMD2dpJfhQipchYd t/Cw== X-Gm-Message-State: AC+VfDzAieXutunWPEWBpHg3q6n9vtkBdJqMDmS0FLhl6qa68RA5E9p3 TjK48ve3OZlOrmwlhByQudcfiQ== X-Google-Smtp-Source: ACHHUZ7aUiIh5IKg+O5kgdrTnFDUinQat6T8kg6GewL/1W4sBHj9jDkDghROqTlVL3SjDvy6zEmR9Q== X-Received: by 2002:a25:e302:0:b0:bb1:5a06:70ed with SMTP id z2-20020a25e302000000b00bb15a0670edmr543635ybd.19.1686251670430; Thu, 08 Jun 2023 12:14:30 -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 e10-20020a25874a000000b00b9e5b28dbd8sm429689ybn.17.2023.06.08.12.14.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jun 2023 12:14:29 -0700 (PDT) Date: Thu, 8 Jun 2023 12:14:26 -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 04/23] ia64/hugetlb: pte_alloc_huge() pte_offset_huge() In-Reply-To: Message-ID: <1c2c7837-bfea-9640-a74-985379fcc5a@google.com> References: MIME-Version: 1.0 X-Stat-Signature: 89yeym8xh6odaabs6nh74jqddkuj81hn X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 6E7CC4000F X-Rspam-User: X-HE-Tag: 1686251671-786516 X-HE-Meta: U2FsdGVkX19tFd3HEaq/AURy6BE0dimxUV9MnoVHLsGW3z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GXgoIfmeQST4Xj2jPnF0D/KqTDYKkKdVJsFp+UiO9fiseWrjK8hW+FgAiF27l0uULDjijJMzOTMQy32JpqIgaG6xJ1CuqBlpctpdMsG7+AEXA71l8wlo9m9OwPKen2VbEHrNWFEsEbJ79KTkDxR22NLLJkgZiDwFbDX+gpPAzZQblpKxi55+Bg8PN9YYuUrp12Ioqm+xribdtsyCjWRN9GAfY/diiEyTlsaO5tXXG6y/GQ4NNQRdJi5khSdrrzpTWaVf6Uhv7KlUGng9Zd5RqxzN1/vfW5D4VAwXzLk8psnzLng== 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; with pte_offset_huge() a better name for pte_offset_kernel(). Signed-off-by: Hugh Dickins --- arch/ia64/mm/hugetlbpage.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/ia64/mm/hugetlbpage.c b/arch/ia64/mm/hugetlbpage.c index 78a02e026164..adc49f2d22e8 100644 --- a/arch/ia64/mm/hugetlbpage.c +++ b/arch/ia64/mm/hugetlbpage.c @@ -41,7 +41,7 @@ huge_pte_alloc(struct mm_struct *mm, struct vm_area_struct *vma, if (pud) { pmd = pmd_alloc(mm, pud, taddr); if (pmd) - pte = pte_alloc_map(mm, pmd, taddr); + pte = pte_alloc_huge(mm, pmd, taddr); } return pte; } @@ -64,7 +64,7 @@ huge_pte_offset (struct mm_struct *mm, unsigned long addr, unsigned long sz) if (pud_present(*pud)) { pmd = pmd_offset(pud, taddr); if (pmd_present(*pmd)) - pte = pte_offset_map(pmd, taddr); + pte = pte_offset_huge(pmd, taddr); } } }