Re: [PATCH 3/6] x86,64: Simplify save_regs()

From: Frederic Weisbecker
Date: Mon Jul 04 2011 - 08:57:53 EST


On Mon, Jul 04, 2011 at 08:20:51AM +0100, Jan Beulich wrote:
> >>> On 02.07.11 at 18:29, Frederic Weisbecker <fweisbec@xxxxxxxxx> wrote:
> > 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.
>
> So this got pulled out into a function a couple of releases ago,
> and now it's being converted back? Wasn't the original patch's
> intention to reduce the amount of duplication of generated
> code?

Right. I didn't know there was a conversion a while ago for
this save_regs() from a macro to a func in order to remove
code duplication.

I really did not think about code duplication, considering
it's better to optimize the irq entry path.

What do you guys think? We can still revert the whole patchset.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/