public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH RT] fix undefined references to kernel_sem
@ 2010-05-24 22:04 Olaf Hering
  0 siblings, 0 replies; only message in thread
From: Olaf Hering @ 2010-05-24 22:04 UTC (permalink / raw)
  To: Thomas Gleixner, linux-kernel

protect kernel_sem access with CONFIG_LOCK_KERNEL
lib/kernel_lock.c is compiled conditionally.

Signed-off-by: Olaf Hering <olaf@aepfle.de>

---
 init/main.c      |    4 ++++
 kernel/lockdep.c |    2 ++
 2 files changed, 6 insertions(+)

--- linux-2.6.33-rt.orig/init/main.c
+++ linux-2.6.33-rt/init/main.c
@@ -629,9 +629,13 @@ asmlinkage void __init start_kernel(void
 		 * the lockdep state, so release the one known lock and
 		 * acquire it again after the self-test is done.
 		 */
+#ifdef CONFIG_LOCK_KERNEL
 		mutex_release(&kernel_sem.dep_map, 1, _THIS_IP_);
+#endif
 		locking_selftest();
+#ifdef CONFIG_LOCK_KERNEL
 		mutex_acquire(&kernel_sem.dep_map, 0, 0, _THIS_IP_);
+#endif
 	}
 
 #ifdef CONFIG_BLK_DEV_INITRD
--- linux-2.6.33-rt.orig/kernel/lockdep.c
+++ linux-2.6.33-rt/kernel/lockdep.c
@@ -3608,8 +3608,10 @@ void lockdep_init(void)
 	for (i = 0; i < CHAINHASH_SIZE; i++)
 		INIT_LIST_HEAD(chainhash_table + i);
 
+#ifdef CONFIG_LOCK_KERNEL
 	/* Hack alert ! */
 	lockdep_set_novalidate_class(&kernel_sem);
+#endif
 
 	lockdep_initialized = 1;
 }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-05-24 22:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-24 22:04 [PATCH RT] fix undefined references to kernel_sem Olaf Hering

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox