LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 11-05-2005, 08:18 AM   #1
jcart
LQ Newbie
 
Registered: Oct 2005
Posts: 3

Rep: Reputation: 0
SL10 kernel module compile errors


Jan:
As you know I have been developing & shipping SATA with RAID drivers for linux (uses scsi_mod), but still feel I am a kernel newbie. Below is a code snippet. On SLES 9 (kernel 2.6.5 and older including 2.4) the driver works great. But on SL10 (2.6.13) the code snippet below causes the compiler to generate a call to memcpy(). Using NLKD I can step thru the code. I see that the compiler is pushing all three args on the stack, but memcpy() is expecting some of the args in regs. On SLES 9 (2.6.5) the compiler generates the code inline and it works.
On SL10 I changed my make file to use -O2 which causes this code to be inlined, but now my driver just goes off into never never land somewhere, no crash, kernel just hangs.
Any suggestions? Where should I post this?

PCHAR modes[] = {"pio-0", "pio-1", "pio-2", "pio-3","pio-4", "mdma-0", "mdma-1","mdma-2", "udma-0", "udma-1","udma-2", "udma-3", "udma-4","udma-5"};

Thanks
Joe
 
Old 11-08-2005, 09:22 AM   #2
jcart
LQ Newbie
 
Registered: Oct 2005
Posts: 3

Original Poster
Rep: Reputation: 0
Joe,

This sounds like an inconsistent build environment * are you making
sure you use the normal kbuild environment to build the module? The
compiler must be run with consistent settings (in this case -mregparm=3
due to CONFIG_REGPARM). Unless gcc 4.0.x has a bug where it doesn't
honor this when calling expansions for builtins. You'd need to verify
the command line options stored in the .*.o.cmd files to determine what
happens.

As to the hang when using -O2 (you having to use this makes me very
suspicious regarding the above mentioned consistency needs), I don't
think you can reasonably report anything before finding out what causes
the hang (and where). But maybe this goes away when the above gets
addressed...

Jan
Having -mregparm=3 in all three makefiles of the driver solved the problem.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Sl10.1 Kernel lestoil Slackware 2 08-13-2005 11:07 AM
why there is so many errors to compile a module ,help me! qqrilxk Programming 3 03-30-2005 08:57 PM
2.6.11 kernel compile - sound module insertion errors dibblethewrecke Linux - Hardware 3 03-17-2005 11:50 PM
can i compile just one kernel module whithout recompiling the whole kernel? edman007 Linux - Software 3 02-17-2004 03:05 PM
errors attempting to compile nvaudio module lasalsademuerte Slackware 2 12-02-2003 05:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 06:17 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration