Messages in this thread | | | Date | Wed, 29 Sep 2021 10:45:17 +0200 | From | Peter Zijlstra <> | Subject | Re: [PATCH V2 16/41] x86/entry: Implement the whole error_entry() as C code |
| |
On Tue, Sep 28, 2021 at 05:34:02PM -0400, Brian Gerst wrote: > On Sun, Sep 26, 2021 at 11:13 AM Lai Jiangshan <jiangshanlai@gmail.com> wrote: > > +asmlinkage __visible __entry_text > > +struct pt_regs *error_entry(struct pt_regs *eregs) > > +{ > > + unsigned long iret_ip = (unsigned long)native_irq_return_iret; > > + > > + asm volatile ("cld"); > > The C ABI states that the direction flag must be clear on function > entry and exit, so the CLD instruction needs to remain in the asm > code.
Right, also, one of my pet peeves with out entry code is that CLD and CLAC are not next to one another.
| |