Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0fc86c7b authored by Arnd Bergmann's avatar Arnd Bergmann
Browse files

rtmutex-tester: make it build without BKL



The big kernel lock is going away, so make sure
that if it is disabled by Kconfig, we do not
try to validate it, which would result in
compile errors.

Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
parent 72024f1e
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -76,7 +76,9 @@ static int handle_op(struct test_thread_data *td, int lockwakeup)
		}
		}


		if (!lockwakeup && td->bkl == 4) {
		if (!lockwakeup && td->bkl == 4) {
#ifdef CONFIG_LOCK_KERNEL
			unlock_kernel();
			unlock_kernel();
#endif
			td->bkl = 0;
			td->bkl = 0;
		}
		}
		return 0;
		return 0;
@@ -133,14 +135,18 @@ static int handle_op(struct test_thread_data *td, int lockwakeup)
		if (td->bkl)
		if (td->bkl)
			return 0;
			return 0;
		td->bkl = 1;
		td->bkl = 1;
#ifdef CONFIG_LOCK_KERNEL
		lock_kernel();
		lock_kernel();
#endif
		td->bkl = 4;
		td->bkl = 4;
		return 0;
		return 0;


	case RTTEST_UNLOCKBKL:
	case RTTEST_UNLOCKBKL:
		if (td->bkl != 4)
		if (td->bkl != 4)
			break;
			break;
#ifdef CONFIG_LOCK_KERNEL
		unlock_kernel();
		unlock_kernel();
#endif
		td->bkl = 0;
		td->bkl = 0;
		return 0;
		return 0;