* Linux-2.6.5-1.358 SMP
@ 2004-10-05 22:58 Richard B. Johnson
2004-10-05 23:05 ` Jan Dittmer
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Richard B. Johnson @ 2004-10-05 22:58 UTC (permalink / raw)
To: Linux kernel
Hello,
I almost have everything converted over from 2.4.26 to
2.6.whatever.
I need to make some modules that have lots of assembly code.
This assembly uses the UNIX calling convention and can't be
re-written (it would take many months). The new kernel
is compiled with "-mregparam=2". I can't find where that's
defined. I need to remove it because I cannot pass parameters
to the assembly stuff in registers.
Where is it defined??? I grepped through all the scripts and
the hidden files, but I can't discover where it's defined.
Cheers,
Dick Johnson
Penguin : Linux version 2.4.26 on an i686 machine (5570.56 BogoMips).
Note 96.31% of all statistics are fiction.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Linux-2.6.5-1.358 SMP
2004-10-05 22:58 Linux-2.6.5-1.358 SMP Richard B. Johnson
@ 2004-10-05 23:05 ` Jan Dittmer
2004-10-05 23:09 ` Richard B. Johnson
2004-10-05 23:06 ` Nathan Bryant
2004-10-05 23:47 ` Roland Dreier
2 siblings, 1 reply; 7+ messages in thread
From: Jan Dittmer @ 2004-10-05 23:05 UTC (permalink / raw)
To: root; +Cc: Linux kernel
Richard B. Johnson wrote:
> Hello,
>
> I almost have everything converted over from 2.4.26 to
> 2.6.whatever.
>
> I need to make some modules that have lots of assembly code.
> This assembly uses the UNIX calling convention and can't be
> re-written (it would take many months). The new kernel
> is compiled with "-mregparam=2". I can't find where that's
> defined. I need to remove it because I cannot pass parameters
> to the assembly stuff in registers.
>
> Where is it defined??? I grepped through all the scripts and
> the hidden files, but I can't discover where it's defined.
You don't mean CONFIG_REGPARM=n:
arch/i386/Makefile:cflags-$(CONFIG_REGPARM) += $(shell if [
$(GCC_VERSION) -ge 0300 ] ; then echo "-mregparm=3"; fi ;)
?
Jan
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Linux-2.6.5-1.358 SMP
2004-10-05 22:58 Linux-2.6.5-1.358 SMP Richard B. Johnson
2004-10-05 23:05 ` Jan Dittmer
@ 2004-10-05 23:06 ` Nathan Bryant
2004-10-05 23:47 ` Roland Dreier
2 siblings, 0 replies; 7+ messages in thread
From: Nathan Bryant @ 2004-10-05 23:06 UTC (permalink / raw)
To: root; +Cc: Linux kernel
Richard B. Johnson wrote:
> Hello,
>
> I almost have everything converted over from 2.4.26 to
> 2.6.whatever.
>
> I need to make some modules that have lots of assembly code.
> This assembly uses the UNIX calling convention and can't be
> re-written (it would take many months). The new kernel
> is compiled with "-mregparam=2". I can't find where that's
> defined. I need to remove it because I cannot pass parameters
> to the assembly stuff in registers.
>
> Where is it defined??? I grepped through all the scripts and
> the hidden files, but I can't discover where it's defined.
In the 2.6.8 that's shipping in Fedora, it's a config option: CONFIG_REGPARM
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Linux-2.6.5-1.358 SMP
2004-10-05 23:05 ` Jan Dittmer
@ 2004-10-05 23:09 ` Richard B. Johnson
0 siblings, 0 replies; 7+ messages in thread
From: Richard B. Johnson @ 2004-10-05 23:09 UTC (permalink / raw)
To: Jan Dittmer; +Cc: Linux kernel
On Wed, 6 Oct 2004, Jan Dittmer wrote:
> Richard B. Johnson wrote:
> > Hello,
> >
> > I almost have everything converted over from 2.4.26 to
> > 2.6.whatever.
> >
> > I need to make some modules that have lots of assembly code.
> > This assembly uses the UNIX calling convention and can't be
> > re-written (it would take many months). The new kernel
> > is compiled with "-mregparam=2". I can't find where that's
> > defined. I need to remove it because I cannot pass parameters
> > to the assembly stuff in registers.
> >
> > Where is it defined??? I grepped through all the scripts and
> > the hidden files, but I can't discover where it's defined.
>
> You don't mean CONFIG_REGPARM=n:
>
> arch/i386/Makefile:cflags-$(CONFIG_REGPARM) += $(shell if [
> $(GCC_VERSION) -ge 0300 ] ; then echo "-mregparm=3"; fi ;)
>
> ?
Okay. Thanks. I wouldn't have guessed what to look for.
Cheers,
Dick Johnson
Penguin : Linux version 2.4.26 on an i686 machine (5570.56 BogoMips).
Note 96.31% of all statistics are fiction.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Linux-2.6.5-1.358 SMP
2004-10-05 22:58 Linux-2.6.5-1.358 SMP Richard B. Johnson
2004-10-05 23:05 ` Jan Dittmer
2004-10-05 23:06 ` Nathan Bryant
@ 2004-10-05 23:47 ` Roland Dreier
2004-10-05 23:59 ` root
2 siblings, 1 reply; 7+ messages in thread
From: Roland Dreier @ 2004-10-05 23:47 UTC (permalink / raw)
To: root; +Cc: Linux kernel
Richard> I need to make some modules that have lots of assembly
Richard> code. This assembly uses the UNIX calling convention and
Richard> can't be re-written (it would take many months). The new
Richard> kernel is compiled with "-mregparam=2". I can't find
Richard> where that's defined. I need to remove it because I
Richard> cannot pass parameters to the assembly stuff in
Richard> registers.
You should be able to use CONFIG_REGPARM to control this. Another
option is just to mark the functions in your source as "asmlinkage"
(which is defined to "__attribute__((regparm(0)))" in
asm-i386/linkage.h). The advantage of using asmlinkage is that your
code will work with anyone's kernel.
- Roland
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Linux-2.6.5-1.358 SMP
2004-10-05 23:47 ` Roland Dreier
@ 2004-10-05 23:59 ` root
2004-10-06 0:30 ` Roland Dreier
0 siblings, 1 reply; 7+ messages in thread
From: root @ 2004-10-05 23:59 UTC (permalink / raw)
To: Roland Dreier; +Cc: Linux kernel
On Tue, 5 Oct 2004, Roland Dreier wrote:
> Richard> I need to make some modules that have lots of assembly
> Richard> code. This assembly uses the UNIX calling convention and
> Richard> can't be re-written (it would take many months). The new
> Richard> kernel is compiled with "-mregparam=2". I can't find
> Richard> where that's defined. I need to remove it because I
> Richard> cannot pass parameters to the assembly stuff in
> Richard> registers.
>
> You should be able to use CONFIG_REGPARM to control this. Another
> option is just to mark the functions in your source as "asmlinkage"
> (which is defined to "__attribute__((regparm(0)))" in
> asm-i386/linkage.h). The advantage of using asmlinkage is that your
> code will work with anyone's kernel.
>
> - Roland
>
Ahah! I just put that in the headers that define the functions??
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Linux-2.6.5-1.358 SMP
2004-10-05 23:59 ` root
@ 2004-10-06 0:30 ` Roland Dreier
0 siblings, 0 replies; 7+ messages in thread
From: Roland Dreier @ 2004-10-06 0:30 UTC (permalink / raw)
To: root; +Cc: Linux kernel
root> Ahah! I just put that in the headers that define the functions??
I'm not enough of a gcc expert to know for sure, but I think you need
it in both the functions and the actual source. You can grep the
kernel source for "asmlinkage" to find dozens of examples of its use.
- Roland
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2004-10-06 0:30 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-05 22:58 Linux-2.6.5-1.358 SMP Richard B. Johnson
2004-10-05 23:05 ` Jan Dittmer
2004-10-05 23:09 ` Richard B. Johnson
2004-10-05 23:06 ` Nathan Bryant
2004-10-05 23:47 ` Roland Dreier
2004-10-05 23:59 ` root
2004-10-06 0:30 ` Roland Dreier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox