Go Back   nV News Forums > Linux Support Forums > NVIDIA Linux

Newegg Daily Deals

Reply
 
Thread Tools
Old 08-09-07, 07:47 AM   #1
kazikcz
Registered User
 
Join Date: Aug 2007
Posts: 3
Default [patch] x86-1.0-9639-pkg1 fix for 2.6.22 and 2.6.23rc2

Hello,

I guess you guys noticed that the legacy 9639 for x86 doesn't compile anymore for the new linux kernels already. I didn't see anyone fixing that so I'd like to share with you with my 2 patches.

1st one refers to the changes to kmem_cache in the kernel, which is a struct now, not a typedef kmem_cache_t. apply this if you compile for 2.6.22 or newer.
2nd one refers to the changes of kmem_cache_create() prototype, which takes one parameter less now. also the unregister_chrdev seems to return void, so checking for it's value is nonsense. apply this if you compile for 2.6.23rc2.


Regards,
-- Michał Kazior.
Attached Files
File Type: txt linux-2.6.22-fix.patch.txt (584 Bytes, 135 views)
File Type: txt linux-2.6.23rc2-fix.patch.txt (1.7 KB, 159 views)
kazikcz is offline   Reply With Quote
Old 08-09-07, 10:34 AM   #2
hmrct
Registered User
 
Join Date: Aug 2007
Posts: 23
Default Re: [patch] x86-1.0-9639-pkg1 fix for 2.6.22 and 2.6.23rc2

I'm seeing another build problem with 2.6.23-rc2 not addressed by your patches. There's an unresolved "__you_cannot_kmalloc_that_much" symbol. Compiler is gcc-3.4.6. Any idea how to get past this issue? Thanks!
hmrct is offline   Reply With Quote
Old 08-09-07, 10:52 AM   #3
kazikcz
Registered User
 
Join Date: Aug 2007
Posts: 3
Default Re: [patch] x86-1.0-9639-pkg1 fix for 2.6.22 and 2.6.23rc2

Quote:
Originally Posted by hmrct
I'm seeing another build problem with 2.6.23-rc2 not addressed by your patches. There's an unresolved "__you_cannot_kmalloc_that_much" symbol. Compiler is gcc-3.4.6. Any idea how to get past this issue? Thanks!
Does this pop-up when you compile the module, or when you try to insert it into the kernel ?

It looks to me, that your compiler fails at this one. Depending on your answer, I may come up with a solution.

Do you use SLAB or SLUB as your SLAB allocator ?


Regards,
Michał Kazior.
kazikcz is offline   Reply With Quote
Old 08-09-07, 11:51 AM   #4
hmrct
Registered User
 
Join Date: Aug 2007
Posts: 23
Default Re: [patch] x86-1.0-9639-pkg1 fix for 2.6.22 and 2.6.23rc2

It appears as a warning during the build (the modpost phase), and as an error when you try to insmod.

I'm using the SLAB allocator. I suppose it could be a compiler issue: I'm using gcc-3.4.6 on a Slackware system.
hmrct is offline   Reply With Quote
Old 08-09-07, 12:02 PM   #5
kazikcz
Registered User
 
Join Date: Aug 2007
Posts: 3
Default Re: [patch] x86-1.0-9639-pkg1 fix for 2.6.22 and 2.6.23rc2

Quote:
Originally Posted by hmrct
It appears as a warning during the build (the modpost phase), and as an error when you try to insmod.

I'm using the SLAB allocator. I suppose it could be a compiler issue: I'm using gcc-3.4.6 on a Slackware system.
There are two possibilities I see now, that can cause this unresolved symbol:
1. Your compiler is broken, and can't handle the slab header file as it is now. The "__you_cannot_kmalloc_that_much()" is being extern'ed and a call is issued in the code. I don't quite understand it myself quite well yet and "__builtin_constant_p()" is rather a mystery to me.
2. The nvidia driver uses a depracated way of calling kmalloc() against SLAB.. but I'd doubt that.

Possible solution for this: select SLUB allocator instead of SLAB and recompile (ouch) the kernel. The SLUB (slub's headers) doesn't contain the "__you_cannot_kmalloc_that_much()" symbol in it, so it should help.


Regards,
Michał Kazior.
kazikcz is offline   Reply With Quote
Old 08-09-07, 03:35 PM   #6
hmrct
Registered User
 
Join Date: Aug 2007
Posts: 23
Default Re: [patch] x86-1.0-9639-pkg1 fix for 2.6.22 and 2.6.23rc2

I just upgraded from gcc-3.4.6 to gcc-4.1.2 from the Slackware 12.0 distribution. After I get the kernel rebuilt and try building the driver again, I'll report back as to whether the compiler change made a difference.
hmrct is offline   Reply With Quote
Old 08-09-07, 06:30 PM   #7
hmrct
Registered User
 
Join Date: Aug 2007
Posts: 23
Default Re: [patch] x86-1.0-9639-pkg1 fix for 2.6.22 and 2.6.23rc2

Upgrading to gcc-4.1.2 fixed this problem for me.
hmrct is offline   Reply With Quote
Reply


Thread Tools

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 On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 11:42 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.