From 000e3413b608f258bcceec2ec21aaa8034d65e41 Mon Sep 17 00:00:00 2001 From: Pekka Paalanen Date: Tue, 29 Sep 2009 20:02:48 +0300 Subject: [PATCH] Tentative replacement for DEBUG_SPINLOCK --- include/drm/drmP.h | 9 +++++++++ include/drm/drm_mm.h | 1 + include/drm/ttm/ttm_bo_api.h | 1 + include/drm/ttm/ttm_bo_driver.h | 2 ++ include/drm/ttm/ttm_memory.h | 1 + 5 files changed, 14 insertions(+), 0 deletions(-) diff --git a/include/drm/drmP.h b/include/drm/drmP.h index eeefb63..6100c42 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h @@ -391,7 +391,9 @@ struct drm_waitlist { struct drm_buf **wp; /**< Write pointer */ struct drm_buf **end; /**< End pointer */ spinlock_t read_lock; + u32 debugpad[8]; spinlock_t write_lock; + u32 debugpad2[8]; }; struct drm_freelist { @@ -404,6 +406,7 @@ struct drm_freelist { int high_mark; /**< High water mark */ atomic_t wfh; /**< If waiting for high mark */ spinlock_t lock; + u32 debugpad[8]; }; typedef struct drm_dma_handle { @@ -441,6 +444,7 @@ struct drm_file { struct idr object_idr; /** Lock for synchronization of access to object_idr. */ spinlock_t table_lock; + u32 debugpad[8]; struct file *filp; void *driver_priv; @@ -478,6 +482,7 @@ struct drm_lock_data { wait_queue_head_t lock_queue; /**< Queue of blocked processes */ unsigned long lock_time; /**< Time of last lock in jiffies */ spinlock_t spinlock; + u32 debugpad[8]; uint32_t kernel_waiters; uint32_t user_waiters; int idle_has_lock; @@ -909,6 +914,7 @@ struct drm_device { /** \name Locks */ /*@{ */ spinlock_t count_lock; /**< For inuse, drm_device::open_count, drm_device::buf_use */ + u32 debugpad[8]; struct mutex struct_mutex; /**< For others */ /*@} */ @@ -985,6 +991,7 @@ struct drm_device { wait_queue_head_t *vbl_queue; /**< VBLANK wait queue */ atomic_t *_vblank_count; /**< number of VBLANK interrupts (driver must alloc the right number of counters) */ spinlock_t vbl_lock; + u32 debugpad2[8]; atomic_t *vblank_refcount; /* number of users of vblank interruptsper crtc */ u32 *last_vblank; /* protected by dev->vbl_lock, used */ /* for wraparound handling */ @@ -1029,6 +1036,7 @@ struct drm_device { /** \name Drawable information */ /*@{ */ spinlock_t drw_lock; + u32 debugpad3[8]; struct idr drw_idr; /*@} */ @@ -1037,6 +1045,7 @@ struct drm_device { /** \name GEM information */ /*@{ */ spinlock_t object_name_lock; + u32 debugpad4[8]; struct idr object_name_idr; atomic_t object_count; atomic_t object_memory; diff --git a/include/drm/drm_mm.h b/include/drm/drm_mm.h index 62329f9..c7b315f 100644 --- a/include/drm/drm_mm.h +++ b/include/drm/drm_mm.h @@ -57,6 +57,7 @@ struct drm_mm { struct list_head unused_nodes; int num_unused; spinlock_t unused_lock; + u32 debugpad[8]; }; /* diff --git a/include/drm/ttm/ttm_bo_api.h b/include/drm/ttm/ttm_bo_api.h index 4911461..494f631 100644 --- a/include/drm/ttm/ttm_bo_api.h +++ b/include/drm/ttm/ttm_bo_api.h @@ -172,6 +172,7 @@ struct ttm_buffer_object { struct kref list_kref; wait_queue_head_t event_queue; spinlock_t lock; + u32 debugpad[8]; /** * Members protected by the bo::reserved lock. diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h index e8cd6d2..f06f701 100644 --- a/include/drm/ttm/ttm_bo_driver.h +++ b/include/drm/ttm/ttm_bo_driver.h @@ -405,6 +405,7 @@ struct ttm_bo_global { size_t ttm_bo_size; struct mutex device_list_mutex; spinlock_t lru_lock; + u32 debugpad[8]; /** * Protected by device_list_mutex. @@ -453,6 +454,7 @@ struct ttm_bo_device { struct ttm_bo_global *glob; struct ttm_bo_driver *driver; rwlock_t vm_lock; + u32 debugpad[8]; struct ttm_mem_type_manager man[TTM_NUM_MEM_TYPES]; /* * Protected by the vm lock. diff --git a/include/drm/ttm/ttm_memory.h b/include/drm/ttm/ttm_memory.h index 6983a7c..344dcf9 100644 --- a/include/drm/ttm/ttm_memory.h +++ b/include/drm/ttm/ttm_memory.h @@ -80,6 +80,7 @@ struct ttm_mem_global { struct work_struct work; wait_queue_head_t queue; spinlock_t lock; + u32 debugpad[8]; struct ttm_mem_zone *zones[TTM_MEM_MAX_ZONES]; unsigned int num_zones; struct ttm_mem_zone *zone_kernel; -- 1.6.3.3