Re: [PATCH 4/6] x86/gsseg: move local_irq_save/restore() into asm_load_gs_index()

From: Peter Zijlstra
Date: Fri Oct 07 2022 - 10:50:18 EST


On Thu, Oct 06, 2022 at 08:40:39AM -0700, Xin Li wrote:
> SYM_FUNC_START(asm_load_gs_index)
> FRAME_BEGIN
> + pushf
> + pop %rax
> + andl $X86_EFLAGS_IF, %eax /* Interrupts enabled? */
> + jz 1f
> + cli
> +1:

Why the pop,andl,jz ? AFAICT our arch_local_irq_save() doesn't even
bother with that, why does this function.