• Frederic Weisbecker's avatar
    x86,64: Simplify save_regs() · 1871853f
    Frederic Weisbecker authored
    The save_regs function that saves the regs on low level
    irq entry is complicated because of the fact it changes
    its stack in the middle and also because it manipulates
    data allocated in the caller frame and accesses there
    are directly calculated from callee rsp value with the
    return address in the middle of the way.
    
    This complicates the static stack offsets calculation and
    require more dynamic ones. It also needs a save/restore
    of the function's return address.
    
    To simplify and optimize this, turn save_regs() into a
    macro.
    Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
    Cc: Ingo Molnar <mingo@elte.hu>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: H. Peter Anvin <hpa@zytor.com>
    Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
    Cc: Jan Beulich <JBeulich@novell.com>
    1871853f
entry_64.S 37.1 KB