lkml.org 
[lkml]   [2022]   [Oct]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/6] x86/gsseg: move local ir q save/restore() into asm load gs index()
On October 7, 2022 7:50:01 AM PDT, Peter Zijlstra <peterz@infradead.org> wrote:
>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.

They pop and and are needed for the sti anyway, and so might as well be leveraged here, too.

\
 
 \ /
  Last update: 2022-10-07 19:48    [W:0.078 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site