On 2026/1/7 17:05, Mike Rapoport wrote:
On Wed, Jan 07, 2026 at 02:46:35PM +0800,[email protected] wrote:
From: Alex Shi<[email protected]>
After struct ptdesc introduced, pgtable_t should used it instead of old
struct page pointer. The only thing in the way for this change is just
pgtable->lru in pgtable_trans_huge_deposit/withdraw.
Let's convert them into ptdesc and use struct ptdesc* as pgtable_t.
Thanks testing support from kernel test robot<[email protected]>
Signed-off-by: Alex Shi<[email protected]>
---
...
diff --git a/arch/arm/include/asm/pgalloc.h b/arch/arm/include/asm/pgalloc.h
index a17f01235c29..1a3484c2df4c 100644
--- a/arch/arm/include/asm/pgalloc.h
+++ b/arch/arm/include/asm/pgalloc.h
@@ -96,12 +96,12 @@ pte_alloc_one(struct mm_struct *mm)
{
struct page *pte;
- pte = __pte_alloc_one(mm, GFP_PGTABLE_USER | PGTABLE_HIGHMEM);
+ pte = ptdesc_page(__pte_alloc_one(mm, GFP_PGTABLE_USER |
PGTABLE_HIGHMEM));
When ptdesc will be separated from struct page, ptdesc_page() would fail if the
allocation failed. This line should be split into something like
struct ptdesc *ptdesc = __pte_alloc_one(...);
if (!ptesc)
return NULL;
pte = ptdesc_page(ptdesc);
Right, I will fix this. and sent the 2nd version.
Thanks a lot!
if (!pte)
return NULL;
if (!PageHighMem(pte))
clean_pte_table(page_address(pte));
- return pte;
+ return page_ptdesc(pte);
}
static inline void __pmd_populate(pmd_t *pmdp, phys_addr_t pte,
-- Sincerely yours, Mike.
_______________________________________________
linux-snps-arc mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-snps-arc