Re: [PATCH v2] x86/mm: Hide mm_free_global_asid() definition under 'CONFIG_BROADCAST_TLB_FLUSH'

From: Borislav Petkov

Date: Thu Jan 15 2026 - 04:15:36 EST


On Thu, Jan 15, 2026 at 11:38:34AM +0800, Hou Wenlong wrote:
> When 'CONFIG_BROADCAST_TLB_FLUSH' is not enabled, mm_free_global_asid()
> remains a globally visible symbol and generates a useless function call
> to it in destroy_context(). Therefore, hide the mm_free_global_asid()
> definition under 'CONFIG_BROADCAST_TLB_FLUSH' and provide a static
> inline empty version when it is not enabled to remove the function call.
>
> Reviewed-by: Rik van Riel <riel@xxxxxxxxxxx>
> Signed-off-by: Hou Wenlong <houwenlong.hwl@xxxxxxxxxxxx>
> ---
> v1->v2:
> Keep the declarations of mm_init_global_asid() and mm_free_global_asid()
> in 'asm/mmu_context.h' to fix the compilation failure of module
> building.
> ---
> arch/x86/include/asm/mmu_context.h | 2 --
> arch/x86/include/asm/tlbflush.h | 3 +++
> arch/x86/mm/tlb.c | 4 ++--
> 3 files changed, 5 insertions(+), 4 deletions(-)

Did you run the build tests I asked you to do before you sent this?

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette