From mboxrd@z Thu Jan 1 00:00:00 1970 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 23FB0C433EF for ; Wed, 6 Oct 2021 07:56:58 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id DD05160F35 for ; Wed, 6 Oct 2021 07:56:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org DD05160F35 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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:MIME-Version:Date: Message-ID:References:Cc:To:Subject:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=UhoI5NDpmQHQRTu9BXT7VIhS5pU/bCJmjZgW6VvfpBY=; b=E2az4db9GZKT2oLttCiI2IXneM fkMjRbWnSuPjje04SnJTm7c7Jk3mOMmL4KkyspO5cIcjAnSuW/F9MR3cU0WLIygLLOrDamAPBPGBs 9AnrMy1f05bqfxKvwrp/FS7Ua343cdHcz/0rhpaBQtw8qGuGo3rHd77vknnPT8WnJgWSLMOLJeQqP W2Q9/6Q6lNYBykwd5lrDP7Yes7Ylr0bCLC4QD+jrgoiQfZgWGPwEB04xvxH/SS5WS6sN6cXVMLicy ViIx+V0r1Ab6s/N5bJoLtrh/CJOnR6VoYTKIuDKNJL+tmhd2xqMoFTLRPolFFRBwdLs0TW0J+wtF1 xCsXolCA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mY1lr-00DJjf-VU; Wed, 06 Oct 2021 07:55:24 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mY1ln-00DJhT-8U for linux-arm-kernel@lists.infradead.org; Wed, 06 Oct 2021 07:55:20 +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 70974D6E; Wed, 6 Oct 2021 00:55:15 -0700 (PDT) Received: from [10.163.75.2] (unknown [10.163.75.2]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E85353F766; Wed, 6 Oct 2021 00:55:12 -0700 (PDT) From: Anshuman Khandual Subject: Re: [PATCH] arm64/hugetlb: fix CMA gigantic page order for non-4K PAGE_SIZE To: Mike Kravetz , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Will Deacon , Mark Rutland , Barry Song , Andrew Morton , stable@vger.kernel.org References: <20211005202529.213812-1-mike.kravetz@oracle.com> Message-ID: <18a86369-7ee2-0bc9-98f1-84fa595a1ee0@arm.com> Date: Wed, 6 Oct 2021 13:25:09 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20211005202529.213812-1-mike.kravetz@oracle.com> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211006_005519_397163_CEDEF68D X-CRM114-Status: GOOD ( 17.03 ) 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 10/6/21 1:55 AM, Mike Kravetz wrote: > For non-4K PAGE_SIZE configs, the largest gigantic huge page size is > CONT_PMD_SHIFT order. > > Fixes: abb7962adc80 ("arm64/hugetlb: Reserve CMA areas for gigantic > pages on 16K and 64K configs") > Signed-off-by: Mike Kravetz > Cc: Reviewed-by: Anshuman Khandual > --- > arch/arm64/mm/hugetlbpage.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm64/mm/hugetlbpage.c b/arch/arm64/mm/hugetlbpage.c > index 23505fc35324..a8158c948966 100644 > --- a/arch/arm64/mm/hugetlbpage.c > +++ b/arch/arm64/mm/hugetlbpage.c > @@ -43,7 +43,7 @@ void __init arm64_hugetlb_cma_reserve(void) > #ifdef CONFIG_ARM64_4K_PAGES > order = PUD_SHIFT - PAGE_SHIFT; > #else > - order = CONT_PMD_SHIFT + PMD_SHIFT - PAGE_SHIFT; > + order = CONT_PMD_SHIFT - PAGE_SHIFT; > #endif > /* > * HugeTLB CMA reservation is required for gigantic > The commit a1634a542f74 ("arm64/mm: Redefine CONT_{PTE, PMD}_SHIFT") which got merged during the exact same week, broke the above commit as both were in flight. The commit here updated hugetlbpage_init() but did not update the new incoming arm64_hugetlb_cma_reserve(). _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel