svn commit: r190016 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb dev/drm

Robert Noland rnoland at FreeBSD.org
Thu Mar 19 00:39:08 PDT 2009


Author: rnoland
Date: Thu Mar 19 07:39:07 2009
New Revision: 190016
URL: http://svn.freebsd.org/changeset/base/190016

Log:
  Merge 189869
  
  Get rid of any remaining PZERO flags in mtx_sleep()
  
  Also, clean up some ifdef mess while I'm here.

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/dev/drm/drm_drv.c
  stable/7/sys/dev/drm/drm_lock.c
  stable/7/sys/dev/drm/radeon_cp.c

Modified: stable/7/sys/dev/drm/drm_drv.c
==============================================================================
--- stable/7/sys/dev/drm/drm_drv.c	Thu Mar 19 07:37:00 2009	(r190015)
+++ stable/7/sys/dev/drm/drm_drv.c	Thu Mar 19 07:39:07 2009	(r190016)
@@ -666,7 +666,7 @@ void drm_close(void *data)
 			}
 			/* Contention */
 			retcode = mtx_sleep((void *)&dev->lock.lock_queue,
-			    &dev->dev_lock, PZERO | PCATCH, "drmlk2", 0);
+			    &dev->dev_lock, PCATCH, "drmlk2", 0);
 			if (retcode)
 				break;
 		}

Modified: stable/7/sys/dev/drm/drm_lock.c
==============================================================================
--- stable/7/sys/dev/drm/drm_lock.c	Thu Mar 19 07:37:00 2009	(r190015)
+++ stable/7/sys/dev/drm/drm_lock.c	Thu Mar 19 07:39:07 2009	(r190016)
@@ -82,7 +82,7 @@ int drm_lock(struct drm_device *dev, voi
 
 		/* Contention */
 		ret = mtx_sleep((void *)&dev->lock.lock_queue, &dev->dev_lock,
-		    PZERO | PCATCH, "drmlk2", 0);
+		    PCATCH, "drmlk2", 0);
 		if (ret != 0)
 			break;
 	}

Modified: stable/7/sys/dev/drm/radeon_cp.c
==============================================================================
--- stable/7/sys/dev/drm/radeon_cp.c	Thu Mar 19 07:37:00 2009	(r190015)
+++ stable/7/sys/dev/drm/radeon_cp.c	Thu Mar 19 07:39:07 2009	(r190016)
@@ -1708,26 +1708,14 @@ void radeon_do_release(struct drm_device
 			if ((dev_priv->flags & RADEON_FAMILY_MASK) >= CHIP_R600) {
 				while ((ret = r600_do_cp_idle(dev_priv)) != 0) {
 					DRM_DEBUG("radeon_do_cp_idle %d\n", ret);
-#ifdef __linux__
-					schedule();
-#elsif defined(__FreeBSD__)
 					mtx_sleep(&ret, &dev->dev_lock, 0,
 					    "rdnrel", 1);
-#else
-					tsleep(&ret, PZERO, "rdnrel", 1);
-#endif
 				}
 			} else {
 				while ((ret = radeon_do_cp_idle(dev_priv)) != 0) {
 					DRM_DEBUG("radeon_do_cp_idle %d\n", ret);
-#ifdef __linux__
-					schedule();
-#elsif defined(__FreeBSD__)
 					mtx_sleep(&ret, &dev->dev_lock, 0,
 					    "rdnrel", 1);
-#else
-					tsleep(&ret, PZERO, "rdnrel", 1);
-#endif
 				}
 			}
 			if ((dev_priv->flags & RADEON_FAMILY_MASK) >= CHIP_R600) {


More information about the svn-src-stable-7 mailing list