Skip to contentSkip to conversation

arm64/mm: remove useless trans_pgd_map_page()

PATCH In review Pingfan Liu 2 participants 3 messages Apr 6, 2021 – Apr 7, 2021 arm64

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64/mm: remove useless trans_pgd_map_page()

Since the commit 7018d467ff2d ("arm64: trans_pgd: hibernate: idmap the single page that holds the copy page routines"), trans_pgd_map_page() is useless.

Cc Catalin Marinas <[email protected]>
Cc Will Deacon <[email protected]>
Cc Pavel Tatashin <[email protected]>
Cc James Morse <[email protected]>
Cc Matthias Brugger <[email protected]>

To: [email protected]

---
 arch/arm64/include/asm/trans_pgd.h |  5 +--
 arch/arm64/mm/trans_pgd.c          | 57 ------------------------------
 2 files changed, 1 insertion(+), 61 deletions(-)
arch/arm64/include/asm/trans_pgd.h +1 -4
index 5d08e5adf3d5..9b6858c032a5 100644
@@ -15,7 +15,7 @@
 /*
  * trans_alloc_page
  *	- Allocator that should return exactly one zeroed page, if this
- *	  allocator fails, trans_pgd_create_copy() and trans_pgd_map_page()
+ *	  allocator fails, trans_pgd_create_copy() and trans_pgd_idmap_page()
  *	  return -ENOMEM error.
  *
  * trans_alloc_arg
@@ -30,9 +30,6 @@ struct trans_pgd_info {
 int trans_pgd_create_copy(struct trans_pgd_info *info, pgd_t **trans_pgd,
 			  unsigned long start, unsigned long end);
 
-int trans_pgd_map_page(struct trans_pgd_info *info, pgd_t *trans_pgd,
-		       void *page, unsigned long dst_addr, pgprot_t pgprot);
-
 int trans_pgd_idmap_page(struct trans_pgd_info *info, phys_addr_t *trans_ttbr0,
 			 unsigned long *t0sz, void *page);
 
arch/arm64/mm/trans_pgd.c +0 -57

63 lines not on this page · raw message

Signature · 7 lines
2.29.2


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#1 lore raw

Hi Pingfan,

Quoted 4 lines · Pingfan Liu

Since the commit 7018d467ff2d ("arm64: trans_pgd: hibernate: idmap the single page that holds the copy page routines"), trans_pgd_map_page() is useless.

Let's keep this function for now. This function is used in my version 11 of mmu enabled kexec patches; but not used in version 12 where we changed to a linear map instead of contiguous map. However, until the final solution for mmu-enabled kexec lands in the mainline, I think it is better to keep it.

Thank you,
Pasha

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#2 lore raw
Quoted 9 lines · Pavel Tatashin

Hi Pingfan,

Quoted 4 lines · Pingfan Liu

Since the commit 7018d467ff2d ("arm64: trans_pgd: hibernate: idmap the single page that holds the copy page routines"), trans_pgd_map_page() is useless.

Quoted 6 lines

Let's keep this function for now. This function is used in my version 11 of mmu enabled kexec patches; but not used in version 12 where we changed to a linear map instead of contiguous map. However, until the final solution for mmu-enabled kexec lands in the mainline, I think it is better to keep it.

Got it.

Thanks,
Pingfan

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel