]> www.infradead.org Git - linux.git/commit
x86/mm: Introduce kernel_ident_mapping_free()
authorKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Fri, 14 Jun 2024 09:59:02 +0000 (12:59 +0300)
committerBorislav Petkov (AMD) <bp@alien8.de>
Mon, 17 Jun 2024 15:46:22 +0000 (17:46 +0200)
commitd88e7b3e35cff2c318042990d70828f64c3ae296
tree3f0f608d97a95e8dce83b8ef6fe4510efab06e38
parent26ba7353caaa7140561d3f7693a77a3eb68c722c
x86/mm: Introduce kernel_ident_mapping_free()

The helper complements kernel_ident_mapping_init(): it frees the identity
mapping that was previously allocated. It will be used in the error path to free
a partially allocated mapping or if the mapping is no longer needed.

The caller provides a struct x86_mapping_info with the free_pgd_page() callback
hooked up and the pgd_t to free.

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Acked-by: Kai Huang <kai.huang@intel.com>
Tested-by: Tao Liu <ltao@redhat.com>
Link: https://lore.kernel.org/r/20240614095904.1345461-18-kirill.shutemov@linux.intel.com
arch/x86/include/asm/init.h
arch/x86/mm/ident_map.c