x86,64: Simplify save_regs()
authorFrederic Weisbecker <fweisbec@gmail.com>
Thu, 30 Jun 2011 23:51:22 +0000 (01:51 +0200)
committerFrederic Weisbecker <fweisbec@gmail.com>
Sat, 2 Jul 2011 16:05:31 +0000 (18:05 +0200)
commit1871853f7abc3c727c4346539c5062cbeaf016a4
treeb01f5f5f5cb44a11b4ae542cfcf813d82c62c8eb
parent47ce11a2b6519f9c7843223ea8e561eb71ea5896
x86,64: Simplify save_regs()

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: Frederic 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>
arch/x86/kernel/entry_64.S