Date: Thu, 14 Mar 2013 20:43:09 -0700 (PDT) From: David Wolfskill <david@catwhisker.org> To: FreeBSD-gnats-submit@freebsd.org Subject: ports/176980: x11/nvidia-driver build fails on head @r248084 Message-ID: <201303150343.r2F3h9tN063043@albert.catwhisker.org> Resent-Message-ID: <201303150350.r2F3o0TM032053@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 176980 >Category: ports >Synopsis: x11/nvidia-driver build fails on head @r248084 >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Mar 15 03:50:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: David Wolfskill >Release: FreeBSD 10.0-CURRENT i386 >Organization: Wolfskill & Dowling Residence >Environment: System: FreeBSD g1-235.catwhisker.org 10.0-CURRENT FreeBSD 10.0-CURRENT #832 r248033M/248035: Fri Mar 8 07:36:04 PST 2013 root@localhost:/usr/obj/usr/src/sys/CANARY i386 >Description: r248084 made some changes in src/sys/vm/vm_pager that break the build of ports/x11/nvidia-driver (as of r312359). >How-To-Repeat: Update ports to at least r312359 and src to at least r248084; while running head (10.0-CURRENT) built from those sources, attempt to build ports/x11/nvidia-driver (e.g., "portmaster x11/nvidia-driver"). I originally wrote this as seen in <http://docs.FreeBSD.org/cgi/mid.cgi?20130309153454.GS13861>. >Fix: The below patch allows the port to build under both head and stable/9. It is, however, possible that I've failed to get the OSVERSION quite right. Index: x11/nvidia-driver/Makefile --- x11/nvidia-driver/Makefile 2013-03-09 07:11:03.000000000 -0800 +++ x11/nvidia-driver/Makefile 2013-03-09 06:48:18.000000000 -0800 @@ -86,6 +86,10 @@ PLIST_SUB+= LINUXBASE=${LINUXBASE} SHLIB_VERSION=${PORTVERSION} \ MODULESDIR=${MODULESDIR} +. if ${OSVERSION} > 1000028 +EXTRA_PATCHES+= ${FILESDIR}/r248084-patch-src-nv-freebsd.h +EXTRA_PATCHES+= ${FILESDIR}/r248084-patch-src-nvidia_subr.c +. endif .if ${PORT_OPTIONS:MLINUX} CONFLICTS= linux[-_]dri-[0-9]* linux-f10-dri-[0-9]* Index: x11/nvidia-driver/files/r248084-patch-src-nv-freebsd.h --- x11/nvidia-driver/files/r248084-patch-src-nv-freebsd.h 1969-12-31 16:00:00.000000000 -0800 +++ x11/nvidia-driver/files/r248084-patch-src-nv-freebsd.h 2013-03-09 06:39:54.000000000 -0800 @@ -0,0 +1,10 @@ +--- src/nv-freebsd.h.orig 2013-01-14 14:38:44.000000000 -0800 ++++ src/nv-freebsd.h 2013-03-09 06:36:23.000000000 -0800 +@@ -77,6 +77,7 @@ + #include <vm/vm_object.h> + #include <vm/pmap.h> + #include <vm/vm_map.h> ++#include <sys/rwlock.h> + #include <vm/vm_pager.h> + #include <vm/uma.h> + Index: x11/nvidia-driver/files/r248084-patch-src-nvidia_subr.c --- x11/nvidia-driver/files/r248084-patch-src-nvidia_subr.c 1969-12-31 16:00:00.000000000 -0800 +++ x11/nvidia-driver/files/r248084-patch-src-nvidia_subr.c 2013-03-09 06:48:53.000000000 -0800 @@ -0,0 +1,56 @@ +--- src/nvidia_subr.c.orig 2013-01-14 14:38:44.000000000 -0800 ++++ src/nvidia_subr.c 2013-03-09 06:47:05.000000000 -0800 +@@ -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 |= 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 = 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 = at; + SLIST_INSERT_HEAD(&sc->alloc_list, at, list); >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201303150343.r2F3h9tN063043>