Re: [PATCH] i386 do_machine_check() is redundant.

Linus Torvalds
2003-09-29T18:46:23Z

On Sun, 28 Sep 2003, Arjan van de Ven wrote:
> >
> > And yes, asmlinkage _can_ matter, even on x86. It disasbles regparm, for
> > one thing, so it makes a huge difference if the kernel is compiled with
> > -mregparm=3 (which used to work, and which I'd love to do, but gcc has
> > often been a tad fragile).
>
> gcc 3.2 and later are supposed to be ok (eg during 3.2 development a
> long standing bug with regparm was fixed and now is believed to work)...
> since our makefiles check gcc version already... this can be made gcc
> version dependent as well for sure..

Has anybody checked out whether the kernel works with -mregparm=3? I
forget who did a lot of the work on it originally, and it certainly _used_
to work fine. The improvements to both code size and performance were, if
I remember correctly, measurable but not huge.

One worry (apart from just broken compilers and missing "asmlinkage"
annotations) is that having compiler-version-dependent calling conventions
makes for another variable to take into account when chasing down bugs and
worrying about things like the Nvidia module etc. So it's probably not
worth doing unless the advantages are clear.

Linus