Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
SUSE / openSUSE This Forum is for the discussion of Suse Linux.


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

Rep: Reputation: 0
SL10 kernel module compile errors

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"};

Old 11-08-2005, 10:22 AM   #2
LQ Newbie
Registered: Oct 2005
Posts: 3

Original Poster
Rep: Reputation: 0

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

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

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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 12:07 PM
why there is so many errors to compile a module ,help me! qqrilxk Programming 3 03-30-2005 09:57 PM
2.6.11 kernel compile - sound module insertion errors dibblethewrecke Linux - Hardware 3 03-18-2005 12:50 AM
can i compile just one kernel module whithout recompiling the whole kernel? edman007 Linux - Software 3 02-17-2004 04:05 PM
errors attempting to compile nvaudio module lasalsademuerte Slackware 2 12-02-2003 06:43 PM > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 05:19 AM.

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