lkml.org 
[lkml]   [2020]   [May]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [patch V4 part 5 02/31] x86/entry: Provide helpers for execute on irqstack
Date
Alexandre Chartre <alexandre.chartre@oracle.com> writes:
> On 5/5/20 3:53 PM, Thomas Gleixner wrote:
>> + __this_cpu_add(irq_count, 1); \
>> + asm volatile( \
>> + "pushq %%rbp \n" \
>> + "movq %%rsp, %%rbp \n" \
>> + "movq %%rsp, (%[ts]) \n" \
>> + "movq %[ts], %%rsp \n" \
>> + "1: \n" \
>> + " .pushsection .discard.instr_begin \n" \
>> + " .long 1b - . \n" \
>> + " .popsection \n" \
>> + "call " __ASM_FORM(func) " \n" \
>> + "2: \n" \
>> + " .pushsection .discard.instr_end \n" \
>> + " .long 2b - . \n" \
>> + " .popsection \n" \
>> + "popq %%rsp \n" \
>> + "leaveq \n" \
>> + : \
>> + : [ts] "r" (tos) \
>> + : "memory" \
>> + ); \
>> + __this_cpu_sub(irq_count, 1); \
>> +}
>
> The pushsection/popsection discard.instr_begin/end sequences are used several
> times in asm() statement at different places, so I wonder if it might be worth
> having a macro.

As discussed elsewhere this is going to move to ASM partially and the
various variants are not longer necessary.

Thanks,

tglx

\
 
 \ /
  Last update: 2020-05-11 13:55    [W:0.139 / U:0.408 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site