All of lore.kernel.org
 help / color / mirror / Atom feed
* [Adeos-main] fastcall and asmlinkage in x86
@ 2007-12-28 14:18 Jan Kiszka
  2007-12-28 15:43 ` Philippe Gerum
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Kiszka @ 2007-12-28 14:18 UTC (permalink / raw)
  To: Philippe Gerum; +Cc: adeos-main

[-- Attachment #1: Type: text/plain, Size: 574 bytes --]

Hi Philippe,

most of the code in arch/x86/ipipe_*.c can be pushed into some
ipipe-common.c, reducing the patch size by 10-20k and improving code
maintainability.

But one thing is currently blocking a copy&paste move: a lot of
functions that are declared fastcall on 32 bit are asmlinkage on 64 bit.
As both asmlinkage and fastcall are meaningless on 64 bit, can we safely
switch to fastcall? Or even better, could we drop that redundant
declarations totally, given that everything is fastcall on 32 bit anyway
(unless its marked asmlinkage)?

Thanks,
Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 254 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Adeos-main] fastcall and asmlinkage in x86
  2007-12-28 14:18 [Adeos-main] fastcall and asmlinkage in x86 Jan Kiszka
@ 2007-12-28 15:43 ` Philippe Gerum
  0 siblings, 0 replies; 2+ messages in thread
From: Philippe Gerum @ 2007-12-28 15:43 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: adeos-main

Jan Kiszka wrote:
> Hi Philippe,
> 
> most of the code in arch/x86/ipipe_*.c can be pushed into some
> ipipe-common.c, reducing the patch size by 10-20k and improving code
> maintainability.
>
> But one thing is currently blocking a copy&paste move: a lot of
> functions that are declared fastcall on 32 bit are asmlinkage on 64 bit.

2.4/x86 legacy that survived.

> As both asmlinkage and fastcall are meaningless on 64 bit, can we safely
> switch to fastcall?

Yes.

 Or even better, could we drop that redundant
> declarations totally, given that everything is fastcall on 32 bit anyway
> (unless its marked asmlinkage)?
> 

I see -mregparm=3 unconditionally set in arch/x86/Makefile_32, so this
should work. Looking at some assembly call sites (exception
handling/diversion) tends to confirm this; AFAIR we should not have any
regparm(0) code anywhere. Well, if we still do have some, you will be
the first to know...

-- 
Philippe.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-12-28 15:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-28 14:18 [Adeos-main] fastcall and asmlinkage in x86 Jan Kiszka
2007-12-28 15:43 ` Philippe Gerum

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.