From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E24F12163B2 for ; Wed, 15 Oct 2025 16:06:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760544409; cv=none; b=C97I3yPn5ItFHDNfKU35LNvGiYbK15YbnIro/MkG1Uw9u6i9pzsTdCd/IeHUGGU/53emkXkdTn+RTb7+0l9W45k8bn/UyPeGJjNlxCEsSriWkWeKiqxUeiQ0D5vt0SMQx52rhsX9VWl3Ka7RUge/e+SkdYoO9GHY4zitfefyu0E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760544409; c=relaxed/simple; bh=UdDCw4kqzYL0QUQ85HTZI4w0Zz8KX9eYeP+2wJOJGwY=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=ExdNf1l3smJUuaPMXgyoiqcN4OuaqK4O0kWBf7KMq0Qt6Oq814/7TEUW5TxtqdWRvC+adDr9uabymRNiDscLc6pb9/F6F8yMT2Su2s05UG+ARq6L303fCMz64woe5PHHewsE37iDo483nqlwNdAG65x5L7wXFY04JD+sjHwea7U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com 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 595381655; Wed, 15 Oct 2025 09:06:39 -0700 (PDT) Received: from [10.57.66.88] (unknown [10.57.66.88]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C81093F66E; Wed, 15 Oct 2025 09:06:44 -0700 (PDT) Message-ID: <37060a4e-4d33-4b14-b221-088672766669@arm.com> Date: Wed, 15 Oct 2025 18:06:42 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 2/2] arm64/mm: Rename try_pgd_pgtable_alloc_init_mm To: Linu Cherian , Catalin Marinas , Will Deacon , Andrew Morton , Ryan Roberts , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Anshuman Khandual , Zhenhua Huang , Dev Jain , Lorenzo Stoakes , Yang Shi References: <20251015112758.2701604-1-linu.cherian@arm.com> <20251015112758.2701604-3-linu.cherian@arm.com> Content-Language: en-GB From: Kevin Brodsky In-Reply-To: <20251015112758.2701604-3-linu.cherian@arm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 15/10/2025 13:27, Linu Cherian wrote: > With BUG_ON in pgd_pgtable_alloc_init_mm moved up to higher layer, > gfp flags is the only difference between try_pgd_pgtable_alloc_init_mm > and pgd_pgtable_alloc_init_mm. Hence rename the "try" version > to pgd_pgtable_alloc_init_mm_gfp. > > Reviewed-by: Ryan Roberts > Signed-off-by: Linu Cherian Reviewed-by: Kevin Brodsky - Kevin > --- > Changelog > v3: > * Update pgd_pgtable_alloc_init_mm to make use of > pgd_pgtable_alloc_init_mm_gfp > > arch/arm64/mm/mmu.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c > index 638cb4df31a9..80786d3167e7 100644 > --- a/arch/arm64/mm/mmu.c > +++ b/arch/arm64/mm/mmu.c > @@ -559,7 +559,7 @@ static phys_addr_t __pgd_pgtable_alloc(struct mm_struct *mm, gfp_t gfp, > } > > static phys_addr_t > -try_pgd_pgtable_alloc_init_mm(enum pgtable_type pgtable_type, gfp_t gfp) > +pgd_pgtable_alloc_init_mm_gfp(enum pgtable_type pgtable_type, gfp_t gfp) > { > return __pgd_pgtable_alloc(&init_mm, gfp, pgtable_type); > } > @@ -567,7 +567,7 @@ try_pgd_pgtable_alloc_init_mm(enum pgtable_type pgtable_type, gfp_t gfp) > static phys_addr_t __maybe_unused > pgd_pgtable_alloc_init_mm(enum pgtable_type pgtable_type) > { > - return __pgd_pgtable_alloc(&init_mm, GFP_PGTABLE_KERNEL, pgtable_type); > + return pgd_pgtable_alloc_init_mm_gfp(pgtable_type, GFP_PGTABLE_KERNEL); > } > > static phys_addr_t > @@ -594,7 +594,7 @@ static int split_pmd(pmd_t *pmdp, pmd_t pmd, gfp_t gfp, bool to_cont) > pte_t *ptep; > int i; > > - pte_phys = try_pgd_pgtable_alloc_init_mm(TABLE_PTE, gfp); > + pte_phys = pgd_pgtable_alloc_init_mm_gfp(TABLE_PTE, gfp); > if (pte_phys == INVALID_PHYS_ADDR) > return -ENOMEM; > ptep = (pte_t *)phys_to_virt(pte_phys); > @@ -639,7 +639,7 @@ static int split_pud(pud_t *pudp, pud_t pud, gfp_t gfp, bool to_cont) > pmd_t *pmdp; > int i; > > - pmd_phys = try_pgd_pgtable_alloc_init_mm(TABLE_PMD, gfp); > + pmd_phys = pgd_pgtable_alloc_init_mm_gfp(TABLE_PMD, gfp); > if (pmd_phys == INVALID_PHYS_ADDR) > return -ENOMEM; > pmdp = (pmd_t *)phys_to_virt(pmd_phys);