All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] LoongArch: mm: remove redundant pte occupancy check in __set_fixmap()
@ 2025-05-08  3:05 george
  2025-05-08  5:23 ` Yanteng Si
  2025-05-10  7:34 ` Huacai Chen
  0 siblings, 2 replies; 8+ messages in thread
From: george @ 2025-05-08  3:05 UTC (permalink / raw)
  To: chenhuacai, kernel
  Cc: rppt, akpm, dave.hansen, geert, ptesarik, guoweikang.kernel,
	maobibo, loongarch, George Guo

From: George Guo <guodongtai@kylinos.cn>

This check could falsely report errors when PTEs are remapped:
arch/loongarch/mm/init.c:204: bad pte 0000000107b601c3.

The check was unnecessary because:
- Fixmap slots are designed to be reusable
- Other architectures (x86/arm64) allow PTE overwrites
- Callers are responsible for proper mapping management

Signed-off-by: George Guo <guodongtai@kylinos.cn>
---
 arch/loongarch/mm/init.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/arch/loongarch/mm/init.c b/arch/loongarch/mm/init.c
index 06f11d9e4ec1..7b7e3b1aa00d 100644
--- a/arch/loongarch/mm/init.c
+++ b/arch/loongarch/mm/init.c
@@ -200,10 +200,6 @@ void __init __set_fixmap(enum fixed_addresses idx,
 	BUG_ON(idx <= FIX_HOLE || idx >= __end_of_fixed_addresses);
 
 	ptep = populate_kernel_pte(addr);
-	if (!pte_none(ptep_get(ptep))) {
-		pte_ERROR(*ptep);
-		return;
-	}
 
 	if (pgprot_val(flags))
 		set_pte(ptep, pfn_pte(phys >> PAGE_SHIFT, flags));
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-08-28  6:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-08  3:05 [PATCH 1/1] LoongArch: mm: remove redundant pte occupancy check in __set_fixmap() george
2025-05-08  5:23 ` Yanteng Si
2025-05-08  5:42   ` Andrew Morton
2025-05-08  5:56     ` Yanteng Si
2025-05-10  7:34 ` Huacai Chen
2025-05-13  2:19   ` George Guo
2025-08-21  3:05     ` [PATCH v2] " george
2025-08-28  6:34       ` Huacai Chen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.