Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 487986 - nvidia-drivers with kernel >=3.11 not build (num_physpages incompatibility)
Summary: nvidia-drivers with kernel >=3.11 not build (num_physpages incompatibility)
Status: RESOLVED DUPLICATE of bug 447566
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: AMD64 Linux
: Normal major (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-14 09:25 UTC by Niels Dettenbach
Modified: 2013-10-14 12:30 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Niels Dettenbach 2013-10-14 09:25:24 UTC
Hi all,

nvidia-drivers could not be build on my system with kernel sources (gentoo-sources) up from 3.11.x - tested 3.11.4 and 3.11.2 kernel with nvidia-sources 325.15 and 331.13).

It seems that "num_physpages" got renamed into get_num_physpages" and "num_physpages" is not longer available in kernels >= 3.11.

--- snip ---
/data/Kernel/linux-git/arch/x86/include/asm/uaccess_64.h: In function ‘copy_from_user’:
   /data/Kernel/linux-git/arch/x86/include/asm/uaccess_64.h:62:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (likely(sz == -1 || sz >= n))
                               ^
   include/linux/compiler.h:152:40: note: in definition of macro ‘likely’
    # define likely(x) __builtin_expect(!!(x), 1)
                                           ^
   In file included from /tmp/selfgz7454/NVIDIA-Linux-x86_64-331.13/kernel/os-interface.c:15:0:
   /tmp/selfgz7454/NVIDIA-Linux-x86_64-331.13/kernel/os-interface.c: In function ‘os_get_system_memory_size’:
   /tmp/selfgz7454/NVIDIA-Linux-x86_64-331.13/kernel/nv-linux.h:961:41: error: ‘num_physpages’ undeclared (first use in this function)
    #define NV_NUM_PHYSPAGES                num_physpages
--- snap ---


I've done following patching for current nvidia-drivers-331.13:

--- snip ---
--- kernel.orig/nv-linux.h   2013-09-30 05:47:18.000000000 +0200
+++ kernel/nv-linux.h     2013-10-14 10:27:14.520070619 +0200
@@ -956,7 +956,11 @@
 #endif
 
 #if !defined(NV_VMWARE)
-#define NV_NUM_PHYSPAGES                num_physpages
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0)
+#define NV_NUM_PHYSPAGES               get_num_physpages
+#else
+#define NV_NUM_PHYSPAGES               num_physpages
+#endif
 #define NV_GET_CURRENT_PROCESS()        current->tgid
 #define NV_IN_ATOMIC()                  in_atomic()
 #define NV_LOCAL_BH_DISABLE()           local_bh_disable()

--- snap ---

Pls check back on other platforms and if it is notorious pls integrate the patch into the ebuild(s).


hth
cheerioh,


Niels Dettenbach.
Syndicat.com 
Internet & Open Source
http://syndicat.com
Comment 1 Jeroen Roovers gentoo-dev 2013-10-14 12:30:36 UTC

*** This bug has been marked as a duplicate of bug 447566 ***