| .. | .. |
|---|
| 485 | 485 | return -EINVAL; |
|---|
| 486 | 486 | |
|---|
| 487 | 487 | #ifdef CONFIG_DEBUG_SPINLOCK |
|---|
| 488 | | -#ifdef CONFIG_PREEMPT_RT |
|---|
| 489 | | - if (test_magic(lock_spinlock_ptr, |
|---|
| 490 | | - offsetof(spinlock_t, lock.wait_lock.magic), |
|---|
| 491 | | - SPINLOCK_MAGIC) || |
|---|
| 492 | | - test_magic(lock_rwlock_ptr, |
|---|
| 493 | | - offsetof(rwlock_t, rtmutex.wait_lock.magic), |
|---|
| 494 | | - SPINLOCK_MAGIC) || |
|---|
| 495 | | - test_magic(lock_mutex_ptr, |
|---|
| 496 | | - offsetof(struct mutex, lock.wait_lock.magic), |
|---|
| 497 | | - SPINLOCK_MAGIC) || |
|---|
| 498 | | - test_magic(lock_rwsem_ptr, |
|---|
| 499 | | - offsetof(struct rw_semaphore, rtmutex.wait_lock.magic), |
|---|
| 500 | | - SPINLOCK_MAGIC)) |
|---|
| 501 | | - return -EINVAL; |
|---|
| 502 | | -#else |
|---|
| 503 | 488 | if (test_magic(lock_spinlock_ptr, |
|---|
| 504 | 489 | offsetof(spinlock_t, rlock.magic), |
|---|
| 505 | 490 | SPINLOCK_MAGIC) || |
|---|
| .. | .. |
|---|
| 513 | 498 | offsetof(struct rw_semaphore, wait_lock.magic), |
|---|
| 514 | 499 | SPINLOCK_MAGIC)) |
|---|
| 515 | 500 | return -EINVAL; |
|---|
| 516 | | -#endif |
|---|
| 517 | 501 | #endif |
|---|
| 518 | 502 | |
|---|
| 519 | 503 | if ((wait_state != TASK_RUNNING || |
|---|