Re: [PATCH 1/1] Speedfreq-SMI call clobbers ECX

Stephan Diestelhorst
2008-03-06T08:38:35Z

On, March 5th 2008 16:35:20 Ingo Molnar wrote:
> * Stephan Diestelhorst <langer_mann@web.de> wrote:
> > @@ -184,7 +184,7 @@ static void speedstep_set_state (unsigne
> > __asm__ __volatile__(
> > "movl $0, %%edi\n"
> > "out %%al, (%%dx)\n"
> > - : "=b" (new_state), "=D" (result)
> > + : "=b" (new_state), "=D" (result), "=c" (ecx_clobber)
> >
> > : "a" (command), "b" (function), "c" (state), "d" (smi_port),
> > : "S" (0)
> >
> > );
>
> stupid suggestion: why not do a pusha/popa around those
> instructions, to make sure everything is restored? This isnt a
> fastpath and being conservative about SMI side-effects cannot hurt

That sounds like a sane thing to do to me. Should I provide a 'patch'?
Or leave that (and the decision about it) to the maintainer?

Regards,
Stephan