Commit 0fc86c7bd924debd0bddee790ecc884604fdcc63

Authored by Arnd Bergmann
1 parent 72024f1ec5

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: Arnd 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>

Showing 1 changed file with 6 additions and 0 deletions Side-by-side Diff

kernel/rtmutex-tester.c
... ... @@ -76,7 +76,9 @@
76 76 }
77 77  
78 78 if (!lockwakeup && td->bkl == 4) {
  79 +#ifdef CONFIG_LOCK_KERNEL
79 80 unlock_kernel();
  81 +#endif
80 82 td->bkl = 0;
81 83 }
82 84 return 0;
83 85  
84 86  
85 87  
... ... @@ -133,14 +135,18 @@
133 135 if (td->bkl)
134 136 return 0;
135 137 td->bkl = 1;
  138 +#ifdef CONFIG_LOCK_KERNEL
136 139 lock_kernel();
  140 +#endif
137 141 td->bkl = 4;
138 142 return 0;
139 143  
140 144 case RTTEST_UNLOCKBKL:
141 145 if (td->bkl != 4)
142 146 break;
  147 +#ifdef CONFIG_LOCK_KERNEL
143 148 unlock_kernel();
  149 +#endif
144 150 td->bkl = 0;
145 151 return 0;
146 152