From owner-freebsd-ports@FreeBSD.ORG Sun Mar 10 16:46:40 2013 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id C18D5DC4; Sun, 10 Mar 2013 16:46:40 +0000 (UTC) (envelope-from jamesbrandongooch@gmail.com) Received: from mail-oa0-f50.google.com (mail-oa0-f50.google.com [209.85.219.50]) by mx1.freebsd.org (Postfix) with ESMTP id 7338E6E0; Sun, 10 Mar 2013 16:46:40 +0000 (UTC) Received: by mail-oa0-f50.google.com with SMTP id l20so3724327oag.37 for ; Sun, 10 Mar 2013 09:46:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type:content-transfer-encoding; bh=Uxy9f6wI4PrZiOKDjK8Lu8qvQpdZ/3zj7fhfVmW0Gm4=; b=cN+SPDPon0cMfOg0n3ghXRtbb1IpID2An4EXFwYumZrQCz7lNg+vm0zHtML6wq90Mt 5IfTFizj/uqmzUnIV6Wh4WP+W7ywyPYntvXl2PgGFX2JcQd4Hu9JQA9XAgRJDo3RhVj4 Fsmk34fCJ18C3MrRi5fhDsF3tcXtigIT9ZbeubREaJrMYtVa9dZv1doidsGJhxk1Wdmc nPgQ0D9tN8jqIf+tehg2dTZKJtu1nj0Z4GUyf9kyybVZlFxBiypAluAtUKfetsRgGymK WDtRAdlEi06b5nxRP8eEB4hp2c1cQbDVrJo2JJBK1wha/MOJ1jK0Z2kGvCExL5Ss557g Jknw== MIME-Version: 1.0 X-Received: by 10.60.2.132 with SMTP id 4mr6552914oeu.52.1362933999620; Sun, 10 Mar 2013 09:46:39 -0700 (PDT) Received: by 10.182.144.99 with HTTP; Sun, 10 Mar 2013 09:46:39 -0700 (PDT) In-Reply-To: References: Date: Sun, 10 Mar 2013 11:46:39 -0500 Message-ID: Subject: Re: nvidia-driver broken by recent commit - 248084 From: Brandon Gooch To: AN Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: danfe@freebsd.org, freebsd-ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Mar 2013 16:46:40 -0000 On Sun, Mar 10, 2013 at 1:17 AM, AN wrote: > > FreeBSD FBSD10 10.0-CURRENT FreeBSD 10.0-CURRENT #36 r248127: Sun Mar 10 = 00:13:59 CST 2013 root@FBSD10:/usr/obj/usr/src/sys/MYKERNEL amd64 > > /usr/ports/x11/nvidia-driver is broken, probably by this commit: > http://svnweb.freebsd.org/base?view=3Drevision&revision=3D248084 > > From commit log:"The KPI results heavilly broken by this commit. Thirdy = part ports must be updated accordingly (I can think off-hand of VirtualBox,= for example)." > > > > root@FBSD10 /usr/ports/x11/nvidia-driver]# make clean > =3D=3D=3D> Cleaning for nvidia-driver-310.32 > [root@FBSD10 /usr/ports/x11/nvidia-driver]# make install clean > =3D=3D=3D> License NVIDIA accepted by the user > =3D=3D=3D> Found saved configuration for nvidia-driver-304.64 > =3D=3D=3D> nvidia-driver-310.32 depends on file: /usr/local/sbin/pkg - = found > =3D=3D=3D> Extracting for nvidia-driver-310.32 > =3D> SHA256 Checksum OK for NVIDIA-FreeBSD-x86_64-310.32.tar.gz. > =3D=3D=3D> Patching for nvidia-driver-310.32 > =3D=3D=3D> Applying extra patch /usr/ports/x11/nvidia-driver/files/r2460= 85-patch-src-nvidia_linux.c > =3D=3D=3D> nvidia-driver-310.32 depends on file: /usr/local/libdata/pkg= config/xorg-server.pc - found > =3D=3D=3D> nvidia-driver-310.32 depends on shared library: GL.1 - found > =3D=3D=3D> Configuring for nvidia-driver-310.32 > =3D=3D=3D> Building for nvidia-driver-310.32 > =3D=3D=3D> src (all) > @ -> /usr/src/sys > machine -> /usr/src/sys/amd64/include > x86 -> /usr/src/sys/x86/include > awk -f @/tools/makeobjops.awk @/kern/device_if.m -h > awk -f @/tools/makeobjops.awk @/kern/bus_if.m -h > awk -f @/tools/makeobjops.awk @/dev/pci/pci_if.m -h > awk -f @/tools/vnode_if.awk @/kern/vnode_if.src -p > awk -f @/tools/vnode_if.awk @/kern/vnode_if.src -q > awk -f @/tools/vnode_if.awk @/kern/vnode_if.src -h > cc -O2 -pipe -fno-strict-aliasing -DNV_VERSION_STRING=3D\"310.32\" -D__KE= RNEL__ -DNVRM -Wno-unused-function -Wuninitialized -O -mno-red-zone -mcmode= l=3Dkernel -UDEBUG -U_DEBUG -DNDEBUG -Werror -D_KERNEL -DKLD_MODULE -nostdi= nc -I. -I. -I@ -I@/contrib/altq -fno-common -fno-omit-frame-pointer -mno-= aes -mno-avx -mcmodel=3Dkernel -mno-red-zone -mno-mmx -mno-sse -msoft-float= -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -std=3Di= so9899:1999 -Qunused-arguments -fstack-protector -Wall -Wredundant-decls -W= nested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -W= inline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing= -include-dirs -fdiagnostics-show-option -Wno-error-tautological-compare -Wn= o-error-empty-body -Wno-error-parentheses-equality -c nvidia_ctl.c > In file included from nvidia_ctl.c:14: > In file included from ./nv-freebsd.h:77: > @/vm/vm_pager.h:127:2: error: implicit declaration of function 'rw_assert= ' is invalid in C99 [-Werror,-Wimplicit-function-declaration] > VM_OBJECT_ASSERT_WLOCKED(object); > ^ > @/vm/vm_object.h:212:2: note: expanded from macro 'VM_OBJECT_ASSERT_WLOCK= ED' > rw_assert(&(object)->lock, RA_WLOCKED) > ^ > In file included from nvidia_ctl.c:14: > In file included from ./nv-freebsd.h:77: > @/vm/vm_pager.h:127:2: error: use of undeclared identifier 'RA_WLOCKED' > VM_OBJECT_ASSERT_WLOCKED(object); > ^ > @/vm/vm_object.h:212:29: note: expanded from macro 'VM_OBJECT_ASSERT_WLOC= KED' > rw_assert(&(object)->lock, RA_WLOCKED) > ^ > In file included from nvidia_ctl.c:14: > In file included from ./nv-freebsd.h:77: > @/vm/vm_pager.h:144:2: error: use of undeclared identifier 'RA_WLOCKED' > VM_OBJECT_ASSERT_WLOCKED(object); > ^ > @/vm/vm_object.h:212:29: note: expanded from macro 'VM_OBJECT_ASSERT_WLOC= KED' > rw_assert(&(object)->lock, RA_WLOCKED) > ^ > In file included from nvidia_ctl.c:14: > In file included from ./nv-freebsd.h:77: > @/vm/vm_pager.h:168:2: error: use of undeclared identifier 'RA_WLOCKED' > VM_OBJECT_ASSERT_WLOCKED(object); > ^ > @/vm/vm_object.h:212:29: note: expanded from macro 'VM_OBJECT_ASSERT_WLOC= KED' > rw_assert(&(object)->lock, RA_WLOCKED) > ^ > In file included from nvidia_ctl.c:14: > In file included from ./nv-freebsd.h:77: > @/vm/vm_pager.h:191:2: error: use of undeclared identifier 'RA_WLOCKED' > VM_OBJECT_ASSERT_WLOCKED(m->object); > ^ > @/vm/vm_object.h:212:29: note: expanded from macro 'VM_OBJECT_ASSERT_WLOC= KED' > rw_assert(&(object)->lock, RA_WLOCKED) > ^ > 5 errors generated. > *** [nvidia_ctl.o] Error code 1 > > Stop in /usr/ports/x11/nvidia-driver/work/NVIDIA-FreeBSD-x86_64-310.32/sr= c. > *** [all] Error code 1 > > Stop in /usr/ports/x11/nvidia-driver/work/NVIDIA-FreeBSD-x86_64-310.32. > *** [do-build] Error code 1 > > Stop in /usr/ports/x11/nvidia-driver. > *** [install] Error code 1 > > Stop in /usr/ports/x11/nvidia-driver. > [root@FBSD10 /usr/ports/x11/nvidia-driver]# Place the following diff in a file at /usr/ports/x11/nvidia-driver/files/patch-r248084-vm-locking-changes.diff (assuming your ports tree is at /usr/ports; adjust accordingly): --- src/nv-freebsd.h 2013-03-10 11:29:12.000000000 -0500 +++ src/nv-freebsd.h 2013-03-10 11:23:12.000000000 -0500 @@ -59,6 +59,7 @@ #include #include #include +#include #include #include --- src/nvidia_subr.c 2013-03-10 11:22:19.000000000 -0500 +++ src/nvidia_subr.c 2013-03-10 11:24:27.000000000 -0500 @@ -83,7 +83,7 @@ if (!sc->BAR_objects[i]) goto failed; - VM_OBJECT_LOCK(sc->BAR_objects[i]); + VM_OBJECT_WLOCK(sc->BAR_objects[i]); switch (i) { case NV_GPU_BAR_INDEX_FB: vm_object_set_memattr(sc->BAR_objects[i], @@ -95,7 +95,7 @@ VM_MEMATTR_UNCACHEABLE); break; } - VM_OBJECT_UNLOCK(sc->BAR_objects[i]); + VM_OBJECT_WUNLOCK(sc->BAR_objects[i]); } } @@ -541,9 +541,9 @@ goto failed; } - VM_OBJECT_LOCK(sc->UD_object); + VM_OBJECT_WLOCK(sc->UD_object); vm_object_set_memattr(sc->UD_object, VM_MEMATTR_UNCACHEABLE); - VM_OBJECT_UNLOCK(sc->UD_object); + VM_OBJECT_WUNLOCK(sc->UD_object); } nv->flags |=3D NV_FLAG_OPEN; @@ -965,9 +965,9 @@ goto failed; } - VM_OBJECT_LOCK(at->object); + VM_OBJECT_WLOCK(at->object); vm_object_set_memattr(at->object, attr); - VM_OBJECT_UNLOCK(at->object); + VM_OBJECT_WUNLOCK(at->object); *private =3D at; SLIST_INSERT_HEAD(&sc->alloc_list, at, list); @@ -1108,9 +1108,9 @@ goto failed; } - VM_OBJECT_LOCK(at->object); + VM_OBJECT_WLOCK(at->object); vm_object_set_memattr(at->object, attr); - VM_OBJECT_UNLOCK(at->object); + VM_OBJECT_WUNLOCK(at->object); *private =3D at; SLIST_INSERT_HEAD(&sc->alloc_list, at, list); -Brandon