Merge branch 'upstream'
authorSimon Schubert <simon.schubert@epfl.ch>
Wed, 9 Sep 2009 17:50:13 +0000 (19:50 +0200)
committerSimon Schubert <simon.schubert@epfl.ch>
Wed, 9 Sep 2009 17:50:46 +0000 (19:50 +0200)
Conflicts:
obj/libGLcore.so.1
src/Makefile
src/nv-freebsd.h

1  2 
lib/Makefile
src/Makefile
src/nv-freebsd.h
src/nvidia_os.c

diff --cc lib/Makefile
@@@ -59,7 -59,7 +59,7 @@@ beforeinstall
                        rm -f $${__file} ; \
                        continue ; \
                fi ; \
--              SUFFIX=`pkg_info -qW $${__file}` ; RESULT=$$? ; \
++              SUFFIX=`pkg_info -Fe $${__file}` ; RESULT=$$? ; \
                if [ -n "$${SUFFIX}" ] ; then \
                        ${ECHO} "       - File was installed by package $${SUFFIX}" ; \
                else \
diff --cc src/Makefile
@@@ -11,9 -11,9 +11,9 @@@ KMODDIR?=     /boot/module
  .endif
  
  SRCS=         nvidia_ctl.c nvidia_dev.c nvidia_linux.c nvidia_os.c nvidia_os_pci.c nvidia_os_registry.c nvidia_pci.c nvidia_subr.c nvidia_sysctl.c nvidia_i2c.c 
 -SRCS+=                device_if.h bus_if.h pci_if.h vnode_if.h
 +SRCS+=                device_if.h bus_if.h pci_if.h
- CFLAGS+=      -I${NVIDIA_ROOT}/src -DNV_VERSION_STRING=\"180.29\"
- CFLAGS+=      -D__KERNEL__ -DNVRM -DDEBUG -D_DEBUG -UNDEBUG -O 
+ CFLAGS+=      -I${NVIDIA_ROOT}/src -DNV_VERSION_STRING=\"185.18.36\"
+ CFLAGS+=      -D__KERNEL__ -DNVRM -UDEBUG -U_DEBUG -DNDEBUG -O -fno-defer-pop 
  
  OBJS+=                ${RMOBJ}
  .if ${BSDVER} >= 600000
  #include <vm/vm_object.h>
  #include <vm/pmap.h>
  #include <vm/vm_map.h>
 +#ifdef __FreeBSD__
  #include <vm/uma.h>
 +#endif
  
- #ifdef __FreeBSD__
 -#if __FreeBSD_version < 800004
++#if defined(__FreeBSD__) && __FreeBSD_version < 800004
  #include <pci/agpvar.h>
  #else
  #include <dev/agp/agpvar.h>
diff --cc src/nvidia_os.c
@@@ -741,3 -668,21 +691,21 @@@ RM_STATUS NV_API_CALL os_enable_console
  {
      return RM_OK;
  }
 -    mtx_lock(&mtx->mutex_mtx);
+ NvU64 NV_API_CALL os_acquire_spinlock(void *pSema)
+ {
+     struct os_mutex *mtx = pSema;
 -    mtx_unlock(&mtx->mutex_mtx);
++    spin_lock_wr(&mtx->lock);
+     return 0;
+ }
+ void NV_API_CALL os_release_spinlock(void *pSema, NvU64 oldIrql)
+ {
+     struct os_mutex *mtx = pSema;
++    spin_unlock_wr(&mtx->lock);
+ }