# Nvidia Kernel 1.0.6111 Fix for mm-sources thread

## DaMouse

Overlay: http://ck.dbdfleet.net/nvidia-kernel-1.0.6111-r1.tar.bz2

Problem was pci_find_class switched to pci_get_class, re-emerge nvidia-kernel (mine is badged as -r1 as there is only the first revision available at time of writing)

-DaMouse

----------

## Rainmaker

/me hails damouse. Thanks. Gonna try it now.

*edit: YES!!! finally, the nvidia drivers on mm again! Works even faster now then on nitro-6. Especially the hard-disk-activity problem I've been having..  Thank you!

----------

## Ateo

Thanks for the patch!

----------

## bulletman

Thanks much!  (Types from X ...)

Stephen

----------

## marsclic

Yes!   :Very Happy:   Many many thanks for the patch DaMouse!

----------

## Bithammer

how to apply this patch ?

----------

## Bithammer

Please i know i am a n00b plese tell me how to fix the damm nvidia thing.

I am trying to get gentoo to run over a week now, and i need the 2.6.9-rc1 kernel to have acpi for my mobo, but i need this fix, tell me how to apply it please  :Wink: 

Edit

Ok, i llike the search function of this forum, but some information needs to be more obvious i think. The description i used is this one to install the patch :

Edit

 *Quote:*   

> 
> 
> By the way why do you take a 2.4.20 kernel and try to patch it with gentoo's patches for 2.4.22-r5 ? the emerge gentoo-sources applies all the patches by itself.
> 
> Ok, let's suppose you have a good reason and would really like to have a 2.4.20 with the latest gentoo-sources-patches.
> ...

 

----------

## Bithammer

the nvidia kernel works now without reporting any error, But the Nvidia glx extensions wont load for the x server, he just stops, eg. displays the nvida logo and exits with the message could not load the glx extensions ...

AGP mode is falling back to 2x i see in dmesg, i use the 865 chipset driver.

Evrything in dmesg seems to be fine now, no error reporting, and if i cat the nvidia settings at proc he states my ti4600 which runs perfectly ok on my win XP partition even with agp 4x....

Is there some option to set the agp mode at the kernel boot ? Ok silly questing i search the forums, and if i dont find anything i edit this post  :Wink: 

----------

## stahlsau

thx very much for that ebuild!

----------

## provicemo

Thank you very much

----------

## cyfred

As I've commented on https://bugs.gentoo.org/show_bug.cgi?id=62474

This fix is to rudimentary for the portage tree -- We need something that is going to be backward compatible. Ive made up a patch and attached it to the above bug, it would be nice if some people can test it out in both 2.6.9 and 2.6.<9 kernels

It works here and if it works for others ill put it in the tree (which I'd like to have happen before 2.6.9 is released)

Direct link to attachment https://bugs.gentoo.org/attachment.cgi?id=39625&action=view

----------

## logics

For those curious on how to create an overlay, here are the steps you can take to get this into your tree.

(NOTE: I don't have an nvidia to test these steps... so if I mistyped a step or it doesn't work, post the problem and we should be able to get it fixed)

Create the overlay:

```
DIR=/usr/portage/overlay

mkdir $DIR

echo "PORTDIR_OVERLAY=$DIR" >> /etc/make.conf

```

Add the nvidia overlay:

```
cd $DIR

wget -O - http://ck.dbdfleet.net/nvidia-kernel-1.0.6111.tar.bz2 | tar xjv

```

Set up the keyword mask for this package so you can use it (its masked ~x86)

```
if [ ! -d /etc/portage ]; then mkdir /etc/portage; fi

echo "media-video/nvidia-kernel ~x86" >> /etc/portage/package.keywords

```

emerge away...

```
emerge -up nvidia-kernel

# Verify that it is going to install 1.0.6111-r1

emerge -u nvidia-kernel

```

And away you go...  good luck.

James

----------

## DaMouse

 *cyfred wrote:*   

> As I've commented on https://bugs.gentoo.org/show_bug.cgi?id=62474
> 
> This fix is to rudimentary for the portage tree -- We need something that is going to be backward compatible. Ive made up a patch and attached it to the above bug, it would be nice if some people can test it out in both 2.6.9 and 2.6.<9 kernels
> 
> It works here and if it works for others ill put it in the tree (which I'd like to have happen before 2.6.9 is released)
> ...

 

Seems clean enough, not sure if you can do an #ifdef FUNC at all..

-DaMouse

----------

## AstralStorm

With kernel 2.6.9-rc2-mm1 I get this:

nvidia: Unknown symbol __VMALLOC_RESERVE

Using GCC 3.4.2, I'll try the kernel with GCC 3.3.4 too.

Does anybody has a workaround for that?

----------

## DaMouse

Yeah.. i got it covered, two secs  :Smile: 

-DaMouse

----------

## DaMouse

can i have some testers please  :Smile:  I changed my pci_find_class patch for the one in bugzilla

-DaMouse

http://svn.esuna.co.uk/esuna/damouse-portage/media-video/nvidia-kernel/

----------

## AstralStorm

Won't that vmalloc-reserve patch cause 'Symbol redefined' warnings with kernels other than 2.6.9-rc2?

What about a configure test like the other one?

I'll say if it works when I restart. Compiling OOXimian for some hours.

EDIT: OK, finished. Restarting... (due to gcc 3.4 vs 3.3) Wish me luck.  :Wink: 

(BTW, kexec is great.  :Smile:  I've created /etc/init.d/kexec and modded /etc/init.d/reboot.sh. Now I only need to add an ebuild and have some testers. Works great here.)

----------

## DaMouse

 *AstralStorm wrote:*   

> Won't that vmalloc-reserve patch cause 'Symbol redefined' warnings with kernels other than 2.6.9-rc2?
> 
> What about a configure test like the other one?
> 
> I'll say if it works when I restart. Compiling OOXimian for some hours.
> ...

 

I'm hoping and praying that nvidia wont break others with the vmalloc patch.

-DaMouse

----------

## Ateo

Worked fine for me against => 2.6.9-rc2-mm1.

Is that cd writer bug still lingering? Or is it just me?

----------

## nbensa

 *AstralStorm wrote:*   

> (BTW, kexec is great.  I've created /etc/init.d/kexec and modded /etc/init.d/reboot.sh. Now I only need to add an ebuild and have some testers. Works great here.)

 

How do you use kexec? Can you post your scripts?

Thanks!!

Norberto

----------

## DaMouse

 *Ateo wrote:*   

> Worked fine for me against => 2.6.9-rc2-mm1.
> 
> Is that cd writer bug still lingering? Or is it just me?

 

I think its still there  :Smile:  hopefully some program can fix it for us.

-DaMouse

----------

## AstralStorm

Your patch works fine here too.

Kexec-tools ebuild is available here: link

It will speed up your restart time and allow you to easily boot different kernel images.

Add it like this: rc-update add kexec default

Don't forget to check the config file in /etc/conf.d/kexec

By default, this kexec script sets itself to boot your current kernel from /boot/vmlinuz-`uname -r` (to suit make install), you can of course override it in config file or on command line:

KNAME="mygentookernel" KPARAM="elevator=none" /etc/init.d/kexec restart

To disable kexec, you don't stop it, but instead:

KNAME="-" /etc/init.d/kexec restart

If you have a kernel image named -, please tell me.  :Rolling Eyes: Last edited by AstralStorm on Fri Sep 17, 2004 5:30 pm; edited 1 time in total

----------

## DaMouse

kexec is cool but for the average user without it patched in or without it enabled.. i find a reboot is just as painless..

-DaMouse

----------

## AstralStorm

The script doesn't interfere with normal rebooting in any way if there's no kexec

and as such could probably be added to portage.

Maybe kexec will be included in 2.6.9, who knows.

More comments at the Bug 50313

----------

## DaMouse

You got a bugzilla entry to linky?  :Smile: 

-DaMouse

----------

## AstralStorm

Updated the file at the 'mirror' to the version at bugzilla.

BTW, it's your entry.

This thread needs a split, any mod here?

----------

## DaMouse

Anyone tested my last ebuild with a non-mm kernel?

-DaMouse

----------

## AstralStorm

Well, I'm just trying to impose some mm patches upon latest ck for 2.6.9-rc2,

kexec included...

----------

## mb

@AstralStrom

in order to fix

```

nvidia: Unknown symbol __VMALLOC_RESERVE

```

add 

```

unsigned int __VMALLOC_RESERVE;

```

to the nv.c. Works for me.

hth,

#mb

----------

## DaMouse

I already adjusted the svn tree, i think i got it wrong through, I'm about to make it portage friendly again  :Smile: 

-DaMouse

----------

## DaMouse

http://svn.esuna.co.uk/esuna/damouse-portage/

Could someone svn co that into their overlay and test it please, my x.org is borked again so the happy dance of recompiling it must begin  :Smile: 

-DaMouse

----------

## metallikop

Thank you!  The latest update worked perfectly for me: 2.6.9-rc2-mm1, 3.4.1-r2

----------

## Dinini

Does this include the fix mentioned in http://00f.net/blogs/index.php/2004/09/16/nvidia_kernel_module_and_linux_2_6_9_rc2 ?

You asked about older/non-mm kernels.

It complied fine for 2.6.8-gentoo-r4 but I can't load it.

```
# modprobe nvidia

FATAL: Error inserting nvidia (/lib/modules/2.6.8-gentoo-r4/video/nvidia.ko): Invalid module format
```

----------

## Lasker

No, nvidia-kernel-1.0.6111-r1 doesn't work with 2.6.8-gentoo-r3 here (though 1.0.6111 still works fine).

Unfortunately I've lost the error-message, but it was related to the changes: 

something about 'pci_find_class or pci_get_class'.

----------

## Calchan

nvidia-kernel-1.0.6111-r1 doesn't work here either with 2.6.8.1-ck7 (plus a couple of minor patches). Downgraded to nvidia-kernel-1.0.6111 and it's OK again.

----------

## smg

 *Quote:*   

> media-video/nvidia-kernel-1.0.6111-r1
> 
> 

 

applies also on this on? or do u have to make a new patch DaMouse?

would be really great...

best regards

#ash

----------

## DaMouse

@ All of the above  :Smile: 

These should be fixed in my latest svn tree.. did you use that if not we have a  problem

-DaMouse

----------

## smg

i did this to overlay (your patch in this topic) and nothing more, but when i did today

 *Quote:*   

> emerge sync && emerge -pv world

 

i saw this new NVIDIA-Kernel and now i'm just thinking about it whats this because its not new or?  :Razz: 

----------

## DaMouse

I'll pull a new svn tree for you and make a newer .tar.bz2 overlay, also you might want to set PORTDIR_OVERLAY in your /etc/make.conf (some docs on that somewhere and the love-sources howto shows it i think) bare with me

-DaMouse

----------

## DaMouse

new svn snapshot

http://ck.dbdfleet.net/nvidia-kernel-1.0.6111-r1.tar.bz2

(updating main topic to)

-DaMouse

----------

## firephoto

Are the differences in the mm-sources going to be part of the vanilla kernel? I'm just wondering because I don't understand why nividia-kernel got bumped to work with mm if it won't work with the vanilla based kernels now.

----------

## DaMouse

Theoretically my latest overlay works with both  :Smile: 

-DaMouse

----------

## taikuri

Thank you, works great here with 2.6.9-rc2-mm1.

----------

## Lasker

 *Lasker wrote:*   

> No, nvidia-kernel-1.0.6111-r1 doesn't work with 2.6.8-gentoo-r3 here (though 1.0.6111 still works fine).
> 
> Unfortunately I've lost the error-message, but it was related to the changes: 
> 
> something about 'pci_find_class or pci_get_class'.

 

Just to prevent confusion: the above was about the new "official" ebuild, not the patch.

Are there any differences at all between the patch and the official ebuild?

----------

## DaMouse

Only one difference left in my tree over the new nvidia-kernel, the vmalloc fix for mm, pretty simple really but it fixes it  :Smile: 

-DaMouse

----------

## LordKefka

i'm using gentoo-dev-sources 2.6.8-r4, works perfectly for me~

----------

## Lasker

Yep, the new -r2 works perfectly now!  :Smile: 

Though I don't know why I did it at all, besides of always being curious:

I had no problems with nvidia-kernel-1.0.6111 anyway...   :Rolling Eyes: 

----------

## DaMouse

 *Lasker wrote:*   

> Yep, the new -r2 works perfectly now! 
> 
> Though I don't know why I did it at all, besides of always being curious:
> 
> I had no problems with nvidia-kernel-1.0.6111 anyway...  

 

I love testers  :Smile: 

-DaMouse

----------

## dfy

 *mb wrote:*   

> @AstralStrom
> 
> in order to fix
> 
> ```
> ...

 

This looks like a somewhat - well - dangerous hack to me, although I don't have any experiences with kernel hacking. The problem with __VMALLOC_RESERVE is the tune-vmalloc-size.patch (you'll find it in Andrew's broken-out dir) . Reversing that patch fixes the __VMALLOC_RESERVE-issue and seems to be a less dangerous hack for me.

----------

## DaMouse

Heh, I merged the VMALLOC fix into my tree if you want to see how good the hack is  :Razz:  its not really a hack (much) , its just getting the variable back that used to be static.

-DaMouse

----------

## chickaroo

i released a patch for this with an ebuild over here

[edit] hmm... i shoud have read the rest of this thread i guess. DaMouse seems to have put that in his latest source. doesn't seem to fix it though, it's just a work around. i see his patch has this:

```

+#ifndef __VMALLOC_RESERVE

+unsigned int __VMALLOC_RESERVE;

+#endif

```

when actually it needs:

```
+unsigned int __VMALLOC_RESERVE = 128 << 20;
```

----------

## DaMouse

I'm not sure editing vmalloc everytime we load the module is such a good idea.. its normally a static value.. but perhaps it could work since the symbol wasn't loaded properly before..

-DaMouse

----------

## AstralStorm

I've already added that variable, anyway, that was quite easy.

Been using hand-modded nvidia-kernel ebuild anyway,

1st patch from DaMouse, 2nd my own, identical to DaMouse's.

Fixing it now to initialise the value properly.

Right now trying 2.6.9-rc2-mm3-pre (from Ingo, w/o ZAPHOD) + voluntary-preemption-2.6.9-rc2-mm3-S5 + Con's patches.

----------

## geki

anyone found out how to patch nvidia-kernel for mm4 with that remap_page_range() -> remap_pfn_range() switch?

one example fix from lkml:

```

-      } else if (remap_page_range(vma, vma->vm_start, 

-                   (kerninfo.aper_base + offset),

+      } else if (remap_pfn_range(vma, vma->vm_start,

+            (kerninfo.aper_base + offset) >> PAGE_SHIFT,

                    size, vma->vm_page_prot)) {

```

don't find the correct place to fix  :Sad: 

conftest.sh << there you can play a little but starting X i just got a blank screen... (well that time i forgot to add '>> PAGE_SHIFT')

i just have to reboot.. which i do not want...

my patch (do not ask me what i did  :Sad: )

```

--- usr/src/nv/nv-linux.h       2004-07-27 17:33:20.000000000 +0200

+++ usr/src/nv/nv-linux.h       2004-09-28 10:31:25.994607728 +0200

@@ -563,17 +563,17 @@

 #endif

 

 /*

- * Linux 2.5 introduced the five argument version of remap_page_range, all

+ * Linux 2.5 introduced the five argument version of remap_pfn_range, all

  * relevant releases to date use it. This version was backported to 2.4 

  * without means to identify the change, hence this hack.

  */

 #if defined(KERNEL_2_6) || defined(REMAP_PAGE_RANGE_5)

-#define NV_REMAP_PAGE_RANGE(x...)    remap_page_range(vma, x)

+#define NV_REMAP_PAGE_RANGE(x...)    remap_pfn_range(vma, x)

 #elif defined(REMAP_PAGE_RANGE_4)

-#define NV_REMAP_PAGE_RANGE(x...)    remap_page_range(x)

+#define NV_REMAP_PAGE_RANGE(x...)    remap_pfn_range(x)

 #else

-#warning "conftest.sh failed, assuming old Linux 2.4 remap_page_range(4)!"

-#define NV_REMAP_PAGE_RANGE(x...)    remap_page_range(x)

+#warning "conftest.sh failed, assuming old Linux 2.4 remap_pfn_range(4)!"

+#define NV_REMAP_PAGE_RANGE(x...)    remap_pfn_range(x)

 #endif

 

 #if defined(pmd_offset_map)

--- usr/src/nv/conftest.sh      2004-07-27 17:33:20.000000000 +0200

+++ usr/src/nv/conftest.sh      2004-09-28 10:33:48.176992720 +0200

@@ -31,7 +31,7 @@

         echo "#include <linux/mm.h>

         int do_test_remap_page_range(void) {

            pgprot_t pgprot;

-           remap_page_range(NULL, 0L, 0L, 0L, pgprot);

+           remap_pfn_range(NULL, 0L, 0L >> PAGE_SHIFT, 0L, pgprot);

         }" > conftest$$.c

 

         $CC $CFLAGS -c conftest$$.c > /dev/null 2>&1

@@ -46,7 +46,7 @@

         echo "#include <linux/mm.h>

         int do_test_remap_page_range(void) {

            pgprot_t pgprot;

-           remap_page_range(0L, 0L, 0L, pgprot);

+           remap_pfn_range(0L, 0L, 0L, pgprot);

         }" > conftest$$.c

 

         $CC $CFLAGS -c conftest$$.c > /dev/null 2>&1

```

----------

## geki

ok, new patch and im on mm4 running X with nvidia driver  :Very Happy: 

my patch, someone cleans this up?  :Wink: 

```

--- usr/src/nv/nv-linux.h       2004-07-27 17:33:20.000000000 +0200

+++ usr/src/nv/nv-linux.h       2004-09-28 10:31:25.994607728 +0200

@@ -563,17 +563,17 @@

 #endif

 

 /*

- * Linux 2.5 introduced the five argument version of remap_page_range, all

+ * Linux 2.5 introduced the five argument version of remap_pfn_range, all

  * relevant releases to date use it. This version was backported to 2.4 

  * without means to identify the change, hence this hack.

  */

 #if defined(KERNEL_2_6) || defined(REMAP_PAGE_RANGE_5)

-#define NV_REMAP_PAGE_RANGE(x...)    remap_page_range(vma, x)

+#define NV_REMAP_PAGE_RANGE(x...)    remap_pfn_range(vma, x)

 #elif defined(REMAP_PAGE_RANGE_4)

-#define NV_REMAP_PAGE_RANGE(x...)    remap_page_range(x)

+#define NV_REMAP_PAGE_RANGE(x...)    remap_pfn_range(x)

 #else

-#warning "conftest.sh failed, assuming old Linux 2.4 remap_page_range(4)!"

-#define NV_REMAP_PAGE_RANGE(x...)    remap_page_range(x)

+#warning "conftest.sh failed, assuming old Linux 2.4 remap_pfn_range(4)!"

+#define NV_REMAP_PAGE_RANGE(x...)    remap_pfn_range(x)

 #endif

 

 #if defined(pmd_offset_map)

--- usr/src/nv/conftest.sh      2004-07-27 17:33:20.000000000 +0200

+++ usr/src/nv/conftest.sh      2004-09-28 10:33:48.176992720 +0200

@@ -31,7 +31,7 @@

         echo "#include <linux/mm.h>

         int do_test_remap_page_range(void) {

            pgprot_t pgprot;

-           remap_page_range(NULL, 0L, 0L, 0L, pgprot);

+           remap_pfn_range(NULL, 0L, 0L >> PAGE_SHIFT, 0L, pgprot);

         }" > conftest$$.c

 

         $CC $CFLAGS -c conftest$$.c > /dev/null 2>&1

@@ -46,7 +46,7 @@

         echo "#include <linux/mm.h>

         int do_test_remap_page_range(void) {

            pgprot_t pgprot;

-           remap_page_range(0L, 0L, 0L, pgprot);

+           remap_pfn_range(0L, 0L, 0L, pgprot);

         }" > conftest$$.c

 

         $CC $CFLAGS -c conftest$$.c > /dev/null 2>&1

--- usr/src/nv/nv.c     2004-09-28 11:48:22.849672352 +0200

+++ usr/src/nv/nv.c.new 2004-09-28 12:09:40.219482624 +0200

@@ -1768,7 +1768,7 @@

 

         vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);

         if (NV_REMAP_PAGE_RANGE(vma->vm_start,

-                             NV_VMA_OFFSET(vma),

+                             NV_VMA_OFFSET(vma) >> PAGE_SHIFT,

                              vma->vm_end - vma->vm_start,

                              vma->vm_page_prot))

             return -EAGAIN;

@@ -1787,7 +1787,7 @@

 

         vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);

         if (NV_REMAP_PAGE_RANGE(vma->vm_start,

-                             NV_VMA_OFFSET(vma),

+                             NV_VMA_OFFSET(vma) >> PAGE_SHIFT,

                              vma->vm_end - vma->vm_start,

                              vma->vm_page_prot))

             return -EAGAIN;

@@ -1904,7 +1904,7 @@

         while (pages--)

         {

             page = (unsigned long) at->page_table[i++].phys_addr;

-            if (NV_REMAP_PAGE_RANGE(start, page, PAGE_SIZE, vma->vm_page_prot))

+            if (NV_REMAP_PAGE_RANGE(start, page >> PAGE_SHIFT, PAGE_SIZE, vma->vm_page_prot))

                 return -EAGAIN;

             start += PAGE_SIZE;

             pos += PAGE_SIZE;

--- usr/src/nv/os-agp.c 2004-07-27 17:33:20.000000000 +0200

+++ usr/src/nv/os-agp.c.new     2004-09-28 12:12:54.743910416 +0200

@@ -331,10 +331,10 @@

     agp_addr = agpinfo.aper_base + (agp_data->offset << PAGE_SHIFT);

 

 #if defined(NVCPU_IA64)

-    err = NV_REMAP_PAGE_RANGE(vma->vm_start, (size_t) agp_addr, 

+    err = NV_REMAP_PAGE_RANGE(vma->vm_start, (size_t) agp_addr >> PAGE_SHIFT, 

                        agp_data->num_pages << PAGE_SHIFT, vma->vm_page_prot);

 #else

-    err = NV_REMAP_PAGE_RANGE(vma->vm_start, (size_t) agp_addr, 

+    err = NV_REMAP_PAGE_RANGE(vma->vm_start, (size_t) agp_addr >> PAGE_SHIFT, 

                        agp_data->num_pages << PAGE_SHIFT, PAGE_SHARED);

 #endif

         

--- usr/src/nv/os-interface.c   2004-07-27 17:33:20.000000000 +0200

+++ usr/src/nv/os-interface.c.new       2004-09-28 12:14:14.207830064 +0200

@@ -1088,7 +1088,7 @@

     vma = (struct vm_area_struct *) *priv;

 

     if (NV_REMAP_PAGE_RANGE(vma->vm_start,

-                start & PAGE_MASK, size_bytes, PAGE_SHARED))

+                start & PAGE_MASK >> PAGE_SHIFT, size_bytes, PAGE_SHARED))

         return NULL;

 

     return (void *)(NV_UINTPTR_T) vma->vm_start;

```

http://geki.ath.cx/remap_pfn_range.patch

----------

## geki

got a hardlock on disk I/O. either mm4 or nvidia driver needs improvement (better patch  :Wink:  )

----------

## petrjanda

using the latest mm4, nvidia still doesnt work. vmalloc error is fixed, however thers another new error, which I cant remember now.

----------

## geki

did u try with my patch? http://geki.ath.cx/nvidia-kernel-1.0.6111-r1.tar.bz2

----------

## fallow

 *geki wrote:*   

> did u try with my patch? http://geki.ath.cx/nvidia-kernel-1.0.6111-r1.tar.bz2

 

I`ve tried...

reset  after startx  :Sad:   , black screen sometimes.... :

doesn`t work here. 

also tried with and without this 

```

--- l/include/linux/pm.h        2004-08-21 22:04:54.518914848 -0700

+++ linux-fixed/include/linux/pm.h      2004-08-21 22:05:12.440190400 -0700

@@ -36,6 +36,7 @@

 {

        PM_SUSPEND, /* enter D1-D3 */

        PM_RESUME,  /* enter D0 */

+       PM_SAVE_STATE,  /* save device's state */

 } pm_request_t;

 

 /*

```

greetings  :Smile: 

----------

## geki

working for one on 5900xt, another one with same card does not... oO

and 5900 ultra (here) works, what gfx card u have?

----------

## DaMouse

I've been out of linux for a few days now but i'll be back in soon and work on getting my nvidia card running under mm4  :Smile: 

-DaMouse

----------

## Gentii

Well, happy to hear that I'm not alone. I'm getting exactly the same problem as fallow.

After startx, either reboot or black screen, so I've to reboot myself :p

----------

## soliad

So I tried to make a patch for the remap_pfn_range and it seems to work.

There is the patch :

```
diff -u nv.old/conftest.sh nv/conftest.sh

--- nv.old/conftest.sh  2004-09-29 19:54:22.000000000 +0200

+++ nv/conftest.sh      2004-09-29 20:30:04.223302760 +0200

@@ -59,9 +59,10 @@

         else

           #

           # We couldn't determine the number of arguments expected by the

-          # remap_page_range function.

+          # remap_page_range function. Assuming new remap_pfn_range

           #

-          exit 1

+         echo "6"

+          exit 0

         fi

     ;;

diff -u nv.old/Makefile.kbuild nv/Makefile.kbuild

--- nv.old/Makefile.kbuild      2004-09-29 19:54:22.000000000 +0200

+++ nv/Makefile.kbuild  2004-09-29 20:30:43.544325056 +0200

@@ -171,6 +171,19 @@

   endif

 endif

+ifeq ($(PATCHLEVEL), 6)

+  REMAP_PAGE_RANGE := $(shell $(CONFTEST) remap_page_range)

+

+  ifeq ($(REMAP_PAGE_RANGE), 5)

+    EXTRA_CFLAGS += -DREMAP_PAGE_RANGE_5

+  endif

+

+  ifeq ($(REMAP_PAGE_RANGE), 6)

+    EXTRA_CFLAGS += -DREMAP_PAGE_RANGE_PFN

+  endif

+endif

+

+

 ifeq ($(PATCHLEVEL), 4)

   ifeq ($(shell $(CONFTEST) change_page_attr), 1)

     EXTRA_CFLAGS += -DNV_CHANGE_PAGE_ATTR_PRESENT

diff -u nv.old/nv-linux.h nv/nv-linux.h

--- nv.old/nv-linux.h   2004-09-29 19:54:22.000000000 +0200

+++ nv/nv-linux.h       2004-09-29 20:07:13.000000000 +0200

@@ -566,8 +566,11 @@

  * Linux 2.5 introduced the five argument version of remap_page_range, all

  * relevant releases to date use it. This version was backported to 2.4

  * without means to identify the change, hence this hack.

+ * Linux 2.6 also introduced a remap_page_range replacement remap_pfn_range.

  */

-#if defined(KERNEL_2_6) || defined(REMAP_PAGE_RANGE_5)

+#if defined(KERNEL_2_6) && defined(REMAP_PAGE_RANGE_PFN)

+#define NV_REMAP_PAGE_RANGE(x, y, z...)    remap_pfn_range(vma, x, y >> PAGE_SHIFT, z)

+#elif defined(KERNEL_2_6) || defined(REMAP_PAGE_RANGE_5)

 #define NV_REMAP_PAGE_RANGE(x...)    remap_page_range(vma, x)

 #elif defined(REMAP_PAGE_RANGE_4)

 #define NV_REMAP_PAGE_RANGE(x...)    remap_page_range(x)

```

I have tried to keep the generic way to handle which function to use, so it can work on previous 2.6 kernel as well as on 2.4.

The name of variables may be obvious but it's working.

It 's given without waranty but it works for me so I hope it will help you.

(And sorry for my englisg).

----------

## geki

your patch is cleaner  :Smile:  and works, too  :Smile: 

by the way are you using a unpatched mm4?

----------

## soliad

i'm using the mm4 version of portage (mm-sources-2.6.9-rc2-mm4)

----------

## nbensa

 *soliad wrote:*   

> So I tried to make a patch for the remap_pfn_range and it seems to work.
> 
> There is the patch :

 

Well, your patch didn't work here. It still compiles with remap_page_range  :Sad: 

```
$ uname -a

Linux venkman 2.6.9-rc2-mm4-VP-S7 #11 Thu Sep 30 01:20:40 ART 2004 i686 Pentium III (Coppermine) GenuineIntel GNU/Linux

```

----------

## soliad

Maybe your kernel have a patch to handle remap_page_range so the test detect remap_page_range.

I think I have to rewrite the conftest part to seek for remap_pfn_range function in the kernel, so it can be more efficient.

I will do that afterwork.

----------

## oggialli

So actually, what are the preferred steps to perform in order to use one of these patches. I'm gonna use 2.6.9-rc2-mm4 now.

----------

## geki

 *oggialli wrote:*   

> So actually, what are the preferred steps to perform in order to use one of these patches. I'm gonna use 2.6.9-rc2-mm4 now.

 

get DaMouse' latest overlay and add soliad's patch  :Smile:  then you have a 50% chance that it works or unpatch 6 patches of mm which did that function renaming  :Wink:  and use DaMouse's overlay...

these 6 patches have *remap* (i think) in their naming.... have a look on broken-out of latest mm

----------

## oggialli

Yeah, but i meant from the basics, ie what commands to use and how ... epatch, i guess ? Never had to use things like that although my system is very experimental  :Wink: 

----------

## geki

updated with soliad's patch - anyone may try this one...

 *geki wrote:*   

> did u try with my patch? http://geki.ath.cx/nvidia-kernel-1.0.6111-r1.tar.bz2

 

----------

## oggialli

Can anybody tell me steptostep how to apply ebuild patches, I currently don't know where to get started in this thing  :Wink: 

----------

## chickaroo

 *geki wrote:*   

> http://geki.ath.cx/nvidia-kernel-1.0.6111-r1.tar.bz2

 

loaded modules fine... i startx and my pc reboots LOL

i'll just stick to reversing the patches... i posted my fixes here

----------

## chickaroo

 *oggialli wrote:*   

> Can anybody tell me steptostep how to apply ebuild patches, I currently don't know where to get started in this thing 

 

just extract the tar in /usr/portage/ and emerge

----------

## oggialli

Ok, thanks,  never guessed it to be that simple  :Wink:  What's the fuss about "his and his" patches to ebuilds ?

----------

## soliad

maybe this version can better handle remap_pfn_range detection :

```
diff -u nv.old/conftest.sh nv/conftest.sh

--- nv.old/conftest.sh   2004-09-29 19:54:22.000000000 +0200

+++ nv/conftest.sh   2004-09-30 20:19:02.623469936 +0200

@@ -65,6 +65,30 @@

         fi

     ;;

 

+    remap_pfn_range)

+        #

+        # Determine if we can use remap_pfn_range.

+        #

+

+        echo "#include <linux/mm.h>

+        int do_test_remap_pfn_range(void) {

+           pgprot_t pgprot;

+           remap_pfn_range(NULL, 0L, 0L, 0L, pgprot);

+        }" > conftest$$.c

+

+        $CC $CFLAGS -c conftest$$.c #> /dev/null 2>&1

+        rm -f conftest$$.c

+

+        if [ -f conftest$$.o ]; then

+          echo "1"

+          rm -f conftest$$.o

+          exit 0

+   else

+     echo"0"

+     exit 1

+        fi

+    ;;

+

     cc_sanity_check)

         #

         # Verify that the same compiler is used for the kernel and kernel

diff -u nv.old/Makefile.kbuild nv/Makefile.kbuild

--- nv.old/Makefile.kbuild   2004-09-29 19:54:22.000000000 +0200

+++ nv/Makefile.kbuild   2004-09-30 19:42:57.000000000 +0200

@@ -171,6 +171,15 @@

   endif

 endif

 

+ifeq ($(PATCHLEVEL), 6)

+  REMAP_PAGE_RANGE := $(shell $(CONFTEST) remap_pfn_range)

+

+  ifeq ($(REMAP_PAGE_RANGE), 1)

+    EXTRA_CFLAGS += -DREMAP_PAGE_RANGE_PFN

+  endif

+endif

+

+

 ifeq ($(PATCHLEVEL), 4)

   ifeq ($(shell $(CONFTEST) change_page_attr), 1)

     EXTRA_CFLAGS += -DNV_CHANGE_PAGE_ATTR_PRESENT

diff -u nv.old/nv-linux.h nv/nv-linux.h

--- nv.old/nv-linux.h   2004-09-29 19:54:22.000000000 +0200

+++ nv/nv-linux.h   2004-09-29 20:07:13.000000000 +0200

@@ -566,8 +566,11 @@

  * Linux 2.5 introduced the five argument version of remap_page_range, all

  * relevant releases to date use it. This version was backported to 2.4 

  * without means to identify the change, hence this hack.

+ * Linux 2.6 also introduced a remap_page_range replacement remap_pfn_range.

  */

-#if defined(KERNEL_2_6) || defined(REMAP_PAGE_RANGE_5)

+#if defined(KERNEL_2_6) && defined(REMAP_PAGE_RANGE_PFN)

+#define NV_REMAP_PAGE_RANGE(x, y, z...)    remap_pfn_range(vma, x, y >> PAGE_SHIFT, z)

+#elif defined(KERNEL_2_6) || defined(REMAP_PAGE_RANGE_5)

 #define NV_REMAP_PAGE_RANGE(x...)    remap_page_range(vma, x)

 #elif defined(REMAP_PAGE_RANGE_4)

 #define NV_REMAP_PAGE_RANGE(x...)    remap_page_range(x)

```

I have no problem using those patches on my gentoo since yesterday

```
$ uname -a

Linux tontonpc 2.6.9-rc2-mm4 #1 SMP Mon Sep 27 20:16:37 CEST 2004 i686 Intel(R) Pentium(R) 4 CPU 2.60GHz GenuineIntel GNU/Linux
```

I'll take a look at rc3 to see if this patch works well and doesn't use remap_pfn_range if not present.

----------

## geki

remap_pfn_range(NULL, 0L, 0L >> PAGE_SHIFT, 0L, pgprot);

should be on conftest.sh, not?

and renaming $REMAP_PAGE_RANGE_PFN to $REMAP_PFN_RANGE may be lil cleaner but not necessary  :Wink: 

neenee tried rc3. its different and i would wait for rc3-mm1 to do further testings.

----------

## soliad

there is no need to shift the address for testing the presence of remap-pfn_range. 

But renaming would be nicer, I will do that for next version, if any (maybe for rc3-mm1)  :Smile: 

----------

## nbensa

I do not understand this code from Makefile.kbuild:

```
ifeq ($(PATCHLEVEL), 4)

  REMAP_PAGE_RANGE := $(shell $(CONFTEST) remap_page_range)

  ifeq ($(REMAP_PAGE_RANGE), 5)

    EXTRA_CFLAGS += -DREMAP_PAGE_RANGE_5

  endif

  ifeq ($(REMAP_PAGE_RANGE), 4)

    EXTRA_CFLAGS += -DREMAP_PAGE_RANGE_4

  endif

endif

```

What happens if $PATCHLEVEL = 6 ? My guess is NOTHING, but then how does the build know we are using a PATCHLEVEL = 6 kernel ?

And then this: some how these tests compiled OK:

```
#include <linux/mm.h>

int do_test_remap_pfn_range(void) {

        pgprot_t pgprot;

        remap_page_range(NULL, 0L, 0L, 0L, pgprot);

}

```

```
#include <linux/mm.h>

int do_test_remap_pfn_range(void) {

        pgprot_t pgprot;

        remap_pfn_range(NULL, 0L, 0L, 0L, pgprot);

}

```

Both of them produced conftest.o*, which means everything went OK, but remap_page_range SHOULD have failed since it's not defined anywhere in /usr/src/linux/include!   :Evil or Very Mad: 

* Compiled with  *Quote:*   

> gcc -D__KERNEL__ -c conftest.c

 

Thanks in advance,

Norberto

----------

## firephoto

Compiled development-sources-2.6.9-rc3 but I can't load the nvidia module due to the "__VMALLOC_RESERVE" problem. I've read lots of "fixes" but there doesn't seem to be a good answer to which or what is the one that needs to be done and I don't know that any will work with rc3. Does the kernel need recompiled after some of these patches? Is it just what the nvidia-kernel sees when it is installed? Sorry for the noob moment but there doesn't seem to much useful info on this somewhat major issue.  :Wink: 

Anyone?

We need something until nvidia releases new drivers because from what i've read this will be how it is with the released stable kernel.

The comment by the one kernel dev about the vmalloc change pretty much blamed nvidia for having a crappy driver which he probably doesn't use because he never starts an X session.  :Sad:  He's the same one that made sure reiser4 was doa when the patches were presented to be included in the kernel. Dev's like this and the "my way or the highway" attitude leave a bad impression with me. oh well.

----------

## DaMouse

Updated svn tree thanks to soliad and made a new snapshot:

http://kernel.damouse.co.uk/nvidia-kernel-1.0.6111-r3.tar.bz2

Test with both -mm4 and -rc3 please, its running fine with mm4 for me

-DaMouse

----------

## oggialli

Works perfectly now, with the patch.

----------

## firephoto

Doesn't work here, -rc3.

```

 * Applying power-suspend-2.6.9-changes.patch...                          [ ok ]

 * Applying nv_enable_pci.patch...                                        [ ok ]

 * Applying fix_pci_find_class.patch...                                   [ ok ]

 * Applying vmalloc-reserve.diff...                                       [ ok ]

 * Applying remap_pfn_range.diff...                                       [ ok ]

>>> Source unpacked.

x86

conftest5752.c: In function `do_test_remap_pfn_range':

conftest5752.c:4: warning: implicit declaration of function `remap_pfn_range'

./conftest.sh: line 107: echo0: command not found

NVIDIA: calling KBUILD...

make -C //usr/src/linux         \

KBUILD_SRC=/usr/src/linux-2.6.9-rc3          KBUILD_VERBOSE=1   \

KBUILD_CHECK= KBUILD_EXTMOD="/var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv" \

        -f /usr/src/linux-2.6.9-rc3/Makefile modules

mkdir -p /var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/.tmp_versions

make -f /usr/src/linux-2.6.9-rc3/scripts/Makefile.build obj=/var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv

conftest5886.c: In function `do_test_remap_pfn_range':

conftest5886.c:4: warning: implicit declaration of function `remap_pfn_range'

/var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/conftest.sh: line 107: echo0: command not found

echo \#define NV_COMPILER \"`gcc -v 2>&1 | tail -n 1`\" > /var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/nv_compiler.h

  gcc -Wp,-MD,/var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/.nv.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude -Iinclude2 -I/usr/src/linux-2.6.9-rc3/include  -I/var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -O2 -fomit-frame-pointer -Wdeclaration-after-statement -pipe -msoft-float -mpreferred-stack-boundary=2 -fno-unit-at-a-time -march=athlon -I/usr/src/linux-2.6.9-rc3/include/asm-i386/mach-default -Iinclude/asm-i386/mach-default  -I/var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv -Wall -Wimplicit -Wreturn-type -Wswitch -Wformat -Wchar-subscripts -Wparentheses -Wpointer-arith -Wno-multichar -Werror -O -fno-common -MD -Wno-cast-qual -Wno-error -D_LOOSE_KERNEL_NAMES -D__KERNEL__ -DMODULE -DNTRM -D_GNU_SOURCE -D_LOOSE_KERNEL_NAMES -D__KERNEL__ -DMODULE -DNV_MAJOR_VERSION=1 -DNV_MINOR_VERSION=0 -DNV_PATCHLEVEL=6111 -DNV_UNIX -DNV_LINUX -DNV_INT64_OK -DNVCPU_X86 -UDEBUG -U_DEBUG -DNDEBUG -DNV_CHANGE_PAGE_ATTR_PRESENT -DNV_CLASS_SIMPLE_PRESENT -DHAVE_PCI_FIND_CLASS -DMODULE -DKBUILD_BASENAME=nv -DKBUILD_MODNAME=nvidia -c -o /var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/nv.o /var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/nv.c

In file included from include/linux/timex.h:61,

                 from include/linux/sched.h:11,

                 from include/linux/module.h:10,

                 from /var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/nv-linux.h:52,

                 from /var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/nv.c:14:

include/asm/io.h: In function `check_signature':

include/asm/io.h:240: warning: wrong type argument to increment

In file included from include/linux/list.h:7,

                 from include/linux/wait.h:23,

                 from include/asm/semaphore.h:41,

                 from include/linux/sched.h:18,

                 from include/linux/module.h:10,

                 from /var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/nv-linux.h:52,

                 from /var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/nv.c:14:

include/linux/prefetch.h: In function `prefetch_range':

include/linux/prefetch.h:62: warning: pointer of type `void *' used in arithmetic

  gcc -Wp,-MD,/var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/.os-agp.o.d -nostdinc -iwithprefix include -D__KERNEL__-Iinclude -Iinclude2 -I/usr/src/linux-2.6.9-rc3/include  -I/var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -O2 -fomit-frame-pointer -Wdeclaration-after-statement -pipe -msoft-float -mpreferred-stack-boundary=2 -fno-unit-at-a-time -march=athlon -I/usr/src/linux-2.6.9-rc3/include/asm-i386/mach-default -Iinclude/asm-i386/mach-default  -I/var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv -Wall -Wimplicit -Wreturn-type -Wswitch -Wformat -Wchar-subscripts -Wparentheses -Wpointer-arith -Wno-multichar -Werror -O -fno-common -MD -Wno-cast-qual -Wno-error -D_LOOSE_KERNEL_NAMES -D__KERNEL__ -DMODULE -DNTRM -D_GNU_SOURCE -D_LOOSE_KERNEL_NAMES -D__KERNEL__ -DMODULE -DNV_MAJOR_VERSION=1 -DNV_MINOR_VERSION=0 -DNV_PATCHLEVEL=6111 -DNV_UNIX -DNV_LINUX -DNV_INT64_OK -DNVCPU_X86 -UDEBUG -U_DEBUG -DNDEBUG -DNV_CHANGE_PAGE_ATTR_PRESENT -DNV_CLASS_SIMPLE_PRESENT -DHAVE_PCI_FIND_CLASS -DMODULE -DKBUILD_BASENAME=os_agp -DKBUILD_MODNAME=nvidia -c -o /var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/os-agp.o /var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/os-agp.c

In file included from include/linux/timex.h:61,

                 from include/linux/sched.h:11,

                 from include/linux/module.h:10,

                 from /var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/nv-linux.h:52,

                 from /var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/os-agp.c:24:

include/asm/io.h: In function `check_signature':

include/asm/io.h:240: warning: wrong type argument to increment

In file included from include/linux/list.h:7,

                 from include/linux/wait.h:23,

                 from include/asm/semaphore.h:41,

                 from include/linux/sched.h:18,

                 from include/linux/module.h:10,

                 from /var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/nv-linux.h:52,

                 from /var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/os-agp.c:24:

include/linux/prefetch.h: In function `prefetch_range':

include/linux/prefetch.h:62: warning: pointer of type `void *' used in arithmetic

  gcc -Wp,-MD,/var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/.os-interface.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude -Iinclude2 -I/usr/src/linux-2.6.9-rc3/include  -I/var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -O2 -fomit-frame-pointer -Wdeclaration-after-statement -pipe -msoft-float -mpreferred-stack-boundary=2 -fno-unit-at-a-time -march=athlon -I/usr/src/linux-2.6.9-rc3/include/asm-i386/mach-default -Iinclude/asm-i386/mach-default  -I/var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv -Wall -Wimplicit -Wreturn-type -Wswitch -Wformat -Wchar-subscripts -Wparentheses -Wpointer-arith -Wno-multichar -Werror -O -fno-common -MD -Wno-cast-qual -Wno-error -D_LOOSE_KERNEL_NAMES -D__KERNEL__ -DMODULE -DNTRM -D_GNU_SOURCE -D_LOOSE_KERNEL_NAMES-D__KERNEL__ -DMODULE -DNV_MAJOR_VERSION=1 -DNV_MINOR_VERSION=0 -DNV_PATCHLEVEL=6111 -DNV_UNIX -DNV_LINUX -DNV_INT64_OK -DNVCPU_X86 -UDEBUG -U_DEBUG -DNDEBUG -DNV_CHANGE_PAGE_ATTR_PRESENT -DNV_CLASS_SIMPLE_PRESENT -DHAVE_PCI_FIND_CLASS -DMODULE -DKBUILD_BASENAME=os_interface -DKBUILD_MODNAME=nvidia -c -o /var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/os-interface.o /var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/os-interface.c

In file included from include/linux/timex.h:61,

                 from include/linux/sched.h:11,

                 from include/linux/module.h:10,

                 from /var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/nv-linux.h:52,

                 from /var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/os-interface.c:26:

include/asm/io.h: In function `check_signature':

include/asm/io.h:240: warning: wrong type argument to increment

In file included from include/linux/list.h:7,

                 from include/linux/wait.h:23,

                 from include/asm/semaphore.h:41,

                 from include/linux/sched.h:18,

                 from include/linux/module.h:10,

                 from /var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/nv-linux.h:52,

                 from /var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/os-interface.c:26:

include/linux/prefetch.h: In function `prefetch_range':

include/linux/prefetch.h:62: warning: pointer of type `void *' used in arithmetic

  gcc -Wp,-MD,/var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/.os-registry.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude -Iinclude2 -I/usr/src/linux-2.6.9-rc3/include  -I/var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv -Wall-Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -O2 -fomit-frame-pointer -Wdeclaration-after-statement -pipe -msoft-float -mpreferred-stack-boundary=2 -fno-unit-at-a-time -march=athlon -I/usr/src/linux-2.6.9-rc3/include/asm-i386/mach-default -Iinclude/asm-i386/mach-default  -I/var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv -Wall -Wimplicit -Wreturn-type -Wswitch -Wformat -Wchar-subscripts -Wparentheses -Wpointer-arith -Wno-multichar -Werror -O -fno-common -MD -Wno-cast-qual -Wno-error -D_LOOSE_KERNEL_NAMES -D__KERNEL__ -DMODULE -DNTRM -D_GNU_SOURCE -D_LOOSE_KERNEL_NAMES -D__KERNEL__ -DMODULE -DNV_MAJOR_VERSION=1 -DNV_MINOR_VERSION=0 -DNV_PATCHLEVEL=6111 -DNV_UNIX -DNV_LINUX -DNV_INT64_OK -DNVCPU_X86 -UDEBUG -U_DEBUG -DNDEBUG -DNV_CHANGE_PAGE_ATTR_PRESENT -DNV_CLASS_SIMPLE_PRESENT -DHAVE_PCI_FIND_CLASS -DMODULE -DKBUILD_BASENAME=os_registry -DKBUILD_MODNAME=nvidia -c -o /var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/os-registry.o /var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/os-registry.c

In file included from include/linux/timex.h:61,

                 from include/linux/sched.h:11,

                 from include/linux/module.h:10,

                 from /var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/nv-linux.h:52,

                 from /var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/os-registry.c:14:

include/asm/io.h: In function `check_signature':

include/asm/io.h:240: warning: wrong type argument to increment

In file included from include/linux/list.h:7,

                 from include/linux/wait.h:23,

                 from include/asm/semaphore.h:41,

                 from include/linux/sched.h:18,

                 from include/linux/module.h:10,

                 from /var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/nv-linux.h:52,

                 from /var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/os-registry.c:14:

include/linux/prefetch.h: In function `prefetch_range':

include/linux/prefetch.h:62: warning: pointer of type `void *' used in arithmetic

  ld -m elf_i386  -r -o /var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/nvidia.o /var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/nv-kernel.o /var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/nv.o/var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/os-agp.o /var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/os-interface.o /var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/os-registry.o

  Building modules, stage 2.

make -rR -f /usr/src/linux-2.6.9-rc3/scripts/Makefile.modpost

  scripts/mod/modpost  -i /usr/src/linux-2.6.9-rc3/Module.symvers vmlinux /var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/nvidia.o

  gcc -Wp,-MD,/var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/.nvidia.mod.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude -Iinclude2 -I/usr/src/linux-2.6.9-rc3/include -I/usr/src/linux-2.6.9-rc3/ -I -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -O2 -fomit-frame-pointer -Wdeclaration-after-statement -pipe -msoft-float -mpreferred-stack-boundary=2 -fno-unit-at-a-time -march=athlon -I/usr/src/linux-2.6.9-rc3/include/asm-i386/mach-default -Iinclude/asm-i386/mach-default  -DKBUILD_BASENAME=nvidia -DKBUILD_MODNAME=nvidia -DMODULE -c -o /var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/nvidia.mod.o /var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/nvidia.mod.c

  ld -m elf_i386 -r -o /var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/nvidia.ko /var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/nvidia.o /var/tmp/portage/nvidia-kernel-1.0.6111-r3/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/nvidia.mod.o

NVIDIA: left KBUILD.

x86

>>> Test phase [not enabled]: media-video/nvidia-kernel-1.0.6111-r3

x86

>>> Install nvidia-kernel-1.0.6111-r3 into /var/tmp/portage/nvidia-kernel-1.0.6111-r3/image/ category media-video

cp: cannot stat `/usr/local/portage/media-video/nvidia-kernel/files/nvidia-1.1': No such file or directory

install: cannot stat `/var/tmp/portage/nvidia-kernel-1.0.6111-r3/temp/nvidia': No such file or directory

man:

>>> Completed installing into /var/tmp/portage/nvidia-kernel-1.0.6111-r3/image/

>>> Merging media-video/nvidia-kernel-1.0.6111-r3 to /

```

It emerges ok but X won't start after I reboot into -rc3.

```

kdm: :0[9903]: IO Error in XOpenDisplay

kdm[9887]: Display :0 cannot be opened

kdm[9887]: Unable to fire up local display :0; disabling.

```

The module does load ok.

----------

## DaMouse

I'll fix this later I missed a space in between echo and 0 in the patch for remap_pfn_range

-DaMouse

----------

## DaMouse

Ok, updated, you should be able to just re-download the overlay or svn up to make that work now  :Smile: 

-DaMouse

----------

## firephoto

I didn't get the echo error, still got the warnings, rebooted and I get this when X tries to start.

```

(II) NVIDIA(0): Detected AGP rate: 4X

(EE) NVIDIA(0): Failed to allocate config DMA context

(II) UnloadModule: "nvidia"

(II) UnloadModule: "vgahw"

(II) Unloading /usr/X11R6/lib/modules/libvgahw.a

```

Also after this my first display doesn't bring the prompt up till I switch to another terminal and back, the second display is fine.

I've tried this with both 4k and 8k stacks in the kernel, no difference.

----------

## fallow

 *DaMouse wrote:*   

> Updated svn tree thanks to soliad and made a new snapshot:
> 
> http://kernel.damouse.co.uk/nvidia-kernel-1.0.6111-r3.tar.bz2
> 
> Test with both -mm4 and -rc3 please, its running fine with mm4 for me
> ...

 

works nice with rc3  :Smile:  thx

greetings  :Smile: 

----------

## firephoto

hmm

What -rc3 is this suppose to work with?

It doesn't work with development-sources-2.6.9_rc3 here.

The module loads but X won't start. Is there anything I have to have and is there anything I can't have in my configs or kernel or whatever to make this patch work?

----------

## DaMouse

I can't actually think whats wrong firephoto.. can you check dmesg and also post your config

-DaMouse

----------

## radek

```

(II) NVIDIA(0): Detected AGP rate: 8X

(EE) NVIDIA(0): Failed to allocate config DMA context

(II) UnloadModule: "nvidia"

(II) UnloadModule: "vgahw"

```

modules loads fine, nothing interesting in dmesg. but X does not start. btw I use Xfree not Xorg.

----------

## DaMouse

 *radek wrote:*   

> 
> 
> ```
> 
> (II) NVIDIA(0): Detected AGP rate: 8X
> ...

 

Interesting, firephoto, do you use Xfree or does anyone else follow this pattern?

-DaMouse

----------

## firephoto

latest xorg in ~x86

Preemptive kernel, NPTL, GCC 3.4.2

----------

## radek

DaMause, what version of xorg do You use?

i'm emerging 6.8.0-r1 now to test it, but it can take awhile  :Smile: 

----------

## sLiCeR

Hi, here the output from my X11-log (was using gcc-3.4.2)

```

X Window System Version 6.8.0

Release Date: 8 September 2004

X Protocol Version 11, Revision 0, Release 6.8

Build Operating System: Linux 2.6.9-rc2 i686 [ELF]

Current Operating System: Linux proline 2.6.9-rc3 #1 Fri Oct 1 16:11:41 CEST 2004 i686

Build Date: 18 September 2004

...

(II) Loading extension GLX

(II) LoadModule: "nvidia"

(II) Loading /usr/X11R6/lib/modules/drivers/nvidia_drv.o

(II) Module nvidia: vendor="NVIDIA Corporation"

        compiled for 4.0.2, module version = 1.0.6111

        Module class: XFree86 Video Driver

(II) NVIDIA X Driver  1.0-6111  Tue Jul 27 07:56:22 PDT 2004

(II) NVIDIA Unified Driver for all NVIDIA GPUs

(II) Primary Device is: PCI 02:00:0

(--) Assigning device section with no busID to primary device

(--) Chipset NVIDIA GPU found

...

(II) Setting vga for screen 0.

(II) Loading sub module "vgahw"

(II) LoadModule: "vgahw"

(II) Loading /usr/X11R6/lib/modules/libvgahw.a

(II) Module vgahw: vendor="X.Org Foundation"

        compiled for 6.8.0, module version = 0.1.0

        ABI class: X.Org Video Driver, version 0.7

(**) NVIDIA(0): Depth 24, (--) framebuffer bpp 32

(==) NVIDIA(0): RGB weight 888

(==) NVIDIA(0): Default visual is TrueColor

(==) NVIDIA(0): Using gamma correction (1.0, 1.0, 1.0)

(**) NVIDIA(0): Option "NvAGP" "1"

(**) NVIDIA(0): Option "IgnoreDisplayDevices" "TV"

(**) NVIDIA(0): Use of NVIDIA internal AGP requested

(--) NVIDIA(0): Linear framebuffer at 0xD0000000

(--) NVIDIA(0): MMIO registers at 0xE4000000

(II) NVIDIA(0): NVIDIA GPU detected as: GeForce4 Ti 4200

(--) NVIDIA(0): VideoBIOS: 04.25.00.29.10

(--) NVIDIA(0): Interlaced video modes are supported on this GPU

(II) NVIDIA(0): Detected AGP rate: 4X

(EE) NVIDIA(0): Failed to allocate config DMA context

(II) UnloadModule: "nvidia"

(II) UnloadModule: "vgahw"

(II) Unloading /usr/X11R6/lib/modules/libvgahw.a

(EE) Screen(s) found, but none have a usable configuration.

...

```

Maybe this can help    :Confused: 

----------

## radek

Hmm, maybe we should compare kernel configs to find differences.

DaMause, could You please do it?

My config is at: my gentoo dev page

TIA

----------

## sLiCeR

 *radek wrote:*   

> Hmm, maybe we should compare kernel configs to find differences.
> 
> DaMause, could You please do it?
> 
> TIA

 

Here is mine http://slicer.homeip.net/FILES/

Maybe its a missing DMA setting or something?   :Wink: 

----------

## geki

soliad's patch works for rc3-mm1!  :Smile: 

anyone wants to check my kernel config:

http://geki.ath.cx/kernelconfig

rc3-mm1 has a bug with usb...  :Sad: 

----------

## geki

a guess in the blue, what kernel boot options you guys (the ones where it does not work) have? any with video of vesafb-tng?

I deleted this video option with rc2-mm4, may be has sth to do with that... it influence the gfx card, may be...

----------

## firephoto

No boot options except "gentoo=nodevfs".

Are we talking about the same kernels because some are

saying -rc*-mm* when here I'm talking about the plain

jane vanilla no frills 2.6.9_rc3 kernel?

----------

## DaMouse

I have a working and non working config from the same kernel version (mm) but can't find on a quick look anything that links it to the rc3 error :/

-DaMouse

----------

## danone

All patches doesnt work for me X.Org started and black screen and system freezes imho. I tried DaMouse's 1.0.6111-r3 it gives me that device is missing or driver is missing although its loaded..*sight*

And the latest one from geki wont work X.Org started and black screen and system hung-hard reset

----------

## sLiCeR

So I gave up, switched back to 2.6.9_rc2, lets hope nvidia-kernel is working again in final 2.6.9

 :Confused: 

----------

## firephoto

Nvidia-kernel will only work with 2.6.9 if Nvidia releases new drivers. The kernel change is permanent it seems so nvidia needs to change their source for the drivers.

----------

## Insanity5902

Just throwing in my experience.

I just updated to the mm-sources, and had problems with the nvidia kernel, found this thread, tried the first fix and that didn't work then skipped to the end to DaMouse's -r3 ebuld and it works fine.

----------

## R-Type

I tried damouse's r3 build.

The module loads alright, but I get "(EE) NVIDIA(0): Failed to allocate config DMA context" when I try to start Xorg.  I spent some time with the source but wasn't able to get real far.  Out of my league I guess.  Any ideas?

Earlier kernels have been working fine.

p3 850

440BX

geforce 2 ultra (bladerunner)

2.6.9-rc3-mm1 http://home.comcast.net/~orez-bus/rc3-mm1.txt

xorg 6.8.0

gcc-3.4.1

----------

## Insanity5902

R-Type - try updated xorg, the latest is 6.8.0-r1, don't know but it my be worth a shot.

----------

## R-Type

 *Insanity5902 wrote:*   

> R-Type - try updated xorg, the latest is 6.8.0-r1, don't know but it my be worth a shot.

 

Well I suspect its kernel<-->nvidia related.  the same xorg install works fine with older kernels.  I am already running 6.8.0-r1.

----------

## newblar

How many of you have update nvidia-glx ?

----------

## Insanity5902

i am funning nvidia-glx-1.0.6111 .  Which is the standard one in portage.

----------

## geki

there is a new nvidia-kernel update in portage anyone may try that...

----------

## R-Type

tried that new r2 in portage..now I get

"Failed to allocate a DMA context

pushbuffer DMA allocation failed

***aborting***

failed to allocate DMA pushbuffer"

etc, when I start X.  The module loads fine.

----------

## kuba

http://kernel.damouse.co.uk/nvidia-kernel-1.0.6111-r3.tar.bz2

works nice with 2.6.9-rc3-mm2

allthough (not nvidia related) i had to patch kernel with:

linux.kernel

```

--- 25/include/linux/netfilter_ipv4/ip_conntrack.h~conntrack-preempt-safety-fix Mon Oct  4 14:36:19 2004

+++ 25-akpm/include/linux/netfilter_ipv4/ip_conntrack.h Mon Oct  4 14:37:02 2004

@@ -311,10 +311,11 @@ struct ip_conntrack_stat

  unsigned int expect_delete;

 };

 

-#define CONNTRACK_STAT_INC(count)    \

- do {       \

-  per_cpu(ip_conntrack_stat, get_cpu()).count++; \

-  put_cpu();     \

+#define CONNTRACK_STAT_INC(count)     \

+ do {        \

+  preempt_disable();     \

+  per_cpu(ip_conntrack_stat, smp_processor_id()).count++; \

+  preempt_disable();     \

  } while (0)

 

 /* eg. PROVIDES_CONNTRACK(ftp); */

_

--- 25/include/linux/netfilter_ipv4/ip_conntrack.h~conntrack-preempt-safety-fix Mon Oct  4 14:36:19 2004

+++ 25-akpm/include/linux/netfilter_ipv4/ip_conntrack.h Mon Oct  4 14:37:02 2004

@@ -311,10 +311,11 @@ struct ip_conntrack_stat

  unsigned int expect_delete;

 };

 

-#define CONNTRACK_STAT_INC(count)    \

- do {       \

-  per_cpu(ip_conntrack_stat, get_cpu()).count++; \

-  put_cpu();     \

+#define CONNTRACK_STAT_INC(count)     \

+ do {        \

+  preempt_disable();     \

+  per_cpu(ip_conntrack_stat, smp_processor_id()).count++; \

+  preempt_disable();     \

  } while (0)

 

 /* eg. PROVIDES_CONNTRACK(ftp); */

_

```

----------

## fallow

black screen on rc3-mm2 with http://kernel.damouse.co.uk/nvidia-kernel-1.0.6111-r3.tar.bz2 here .... 

greetings  :Smile: 

----------

## Insanity5902

 *fallow wrote:*   

> black screen on rc3-mm2 with http://kernel.damouse.co.uk/nvidia-kernel-1.0.6111-r3.tar.bz2 here .... 
> 
> greetings 

 

I know it is dumb, but I did it:  

Did you startx has root?  I did, not thinking, after putting in rc3-mm1 and thought it was broke, then I realized what I did.

----------

## fallow

hehe, You`re right Insanity5902 .

thx:)

starting as root - black screen

non-root - ok 

but i`m used to / I often starting x`s as root 

maybe some idea to fix that ?  :Very Happy: 

greetings  :Smile: 

----------

## DaMouse

fix: run X as a user, really, its better for your health  :Smile: 

Ok, can people try the patch from kuba to fix their problems, sorry i went away for a bit because i got my forum account all messed  :Smile: 

-DaMouse

----------

## oggialli

Why don't you use xdm/kdm/gdm/entrance?

----------

## Insanity5902

 *oggialli wrote:*   

> Why don't you use xdm/kdm/gdm/entrance?

 

is that a question or a suggestion?

----------

## fallow

 *oggialli wrote:*   

> Why don't you use xdm/kdm/gdm/entrance?

 

I don`t like them all  :Smile: 

 *DaMouse wrote:*   

> fix: run X as a user, really, its better for your health 
> 
> 

 

hehe , exactly , that is the gold fix  :Smile: 

but at home I want to have capability of run X`s as root . however it`s work with mm3

greetings  :Smile: 

----------

## gun26

I just compiled the new 2.6.10-rc1-mm1 kernel, and I can get the nvidia-kernel to build but not load. Whether I use the Gentoo nvidia-kernel-1.0.6111-r2 ebuild or Damouse's -r3 ebuild referenced in this thread, the module refuses to load, with this appearing in dmesg:

```
nvidia: Unknown symbol class_simple_device_add

nvidia: Unknown symbol class_simple_destroy

nvidia: Unknown symbol class_simple_device_remove

nvidia: Unknown symbol class_simple_create

```

Do we need a new mm fix for the ebuild? I took a look at both Nvidia's forum and lkml but I didn't spot any posts about this.

----------

## potenzial

There is a disscussion on the lkm...

http://marc.theaimsgroup.com/?l=linux-kernel&m=109888555300351&w=2

----------

## gun26

Thanks, potenzial. It looks like this is due to a change, in the form of EXPORT_SYMBOL_GPL(), that Nvidia and other providers of non-GPL modules will have to deal with. I didn't see the discussion because I look in on lkml via the lkml.org web site and none of today's messages seem to be showing up for some reason.

Oh well, no biggie - I have two very good functioning Reiser4-enabled kernels to use in the absence of mm - vivid-sources and nitro-sources, both of which are working fine here and both including Spock's gensplash eye candy, which won't work on mm sources (or not yet, anyway.)

----------

## peabody124

i really hope they are working with nvidia to get this fixed as soon as possible.  looks like the kernel maintainers have changed the permissions of some functions nvidia uses to only GPL'd software.  considering most of the linux world only has the option of nvidia for a decent gfx card, i hope this is addressed.

----------

## firephoto

I really don't get what the point of this latest change is. It's obviously coming from the top this time (Linus) and even though nvidia was correct in the way they were using what was there in the kernel the way it is handled was changed breaking some non-GPL'd software. Are they trying to push nvidia into opening up their drivers? If they are should they be doing this even? Is this something that is happening so these apparent bad changes won't matter in the near future? I really like how well my nvidia drivers work and I honestly don't give a crap what license they fall under if they work and they give them too me to use like a friend hands me an ice cold beer for me to drink...... I don't see nvidia calling me and saying "haha, you have our proprietary drivers, your box is ours!".   :Rolling Eyes: 

Anyone have an 8x agp graphics card with 256mb memory, opengl capable, with pure open source gpl'd till the cows come home, and can produce 100fps @ 1024x768+ with any of the games that are popular for linux? Oh it has to be less than..... $350 too.

I'm glad nvidia is working good with the patches and 2.6.9 kernels now.

----------

## djcapelis

Yes, the dev responsible for the change is trying to push nvidia towards a GPL license for their drivers.  It's not coming from the top and Linus actually seems to have a policy about reclassifying things into GPL-only that weren't.  That however, is exactly what has happened here.

As for just changing the symbols from EXPORT_SYMBOL_GPL to EXPORT_SYMBOL... well, I tried that and blank screen bad things seemed to happen... so I did it some more and it still didn't work.  *shrug*

Although... we might try changing the module_license parameter for Nvidia's source code... they certainly can't do that to fix it... but as we don't have any rights to it, we probably can.  Although it might be copyright infringement... hmmm, I wonder.

----------

## geki

why don't you guys look at mm's broken-out and unpatch the non->gpl patches? ^^ since Andrew likes long patch names shouldnt be that difficult  :Wink: 

----------

## firephoto

I quit using the rc kernels and never use the mm kernels due to the instability since 2.6.8. Hopefully nvidia can come up with a fix for the "kernel dev playing god" problem by the time 2.6.10 goes to stable release.

----------

## fallow

2610-rc1-mm2 here..

after changed EXPORT_SYMBOL_GPL to EXPORT_SYMBOL in kernel source , nvidia module wad loaded fine , but black screen after startx... ;(

greetz

----------

## DaMouse

Bit busy at the moment, try reversing

http://kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.10-rc1/2.6.10-rc1-mm2/broken-out/bk-pci.patch

I haven't got much time to fix stuff at the moment  :Sad: 

-DaMouse

----------

## DaMouse

And perhaps

http://kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.10-rc1/2.6.10-rc1-mm2/broken-out/bk-driver-core.patch

since it has the _GPL changes  :Smile: 

-DaMouse

P.S. just reversing the entire mm in one stage works to lol  :Razz: 

----------

## firephoto

Does this mean the latest changes are being reversed?

http://marc.theaimsgroup.com/?l=linux-kernel&m=109935991217693&w=2

 *Quote:*   

> 
> 
> On Sat, Oct 30, 2004 at 04:44:33PM +0200, Fabio Coatti wrote:
> 
> > 
> ...

 

Other reading there led me to believe that this change would mean that non-GPL kernel drivers would not be able to use hotplug and udev so I hope that these changes are thrown out since they left the door open for 9 months or so and allowed everyone to make udev based drivers.

It almost getting to the point where there needs to be a kernel interface that is gpl'd that non-gpl drivers can use so they don't have to "touch" the kernel and "taint" it.   :Rolling Eyes: 

----------

## thubble

What is the logic behind "tainting," anyway? Contrary to popular opinion, nVidia's module is NOT binary-only, the source is available, which is why Gentoo can apply the udev patches, etc. It's just not GPL compatible. According to "Greg KH" though, these changes will probably be reversed, hopefully in the next -mm. Until then I'm using the nv driver, which works just as well as long as you're not using OpenGL or transparency.

----------

## dtor

No it is closed - there is a several MB binary object file without source. Only glue between that BLOB and kernel is provided with sources.

----------

## Eskarel

I still personally don't understand the logic behind punishing one of the few companies which provides top drawer linux drivers over something so purely ideological. I mean Linux needs more companies supporting their products not fewer, regardless of the license they release under.

----------

## DaMouse

 *Eskarel wrote:*   

> I still personally don't understand the logic behind punishing one of the few companies which provides top drawer linux drivers over something so purely ideological. I mean Linux needs more companies supporting their products not fewer, regardless of the license they release under.

 

So how come ATI manages to send out open source (notably crappy) drivers? It can be done if they wanted to do it which Greg KH is trying to force them to do.

-DaMouse

----------

## fallow

after reversing http://kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.10-rc1/2.6.10-rc1-mm2/broken-out/bk-driver-core.patch and  http://kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.10-rc1/2.6.10-rc1-mm2/broken-out/bk-pci.patch

black screeen also .

i have black screen also with 6629 version and 2610-rc1-bkX kernel.  :Sad:  (module was loaded fine , without errors ) 

greetings

----------

## Dragonlord

I'm now a bit confused about that VMALLOC issue. I'm ****ed up due to it right now (meaning I'm using the xorg nv driver for the moment, which is rather lame on my GeForce2 MX). So how do I get this hack into my machine using only conventional emerge stuff? I'm just asking as I've never done before messing around in the portage tree sources on my machine and this has to be a production system later on so... yeah... does it make sense to hack it and how?

----------

## cyfred

6629 is in portage

6111-r3 is now marked stable

VMALLOC is fixed in both.

----------

## Eskarel

 *DaMouse wrote:*   

>  *Eskarel wrote:*   I still personally don't understand the logic behind punishing one of the few companies which provides top drawer linux drivers over something so purely ideological. I mean Linux needs more companies supporting their products not fewer, regardless of the license they release under. 
> 
> So how come ATI manages to send out open source (notably crappy) drivers? It can be done if they wanted to do it which Greg KH is trying to force them to do.
> 
> -DaMouse

 

True, but wouldn't you rather have good proprietary drivers than crappy open sources ones?

----------

## headgap

dumb question:

so if 6111-r3 is marked 'stable', does it have a minimum

kernel revision requirement?

cuz against 2.6.7-r11

modprobe nvidia => 'invalid module format', still

----------

