diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2015-02-12 06:30:57 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2015-02-12 06:30:57 +0000 |
commit | 4899dc1ca750af9638d0823932dfaffab61ead21 (patch) | |
tree | 1a8a79c79be5b11c67f96df842ab03b4e418b404 /sys | |
parent | f380ec1fb8bdde5a5203628f39486fee6918f0f7 (diff) |
switch MUTEX_ASSERT_LOCKED calls back to assert_spin_locked
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/drm/drm_linux.h | 3 | ||||
-rw-r--r-- | sys/dev/pci/drm/i915/intel_pm.c | 10 |
2 files changed, 7 insertions, 6 deletions
diff --git a/sys/dev/pci/drm/drm_linux.h b/sys/dev/pci/drm/drm_linux.h index c6e6cdcbdb2..8d31bd2f287 100644 --- a/sys/dev/pci/drm/drm_linux.h +++ b/sys/dev/pci/drm/drm_linux.h @@ -1,4 +1,4 @@ -/* $OpenBSD: drm_linux.h,v 1.5 2015/02/12 02:12:02 kettenis Exp $ */ +/* $OpenBSD: drm_linux.h,v 1.6 2015/02/12 06:30:56 jsg Exp $ */ /* * Copyright (c) 2013, 2014 Mark Kettenis * @@ -83,6 +83,7 @@ spin_unlock_irqrestore(struct mutex *mtxp, __unused unsigned long flags) #define spin_unlock(mtxp) mtx_leave(mtxp) #define spin_lock_irq(mtxp) mtx_enter(mtxp) #define spin_unlock_irq(mtxp) mtx_leave(mtxp) +#define assert_spin_locked(mtxp) MUTEX_ASSERT_LOCKED(mtxp) #define mutex_lock_interruptible(rwl) -rw_enter(rwl, RW_WRITE | RW_INTR) #define mutex_lock(rwl) rw_enter_write(rwl) #define mutex_unlock(rwl) rw_exit_write(rwl) diff --git a/sys/dev/pci/drm/i915/intel_pm.c b/sys/dev/pci/drm/i915/intel_pm.c index 55ee6f304d9..6cb2a8557c8 100644 --- a/sys/dev/pci/drm/i915/intel_pm.c +++ b/sys/dev/pci/drm/i915/intel_pm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: intel_pm.c,v 1.28 2015/02/12 04:56:03 kettenis Exp $ */ +/* $OpenBSD: intel_pm.c,v 1.29 2015/02/12 06:30:56 jsg Exp $ */ /* * Copyright © 2012 Intel Corporation * @@ -2326,7 +2326,7 @@ bool ironlake_set_drps(struct drm_device *dev, u8 val) struct drm_i915_private *dev_priv = dev->dev_private; u16 rgvswctl; - MUTEX_ASSERT_LOCKED(&mchdev_lock); + assert_spin_locked(&mchdev_lock); rgvswctl = I915_READ16(MEMSWCTL); if (rgvswctl & MEMCTL_CMD_STS) { @@ -2901,7 +2901,7 @@ static unsigned long __i915_chipset_val(struct drm_i915_private *dev_priv) unsigned long now = jiffies_to_msecs(ticks), diff1; int i; - MUTEX_ASSERT_LOCKED(&mchdev_lock); + assert_spin_locked(&mchdev_lock); diff1 = now - dev_priv->ips.last_time1; @@ -3127,7 +3127,7 @@ static void __i915_update_gfx_val(struct drm_i915_private *dev_priv) unsigned long diffms; u32 count; - MUTEX_ASSERT_LOCKED(&mchdev_lock); + assert_spin_locked(&mchdev_lock); nanouptime(&now); timespecsub(&now, &dev_priv->ips.last_time2, &diff1); @@ -3172,7 +3172,7 @@ static unsigned long __i915_gfx_val(struct drm_i915_private *dev_priv) unsigned long t, corr, state1, corr2, state2; u32 pxvid, ext_v; - MUTEX_ASSERT_LOCKED(&mchdev_lock); + assert_spin_locked(&mchdev_lock); pxvid = I915_READ(PXVFREQ_BASE + (dev_priv->rps.cur_delay * 4)); pxvid = (pxvid >> 24) & 0x7f; |