[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211125170600.1608-2-rongwei.wang@linux.alibaba.com>
Date: Fri, 26 Nov 2021 01:05:59 +0800
From: Rongwei Wang <rongwei.wang@...ux.alibaba.com>
To: catalin.marinas@....com, will@...nel.org, mark.rutland@....com,
james.morse@....com, ardb@...nel.org, tabba@...gle.com,
akpm@...ux-foundation.org, rppt@...nel.org,
anshuman.khandual@....com, pasha.tatashin@...een.com
Cc: linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: [PATCH v3 1/2] arm64: trans_pgd: unify the use of pmd_populate_kernel
In commit 5de59884ac0e ("arm64: trans_pgd: pass NULL instead
of init_mm to *_populate functions"), simply replace init_mm
with NULL for pmd_populate_kernel. But in commit 59511cfd08f3
("arm64: mm: use XN table mapping attributes for user/kernel
mappings"), adding the check of mm context in
'pmd_populate_kernel'. And 'pmd_populate_kernel' always
called with init_mm under arm64, nice to unify its use.
This patch make a simple change, just restoring init_mm for
'pmd_populate_kernel' in 'copy_pte'.
Suggested-by: Abaci <abaci@...ux.alibaba.com>
Signed-off-by: Rongwei Wang <rongwei.wang@...ux.alibaba.com>
---
arch/arm64/mm/trans_pgd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/mm/trans_pgd.c b/arch/arm64/mm/trans_pgd.c
index d7da8ca..5275ca3 100644
--- a/arch/arm64/mm/trans_pgd.c
+++ b/arch/arm64/mm/trans_pgd.c
@@ -67,7 +67,7 @@ static int copy_pte(struct trans_pgd_info *info, pmd_t *dst_pmdp,
dst_ptep = trans_alloc(info);
if (!dst_ptep)
return -ENOMEM;
- pmd_populate_kernel(NULL, dst_pmdp, dst_ptep);
+ pmd_populate_kernel(&init_mm, dst_pmdp, dst_ptep);
dst_ptep = pte_offset_kernel(dst_pmdp, start);
src_ptep = pte_offset_kernel(src_pmdp, start);
--
1.8.3.1
Powered by blists - more mailing lists