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

From: Rik van Riel

Date: Wed Jan 14 2026 - 10:17:54 EST


On Wed, 2026-01-14 at 21:21 +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.
>
> Signed-off-by: Hou Wenlong <houwenlong.hwl@xxxxxxxxxxxx>

This may not create any measurable speedups, since it's
just one no-op function call in the exit path, but it
does reduce the size of the kernel on 32 bit systems where
CONFIG_BROADCAST_TLB_FLUSH is not enabled.

Reviewed-by: Rik van Riel <riel@xxxxxxxxxxx>

--
All Rights Reversed.