Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 242156 - downgrade to nvidia-drivers-173.14.12 fails on Linux 2.6.27-gentoo due to missing asm/semaphore.h
Summary: downgrade to nvidia-drivers-173.14.12 fails on Linux 2.6.27-gentoo due to mis...
Status: RESOLVED DUPLICATE of bug 236605
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal with 3 votes (vote)
Assignee: Ricardo Mendoza (RETIRED)
URL:
Whiteboard:
Keywords:
: 246425 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-10-15 09:13 UTC by Juergen Rose
Modified: 2008-12-18 21:03 UTC (History)
6 users (show)

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


Attachments
an elegant fix for the wrong include and the deprecated call to kill_proc (nvidia-drivers-kernel-2.6.27.patch,1.22 KB, patch)
2008-10-17 06:33 UTC, Arthur Nascimento
Details | Diff
same patch but merged with smp fix (nvidia-drivers-kernel-2.6.27.patch,2.66 KB, patch)
2008-10-17 15:38 UTC, Arthur Nascimento
Details | Diff
same patch but with a couple of fixes more (nvidia-drivers-kernel-2.6.27.patch,2.65 KB, patch)
2008-11-04 20:43 UTC, Arthur Nascimento
Details | Diff
old drivers ebuild using proposed patch works fine here (nvidia-drivers-96.43.07.ebuild,14.21 KB, text/plain)
2008-11-13 10:26 UTC, Stoian Ivanov
Details
same patch with a small fix (nvidia-drivers-kernel-2.6.27.patch,2.72 KB, patch)
2008-11-13 13:07 UTC, Arthur Nascimento
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Juergen Rose 2008-10-15 09:13:23 UTC
'emerge -uvDN world' fails with:
...
[ebuild     UD] x11-drivers/nvidia-drivers-173.14.12 [177.80] USE="acpi gtk (multilib) -custom-cflags" 0 kB
...
  x86_64-pc-linux-gnu-gcc -Wp,-MD,/var/tmp/portage/x11-drivers/nvidia-drivers-173.14.12/work/NVIDIA-Linux-x86_64-173.14.12-pkg2/usr/src/nv/.nv.o.d  -nostdinc -isystem /usr/lib/gcc/x86_64-pc-linux-gnu/4.3.2/include -D__KERNEL__ -Iinclude -Iinclude2 -I/usr/src_lynx/linux-2.6.27-gentoo/include -I/usr/src_lynx/linux-2.6.27-gentoo/arch/x86/include -include include/linux/autoconf.h  -I/var/tmp/portage/x11-drivers/nvidia-drivers-173.14.12/work/NVIDIA-Linux-x86_64-173.14.12-pkg2/usr/src/nv -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Os -m64 -march=core2 -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -I/usr/src_lynx/linux-2.6.27-gentoo/include/asm-x86/mach-default -Iinclude/asm-x86/mach-default -fno-stack-protector -fomit-frame-pointer -Wdeclaration-after-statement -Wno-pointer-sign  -I/var/tmp/portage/x11-drivers/nvidia-drivers-173.14.12/work/NVIDIA-Linux-x86_64-173.14.12-pkg2/usr/src/nv -Wall -Wimplicit -Wreturn-type -Wswitch -Wformat -Wchar-subscripts -Wparentheses -Wno-multichar -Werror -mcmodel=kernel -mno-red-zone -MD -Wno-cast-qual -Wno-error -D__KERNEL__ -DMODULE -DNVRM -DNV_VERSION_STRING=\"173.14.12\" -UDEBUG -U_DEBUG -DNDEBUG -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(nv)"  -D"KBUILD_MODNAME=KBUILD_STR(nvidia)" -c -o /var/tmp/portage/x11-drivers/nvidia-drivers-173.14.12/work/NVIDIA-Linux-x86_64-173.14.12-pkg2/usr/src/nv/nv.o /var/tmp/portage/x11-drivers/nvidia-drivers-173.14.12/work/NVIDIA-Linux-x86_64-173.14.12-pkg2/usr/src/nv/nv.c
In file included from /var/tmp/portage/x11-drivers/nvidia-drivers-173.14.12/work/NVIDIA-Linux-x86_64-173.14.12-pkg2/usr/src/nv/nv.c:14:
/var/tmp/portage/x11-drivers/nvidia-drivers-173.14.12/work/NVIDIA-Linux-x86_64-173.14.12-pkg2/usr/src/nv/nv-linux.h:107:27: error: asm/semaphore.h: No such file or directory



Reproducible: Always




root@lynx:/root(13)# emerge --info
Portage 2.2_rc12 (default/linux/amd64/2008.0, gcc-4.3.2, glibc-2.8_p20080602-r0, 2.6.27-gentoo x86_64)
=================================================================
System uname: Linux-2.6.27-gentoo-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T8300_@_2.40GHz-with-glibc2.2.5
Timestamp of tree: Wed, 15 Oct 2008 07:36:01 +0000
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7, 2.1.6-r1
dev-lang/python:     2.4.4-r13, 2.5.2-r8
dev-python/pycrypto: 2.0.1-r6
dev-util/cmake:      2.6.2
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.3.0-r1
sys-apps/sandbox:    1.2.18.1-r3
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.4_p6, 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.26
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-orphans userfetch"
FFLAGS="-march=nocona -O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LDFLAGS="-Wl,-O1"
LINGUAS="de fr"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/layman/science /usr/local/portage/layman/n4g /usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X Xaw3d a52 aac acl acpi administrator afs aiglx alsa amd64 amrr ao aotuv apache2 asf atlas auctex audacious audiofile automount bash-completion beagle berkdb bjam blas bluetooth bonobo boo boost bzip2 c++ cairo cardbus cdda cddb cdf cdio cdparanoia cdr cgi chm cli corba cracklib cran crypt cups curl cxx daap dbus device-mapper dga dia divx djvu dlloader dmi dri ds3490 dv dvb dvd dvdr dvi dxr3 dynagraph eds effects elf emacs emboss encode epiphany esd evo examples exif expat extra fam fame ffmpeg fftw firefox fits flac fltk foomaticdb fortran fpx galago gd gdal gdbm geos gif gimp gimpprint ginac glade glitz gml gmp gnokii gnome gnuplot gnutls gphoto2 gpm graphics graphviz gs gsl gsm gstreamer gtk guile hal hardened hddtemp hdf hdf5 hlapi http hvm iconv icq icu id3 imagemagick imap innodb ipv6 irda irmc isdnlog ithreads jabber java jbig john jpeg jpeg2k kerberos kexi keyring ladspa lame lapack laptop latex lcms ldap libffi libgda libsamplerate lirc lua lzo lzw mad maildir math matroska midi mmx mmxext mng mod mono motif mozdevelop mozilla mozsvg mozxmlterm mp3 mp4 mp4live mpeg mpeg2 mplayer mudflap multilib musicbrainz mysql mysqli nautilus ncurses neXt netcdf netpbm network networkmanager nfs nls nntp nptl nptlonly nsplugin ntfs numarray numeric nvidia obex ocaml octave odbc ogdi ogg ole opengl openmp pae pam pcre pda pdf perl plotutils plugins png posix postgres postscript pppd preview-latex proj projectx pstricks python qhull quicktime readline reflection reiserfs rhythmbox rle rpc rrdcgi rrdtool samba sasl science sdl session slang slp smp sndfile snmp soup sox speex spell spl sqlite sse sse2 ssl stlport subtitles subversion suexec svg sysfs t1lib tcl tcpd tex theora threads thunderbird tidy tiff tk truetype unicode userlocales utempter v4l2 vorbis wifi wmf wxwindows xattr xemacs xext xine xml xmlreader xmlrpc xorg xpm xulrunner xv xvid xvmc zlib zvbi" ALSA_CARDS="intel8x0" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" DVB_CARDS="usb-wt220u " ELIBC="glibc" INPUT_DEVICES="keyboard mouse                 synaptics               " KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de fr" USERLAND="GNU" VIDEO_CARDS="nv nvidia vesa"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Azamat H. Hackimov 2008-10-16 15:17:57 UTC
See #236605.
Try patch from this bug, it might work for 173.14.12 legacy drivers.
Comment 2 Arthur Nascimento 2008-10-17 06:33:41 UTC
Created attachment 168768 [details, diff]
an elegant fix for the wrong include and the deprecated call to kill_proc

I did this patch before finding out that the problem had already a fix with bug #236605. However, on the two points that I touched (the include and the reference to kill_proc), I do prefer my fix over the other patch.
Comment 3 filip 2008-10-17 13:35:26 UTC
I tried the patch - and unfortunately it's not enough. Now I get this error instead:

  x86_64-pc-linux-gnu-gcc -Wp,-MD,/var/tmp/portage/x11-drivers/nvidia-drivers-173.14.12-r1/work/NVIDIA-Linux-x86_64-173.14.12-pkg2/usr/src/nv/.nv.o.d  -nostdinc -isystem /usr/lib/gcc/x86_64-pc-linux-gnu/4.3.2/include -D__KERNEL__ -Iinclude  -I/usr/src/linux-2.6.27.1/arch/x86/include -include include/linux/autoconf.h -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Os -m64 -march=k8 -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -Iinclude/asm-x86/mach-default -fno-stack-protector -fomit-frame-pointer -Wdeclaration-after-statement -Wno-pointer-sign -I/var/tmp/portage/x11-drivers/nvidia-drivers-173.14.12-r1/work/NVIDIA-Linux-x86_64-173.14.12-pkg2/usr/src/nv -Wall -Wimplicit -Wreturn-type -Wswitch -Wformat -Wchar-subscripts -Wparentheses -Wno-multichar -Werror -mcmodel=kernel -mno-red-zone -MD -Wno-cast-qual -Wno-error -D__KERNEL__ -DMODULE -DNVRM -DNV_VERSION_STRING=\"173.14.12\" -UDEBUG -U_DEBUG -DNDEBUG -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(nv)"  -D"KBUILD_MODNAME=KBUILD_STR(nvidia)" -c -o /var/tmp/portage/x11-drivers/nvidia-drivers-173.14.12-r1/work/NVIDIA-Linux-x86_64-173.14.12-pkg2/usr/src/nv/nv.o /var/tmp/portage/x11-drivers/nvidia-drivers-173.14.12-r1/work/NVIDIA-Linux-x86_64-173.14.12-pkg2/usr/src/nv/nv.c
In file included from /var/tmp/portage/x11-drivers/nvidia-drivers-173.14.12-r1/work/NVIDIA-Linux-x86_64-173.14.12-pkg2/usr/src/nv/nv.c:15:
/var/tmp/portage/x11-drivers/nvidia-drivers-173.14.12-r1/work/NVIDIA-Linux-x86_64-173.14.12-pkg2/usr/src/nv/nv-linux.h: I funktion "nv_execute_on_all_cpus":
/var/tmp/portage/x11-drivers/nvidia-drivers-173.14.12-r1/work/NVIDIA-Linux-x86_64-173.14.12-pkg2/usr/src/nv/nv-linux.h:674: fel: för många argument till funktionen "on_each_cpu"
/var/tmp/portage/x11-drivers/nvidia-drivers-173.14.12-r1/work/NVIDIA-Linux-x86_64-173.14.12-pkg2/usr/src/nv/nv.c: I funktion "nv_kern_cpu_callback":
/var/tmp/portage/x11-drivers/nvidia-drivers-173.14.12-r1/work/NVIDIA-Linux-x86_64-173.14.12-pkg2/usr/src/nv/nv.c:1299: fel: för många argument till funktionen "smp_call_function"
/var/tmp/portage/x11-drivers/nvidia-drivers-173.14.12-r1/work/NVIDIA-Linux-x86_64-173.14.12-pkg2/usr/src/nv/nv.c:1306: fel: för många argument till funktionen "smp_call_function"
make[3]: *** [/var/tmp/portage/x11-drivers/nvidia-drivers-173.14.12-r1/work/NVIDIA-Linux-x86_64-173.14.12-pkg2/usr/src/nv/nv.o] Fel 1
make[2]: *** [_module_/var/tmp/portage/x11-drivers/nvidia-drivers-173.14.12-r1/work/NVIDIA-Linux-x86_64-173.14.12-pkg2/usr/src/nv] Fel 2
NVIDIA: left KBUILD.
nvidia.ko failed to build!
make[1]: *** [module] Fel 1
make: *** [module] Fel 2

Translation:
fel: för många argument till funktionen "on_each_cpu" 
= too many argument to the function "on_each_cpu"
...and likewise to "smp_call_function"

This is on a dual Opeteron running amd64, emerge --info:

Portage 2.2_rc12 (default-linux/amd64/2007.0/desktop, gcc-4.3.2, glibc-2.8_p20080602-r0, 2.6.25-gentoo-r1 x86_64)
=================================================================
System uname: Linux-2.6.25-gentoo-r1-x86_64-AMD_Opteron-tm-_Processor_242-with-glibc2.2.5
Timestamp of tree: Fri, 17 Oct 2008 05:45:03 +0000
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.4.4-r9, 2.5.2-r7
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
dev-util/cmake:      2.4.8
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.3.0-r1
sys-apps/sandbox:    1.2.18.1-r3
sys-devel/autoconf:  2.13, 2.61-r2
sys-devel/automake:  1.4_p6, 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.26
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-Os -march=opteron -pipe -frename-registers"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-Os -march=opteron -pipe -frename-registers"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://trumpetti.atm.tut.fi/gentoo/ http://ftp.linux.ee/pub/gentoo/distfiles/ http://ds.thn.htu.se/linux/gentoo http://ftp.du.se/pub/os/gentoo"
LANG="sv_SE.UTF-8"
LC_ALL="sv_SE.UTF-8"
LDFLAGS=""
LINGUAS="sv sv_SE"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X acl acpi alsa amd64 atm avahi avi bash-completion berkdb bluetooth bonjour browserplugin bzip2 cairo cdr cli cracklib crypt cscope cups dbus dga dhcp divx divx4linux dlloader dri dvd dvdr dvdread emboss encode esd evo evo2 exif fam fbdev ffmpeg firefox flac gdb gdbm gif glib gmedia gnutls gphoto2 gpm groupwise gstreamer gtk gtk2 gtkhtml hal iconv imagemagick irmc isdnlog jack jack-tmpfs java jpeg jpeg2k kde kdeenablefinal kerberos ldap libnotify live lua mad midi mikmod mmx mng mp3 mpeg msn mudflap mysql nas ncurses network nls nntp nptl nptlonly nsplugin nvidia ogg oggvorbis openal opengl openmp pam pcre pda pdf perl png pppd python qt qt3 qt3support qt4 quicktime readline reflection rtc scanner sdl session smp speex spell spl sse sse2 ssl startup-notification stencil-buffer svg syncml tcpd threads tiff truetype unicode usb utf8 v4l v4l2 vorbis wmf wmp xanim xinerama xml xml2 xorg xscreensaver xulrunner xv xvid xvmc zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x    ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3       trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="sv sv_SE" USERLAND="GNU" VIDEO_CARDS="nvidia nv"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 4 Arthur Nascimento 2008-10-17 15:38:19 UTC
Created attachment 168802 [details, diff]
same patch but merged with smp fix

I hadn't noticed the problem with smp, since I don't use smp. This is the same patch I submitted earlier, but merged with the smp parts of the patch on bug #236605.
I tested this on 2 versions of nvidia-drivers and 2 versions of vanilla-sources (2.6.26 and 2.6.27.1), so it should work, I think.
Comment 5 Matthias Schwarzott gentoo-dev 2008-10-22 20:18:20 UTC
(In reply to comment #4)
> Created an attachment (id=168802) [edit]
> same patch but merged with smp fix
> 
That patch works for me.
Comment 6 Stoian Ivanov 2008-11-04 10:41:51 UTC
how about a patch for x11-drivers/nvidia-drivers-96 series?
Comment 7 Arthur Nascimento 2008-11-04 20:43:22 UTC
Created attachment 170738 [details, diff]
same patch but with a couple of fixes more

Thanks to Stoian, I took another look at that patch and found a couple of problems. Now they are fixed, and by my tests (more thorough this time) it should work on almost all versions of nvidia-drivers and on all kernels of the 2.6 family.
I tested on nvidia-drivers 71.86.06, 96.43.07 and 173.14.12 and on vanilla-sources versions 2.6.16.60, 2.6.26 and 2.6.27.1. Worked on all of them (compiled, booted and loaded).
But nvidia-drivers-177 does not accept the patch. Instead, it compiles well without it. (I did not boot and load it since my graphics card is not supported by nvidia-drivers-177.)
Comment 8 Joan Ibanez 2008-11-06 13:26:46 UTC
173.14.15 is out. And it has 'Improved compatibility with recent Linux kernels'.

http://www.nvnews.net/vbulletin/showthread.php?t=122423
Comment 9 Peter Read 2008-11-08 18:24:00 UTC
what're the chances of a version bump to the .15 beta for ~arch?  (or even unkeyworded/masked)  Anyone not needing the legacy support on ~amd64 or ~x86 will be using the 177.x series anyway...
Comment 10 Peter Read 2008-11-08 18:42:49 UTC
(in case it helps the cause, I've just edited the ebuild to use ftp://download.nvidia.com instead of http://us.download.nvidia.com, digested and emerged and looks to be ok, although I've yet to reboot...)
Comment 11 Stoian Ivanov 2008-11-13 10:26:51 UTC
Created attachment 171622 [details]
old drivers ebuild using proposed patch works fine here

I didn't think this will take that long to go to portage .. so i'm adding the modified ebuild here
Comment 12 Arthur Nascimento 2008-11-13 12:48:52 UTC
Comment on attachment 170738 [details, diff]
same patch but with a couple of fixes more

diff -Nur a/usr/src/nv/nv.c b/usr/src/nv/nv.c
--- a/usr/src/nv/nv.c	2008-11-04 18:17:51.000000000 -0200
+++ b/usr/src/nv/nv.c	2008-11-04 18:19:56.000000000 -0200
@@ -1296,14 +1296,22 @@
             if (get_cpu() == cpu)
                 __nv_setup_pat_entries(NULL);
             else
+            #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
+                smp_call_function(__nv_setup_pat_entries, hcpu, 1);
+            #else
                 smp_call_function(__nv_setup_pat_entries, hcpu, 1, 1);
+           	#endif
             put_cpu();
             break;
         case CPU_DOWN_PREPARE:
             if (get_cpu() == cpu)
                 __nv_restore_pat_entries(NULL);
             else
+            #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
+                smp_call_function(__nv_restore_pat_entries, hcpu, 1);
+            #else
                 smp_call_function(__nv_restore_pat_entries, hcpu, 1, 1);
+            #endif
             put_cpu();
             break;
     }
diff -Nur a/usr/src/nv/nv-linux.h b/usr/src/nv/nv-linux.h
--- a/usr/src/nv/nv-linux.h	2008-11-04 18:17:51.000000000 -0200
+++ b/usr/src/nv/nv-linux.h	2008-11-04 18:24:06.000000000 -0200
@@ -104,7 +104,11 @@
 #endif
 
 #include <linux/spinlock.h>
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
+#include <linux/semaphore.h>
+#else
 #include <asm/semaphore.h>
+#endif
 #include <linux/completion.h>
 #include <linux/highmem.h>
 
@@ -665,13 +669,21 @@
 #if defined(preempt_disable)
     preempt_disable();
 #endif
+    #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
+    ret = smp_call_function(func, info, 1);
+    #else
     ret = smp_call_function(func, info, 1, 1);
+    #endif
     func(info);
 #if defined(preempt_enable)
     preempt_enable();
 #endif
 #else
+    #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
+    ret = on_each_cpu(func, info, 1);
+    #else
     ret = on_each_cpu(func, info, 1, 1);
+    #endif
 #endif
     return ret;
 }
diff -Nur a/usr/src/nv/os-interface.c b/usr/src/nv/os-interface.c
--- a/usr/src/nv/os-interface.c	2008-11-04 18:17:51.000000000 -0200
+++ b/usr/src/nv/os-interface.c	2008-11-04 18:19:56.000000000 -0200
@@ -48,7 +48,11 @@
 #endif
     local_bh_disable();
     atomic_set(&os_smp_barrier, 1);
+    #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
+    ret = smp_call_function(ipi_handler, NULL, 0);
+    #else
     ret = smp_call_function(ipi_handler, NULL, 1, 0);
+    #endif
 #endif
     return (ret == 0) ? RM_OK : RM_ERROR;
 }
@@ -704,7 +708,7 @@
     U032 sig
 )
 {
-    return kill_proc(pid, sig, 1) ? RM_ERR_OPERATING_SYSTEM : RM_OK;
+    return send_sig(sig, find_task_by_vpid(pid), 0) ? RM_ERR_OPERATING_SYSTEM : RM_OK;
 }
 
 /*******************************************************************************/
Comment 13 Arthur Nascimento 2008-11-13 13:07:17 UTC
Created attachment 171632 [details, diff]
same patch with a small fix

Sorry about the last post. I am not well versed on bugzilla matters, so I didn't know what that "edit as comment" did. (Is there a way to edit the patch without resending it and obsoleting the last?)

Here is another commit of the patch. I noticed linux/semaphore.h had problems on old kernels. Fixed that.
Comment 14 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2008-11-14 14:09:24 UTC
Now that 173.14.15 adresses these problems with kernel-2.6.27 (see bug #246425 for reference), is this bug still needed?
Comment 15 Bernd Pachur 2008-12-17 19:20:23 UTC
When will 173.14.15 finally be in portage. The driver was released more than a month ago! Even if it is beta it could still be keyworded ~arch.

At the moment this bug is a blocker for me!

I need the 173.14.x branche because I have an older nvidia card that is not supported by the 177.x drivers.

If I do not want to mess around with local overlays, I have to decide either not to have X with legacy nvidia drivers or not to use the 2.6.27 kernels. The first option prevents the usage off the high end features of the card and the second option means not using the newest kernel and all the patches included (especially security related ones).

For now I will put 173.14.15 in my local overlay. But that can not be a general solution to this bug!

I think the severity of the bug should be changed from normal to block!
Comment 16 Doug Goldstein (RETIRED) gentoo-dev 2008-12-18 20:58:54 UTC
*** Bug 246425 has been marked as a duplicate of this bug. ***
Comment 17 Doug Goldstein (RETIRED) gentoo-dev 2008-12-18 21:03:24 UTC

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