From: "linux-os (Dick Johnson)" <linux-os@analogic.com>
To: "Sam Ravnborg" <sam@ravnborg.org>
Cc: "Lennart Sorensen" <lsorense@csclub.uwaterloo.ca>,
"Linux kernel" <linux-kernel@vger.kernel.org>
Subject: Re: Trying to convert old modules to newer kernels
Date: Thu, 20 Dec 2007 18:05:48 -0500 [thread overview]
Message-ID: <Pine.LNX.4.61.0712201757410.9907@chaos.analogic.com> (raw)
In-Reply-To: <20071220220547.GA5641@uranus.ravnborg.org>
On Thu, 20 Dec 2007, Sam Ravnborg wrote:
> On Thu, Dec 20, 2007 at 04:27:37PM -0500, linux-os (Dick Johnson) wrote:
>>
>> On Thu, 20 Dec 2007, Sam Ravnborg wrote:
>>
>>>>
>>>> It never gets to the printk(). You were right about the
>>>> compilation. Somebody changed the kernel to compile with
>>>> parameter passing in REGISTERS! This means that EVERYTHING
>>>> needs to be compiled the same way, 'C' calling conventions
>>>> were not good enough!
>>>
>>> How did you build the module. It reads like you failed to use
>>> kbuild to build your module which is why you did not pass
>>> correct options to gcc - correct?
>>>
>>> If you did not use kbuild - why not?
>>> Is there anything missing you need?
>>>
>>> Sam
>>>
>>
>> I need to get rid of -mregparm=3 on gcc's command line. It
>> is completely incompatible with the standard calling conventions
>> used in all our assembly-language files in our drivers. We make
>> very high-speed number-crunching drivers that munge high-speed
>> data into images. We need to do that in assembly as we have
>> always done.
> That I understand. So you need a CONFIG_ option to switch off
> -regparm=3 and pray that the kernel assembly supports it.
>
> And then I assume you avoided kbuild because it added -regparm=3
> which is why your simple module broke.
>
> As you are well aware there is not any testing of a kernel without
> -regparm=3 these days so you should strongly consider making your
> assembly module comply with -regparm=3.
>
> And no - I dunno how much work that is and what impact it has
> on your number chrunching stuff.
> But it looks like the only sane long-term solution to me.
>
> Sam
>
I may be able to make a file full of "adapters" if I
can figure out how to have a procedure that gets
called with parameters in registers, with it calling
conventional stuff. There used to be a macro, "asmlinkage"
that corrected the calling conventions for assembly-language
procedures. I will try to see what it did in some
older kernels. It got taken out of newer ones.
Cheers,
Dick Johnson
Penguin : Linux version 2.6.22.1 on an i686 machine (5588.29 BogoMips).
My book : http://www.AbominableFirebug.com/
_
****************************************************************
The information transmitted in this message is confidential and may be privileged. Any review, retransmission, dissemination, or other use of this information by persons or entities other than the intended recipient is prohibited. If you are not the intended recipient, please notify Analogic Corporation immediately - by replying to this message or by sending an email to DeliveryErrors@analogic.com - and destroy all copies of this information, including any attachments, without reading or disclosing them.
Thank you.
next prev parent reply other threads:[~2007-12-20 23:06 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-19 20:10 linux-os (Dick Johnson)
2007-12-19 20:23 ` Lennart Sorensen
2007-12-19 20:56 ` linux-os (Dick Johnson)
2007-12-20 15:02 ` Lennart Sorensen
2007-12-20 16:13 ` linux-os (Dick Johnson)
2007-12-20 16:27 ` Lennart Sorensen
2007-12-20 21:23 ` linux-os (Dick Johnson)
2007-12-20 21:40 ` Roland Dreier
2007-12-20 22:56 ` linux-os (Dick Johnson)
2007-12-21 14:39 ` Lennart Sorensen
2007-12-21 16:37 ` linux-os (Dick Johnson)
2007-12-29 14:19 ` Jon Masters
2007-12-20 18:28 ` Sam Ravnborg
2007-12-20 21:27 ` linux-os (Dick Johnson)
2007-12-20 22:05 ` Sam Ravnborg
2007-12-20 23:05 ` linux-os (Dick Johnson) [this message]
2007-12-20 23:53 ` J.A. Magallón
2007-12-21 12:08 ` James Courtier-Dutton
2007-12-21 12:43 ` Jan Engelhardt
2007-12-27 0:17 ` Bill Davidsen
2007-12-21 14:43 ` Lennart Sorensen
2007-12-21 16:39 ` linux-os (Dick Johnson)
2007-12-27 0:19 ` Bill Davidsen
2007-12-19 20:47 ` Jan Engelhardt
2007-12-19 21:10 ` linux-os (Dick Johnson)
2007-12-19 21:16 ` Jan Engelhardt
2007-12-19 20:52 ` Sam Ravnborg
[not found] <9CdyE-1A6-7@gated-at.bofh.it>
[not found] ` <9CdIw-1Op-29@gated-at.bofh.it>
[not found] ` <9Cebz-2sz-29@gated-at.bofh.it>
[not found] ` <9Cvcw-5mu-15@gated-at.bofh.it>
[not found] ` <9CwhY-76J-11@gated-at.bofh.it>
[not found] ` <9Cyk3-1Zc-29@gated-at.bofh.it>
[not found] ` <9CB8a-6zV-13@gated-at.bofh.it>
2007-12-21 0:16 ` Bodo Eggert
2007-12-21 13:11 ` linux-os (Dick Johnson)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.61.0712201757410.9907@chaos.analogic.com \
--to=linux-os@analogic.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lsorense@csclub.uwaterloo.ca \
--cc=sam@ravnborg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®