Re: rename 'unused' in sys_iopl to somethign else, since it is used

Andi Kleen (ak@suse.de)
Tue, 30 Jul 2002 06:25:52 +0200


On Tue, Jul 30, 2002 at 11:02:33AM +1000, Rusty Russell wrote:
> In message <20020728141256.GA9573@alhambra.actcom.co.il> you write:
> > sys_iopl on i386 accepts one parameter, 'unsigned long unused'. Then
> > it goes ahead and uses it to get a pointer to struct pt_regs. This
> > patch changes its name to 'location'.=20
>
> Hmmm.... Andi, the x86_64 version is different: do you really push one
> arg on the stack then the regs? Please check...

level is in a register (rdi), but pt_regs is on the stack. The calling
convention automatically switches to stack location for structures bigger
than one register.

On i386 it is probably cleanest when you need both pt_regs and arguments
to declare pt_regs only and get the first argument directly out of regs->ebx.

-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/