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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 22605C5475B for ; Fri, 1 Mar 2024 10:47:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=YGEF+lcWzyA6MM61TBZmOYY+Mi0+5zOOK2bcDPil8oM=; b=Fe9uFrog3J2qn2 lgY8h3VOeQr+U7GOME/BtcAIpWsGRHz6moVev7shRnsBG8edFDEnUiZufxrmZUSrBB6Apm8EgXIbc TqRq5ijSi4H/EnsuiPJS38jtBXL0ekLpV+IXhL5k+lHL4G1+i5OgL+1owWFUFeH5wxtVPNppdFPAO C91nEViU8vhnllo3FeTu098G8UmXi0JUiC2iCYClY5MZ0I0KMm7VqMkeJ+ovGJI0B5Lw6PD6v0o46 EuQBkXwqzKS7wFnt34TyFrrSgOxDvid0RlTq7B0WK6Gp7rz/+p/7Eh+k8xf2cUOU03SXtQSBj1uZy kJ/0lYvjPdweiwcKY8hw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rg0Pt-0000000HRBT-2REr; Fri, 01 Mar 2024 10:47:01 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rg0Pq-0000000HR9q-2GPc for linux-arm-kernel@lists.infradead.org; Fri, 01 Mar 2024 10:47:00 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 3C0121FB; Fri, 1 Mar 2024 02:47:35 -0800 (PST) Received: from [10.57.68.58] (unknown [10.57.68.58]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C7E243F762; Fri, 1 Mar 2024 02:46:55 -0800 (PST) Message-ID: Date: Fri, 1 Mar 2024 10:46:55 +0000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/2] arm64/mm: Use generic __pud_free() helper in pud_free() implementation Content-Language: en-GB To: Ard Biesheuvel , linux-arm-kernel@lists.infradead.org Cc: catalin.marinas@arm.com, will@kernel.org, Ard Biesheuvel References: <20240301104046.1234309-4-ardb+git@google.com> <20240301104046.1234309-5-ardb+git@google.com> From: Ryan Roberts In-Reply-To: <20240301104046.1234309-5-ardb+git@google.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240301_024658_743905_7127F826 X-CRM114-Status: GOOD ( 17.14 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 01/03/2024 10:40, Ard Biesheuvel wrote: > From: Ard Biesheuvel > > Commit 0dd4f60a2c76 ("arm64: mm: Add support for folding PUDs at > runtime") implements specialized PUD alloc/free helpers to allow the > decision whether or not to fold PUDs to be made at runtime when the > number of paging levels is 4 or higher. > > Its implementation of pud_free() is based on the generic version that > existed when the patch was first written, but in the meantime, the > freeing of a PUD has become a bit more involved, and so instead of > simply freeing the page, we should invoke the generic __pud_free() that > encapsulates whatever needs doing at this point. > > This fixes a reported warning emitted by the page flags > self-diagnostics. > > Reported-by: Ryan Roberts > Signed-off-by: Ard Biesheuvel Tested-by: Ryan Roberts > --- > arch/arm64/include/asm/pgalloc.h | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/arch/arm64/include/asm/pgalloc.h b/arch/arm64/include/asm/pgalloc.h > index aeba2cf15a25..8ff5f2a2579e 100644 > --- a/arch/arm64/include/asm/pgalloc.h > +++ b/arch/arm64/include/asm/pgalloc.h > @@ -60,8 +60,7 @@ static inline void pud_free(struct mm_struct *mm, pud_t *pud) > { > if (!pgtable_l4_enabled()) > return; > - BUG_ON((unsigned long)pud & (PAGE_SIZE-1)); > - free_page((unsigned long)pud); > + __pud_free(mm, pud); > } > #else > static inline void __p4d_populate(p4d_t *p4dp, phys_addr_t pudp, p4dval_t prot) _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel