]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit51573fee69da28b59ae987e1565d95a5c76449c9
treeb01f5f5f5cb44a11b4ae542cfcf813d82c62c8eb
parent21643e75a4359b0fc03330d00a36639920056a1d
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