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

From: Linus Torvalds
Date: Mon Sep 29 2003 - 13:47:03 EST



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

-
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/