nV News Forums


nV News Forums (http://www.nvnews.net/vbulletin/index.php)
-   NVIDIA Linux (http://www.nvnews.net/vbulletin/forumdisplay.php?f=14)
-   -   nvsound driver 0310 on kernel 2.6.16 solved! (http://www.nvnews.net/vbulletin/showthread.php?t=69012)

usury 04-23-06 10:26 PM

nvsound driver 0310 on kernel 2.6.16 solved!
If you have been having problems getting nvsound to install from the 0310 chipset driver on kernel 2.6.16, I have a solution. I am on an AMDx86_64 installation of RedHat FC4

After installing the new kernel (and source tree) from rpm, I was able to get the most recent nvidia video driver and network driver built without problems. The audio driver was a problem.

When attempting to build the audio driver with nvidia's "run" package, I received the errror message that the driver could not be built and perhaps the kernel source tree isn't installed. (It was.)

At the same time, a log entry would say "nvsound: Unknown symbol remap_page_range" (type dmesg and see for yourself)

So, I did some digging. Somewhere between 2.6.15 and 2.6.16, the kernel function "remap_page_range" was renamed "remap_pfn_range". Nvidia's makefile for nvsound knows about this and attempts to determine which function is implimented on your linux install.

It does this by compiling a tiny c-program. It assumes if the compilation is NOT successful, remap_pfn_range is NOT available on your installation and proceeds to try to use remap_page_range instead. This leads to our problems on 2.6.16.

The compilation of the tiny c-program does indeed fail. However, it fails for a reason unrelated to remap_page_range vs remap_pfn_range.

(If you extract the "run" package" with...
sh NFORCE-Linux-x86_64-1.0-0310-pkg1.run -x
cat NFORCE-Linux-x86_64-1.0-0310-pkg1/nvsound/main/conftest.sh
you will see a case called "remap_pfn_range" which is called from Makefile.kbuild to determine how to handle the renamed function described above.)

The problem happens in a header file in the 2.6.16 source tree. (You get more hints if you view the compiler errors of the small c-program.) The following link describes the change someone else on the Internet discovered...


The file is /lib/modules/2.6.16-1.2096_FC4/build/include/linux/spinlock.h
(be sure to substitute the name of your actual desired source tree - should be what you get by typing uname -r).

I fixed my build/install problem of the audio driver by changing the first #define line in the file (after all the comments) from...



#define LOCK_SECTION_NAME ".text.lock." __stringify(KBUILD_BASENAME)

I was able to successfully build and install the nvsound driver after making that change. No changes whatsoever were required in the nvidia installer sources, makefiles, etc.

I don't know if "spinlock.h" is eventually included by the nvidia driver or if it was just needed because the makefile needed to determine whether remap_page_range or remap_pfn_range is the appropriate function.

I hope this helps someone - it took me hours to dig out an answer.

Miles Heighway 04-24-06 10:16 AM

Re: nvsound driver 0310 on kernel 2.6.16 solved!
Thanks usury. I'll give it a go.

All times are GMT -5. The time now is 03:14 PM.

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