The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] Real-Time Preemption V0.7.52-07: rt_init_MUTEX_LOCKED declaration
@ 2005-08-01 16:26 Luca Falavigna
  2005-08-01 18:57 ` Steven Rostedt
  2005-08-01 20:50 ` Ingo Molnar
  0 siblings, 2 replies; 9+ messages in thread
From: Luca Falavigna @ 2005-08-01 16:26 UTC (permalink / raw)
  To: mingo; +Cc: Linux Kernel Mailing List

This patch fixes broken rt_init_MUTEX_LOCKED declaration using rt_sema_init()
macro. This way we fix a potential compile bug: rt_init_MUTEX_LOCKED calls
there_is_no_init_MUTEX_LOCKED_for_RT_semaphores, which is not referenced.
(e.g. drivers/char/watchdog/cpu5wdt.c: "cpu5wdt: Unknown symbol
there_is_no_init_MUTEX_LOCKED_for_RT_semaphores")



Signed-off-by: Luca Falavigna <dktrkranz@gmail.com>

--- realtime-preempt-2.6.13-rc4-RT-V0.7.52-07.orig	2005-07-31 23:35:18.000000000
+0000
+++ realtime-preempt-2.6.13-rc4-RT-V0.7.52-07		2005-08-01 15:59:31.000000000 +0000
@@ -8342,16 +8342,6 @@ Index: linux/drivers/cpufreq/cpufreq.c
 ===================================================================
 --- linux.orig/drivers/cpufreq/cpufreq.c
 +++ linux/drivers/cpufreq/cpufreq.c
-@@ -605,7 +605,8 @@ static int cpufreq_add_dev (struct sys_d
- 	policy->cpu = cpu;
- 	policy->cpus = cpumask_of_cpu(cpu);
-
--	init_MUTEX_LOCKED(&policy->lock);
-+	init_MUTEX(&policy->lock);
-+	down(&policy->lock);
- 	init_completion(&policy->kobj_unregister);
- 	INIT_WORK(&policy->update, handle_update, (void *)(long)cpu);
-
 @@ -614,6 +615,7 @@ static int cpufreq_add_dev (struct sys_d
  	 */
  	ret = cpufreq_driver->init(policy);
@@ -14350,7 +14340,7 @@ Index: linux/include/linux/rt_lock.h
 ===================================================================
 --- /dev/null
 +++ linux/include/linux/rt_lock.h
-@@ -0,0 +1,391 @@
+@@ -0,0 +1,385 @@
 +#ifndef __LINUX_RT_LOCK_H
 +#define __LINUX_RT_LOCK_H
 +
@@ -14589,14 +14579,8 @@ Index: linux/include/linux/rt_lock.h
 +extern void FASTCALL(__init_MUTEX(struct semaphore *sem, char *name, char
*file, int line));
 +#define rt_init_MUTEX(sem) \
 +		__init_MUTEX(sem, #sem, __FILE__, __LINE__)
-+
-+extern void there_is_no_init_MUTEX_LOCKED_for_RT_semaphores(void);
-+
-+/*
-+ * No locked initialization for RT semaphores
-+ */
 +#define rt_init_MUTEX_LOCKED(sem) \
-+		there_is_no_init_MUTEX_LOCKED_for_RT_semaphores()
++		rt_sema_init(sem, 0)
 +extern void FASTCALL(rt_down(struct semaphore *sem));
 +extern int FASTCALL(rt_down_interruptible(struct semaphore *sem));
 +extern int FASTCALL(rt_down_trylock(struct semaphore *sem));




Regards,
-- 
					Luca


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2005-08-01 21:33 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-01 16:26 [PATCH] Real-Time Preemption V0.7.52-07: rt_init_MUTEX_LOCKED declaration Luca Falavigna
2005-08-01 18:57 ` Steven Rostedt
2005-08-01 19:05   ` Luca Falavigna
2005-08-01 19:13     ` Sven-Thorsten Dietrich
2005-08-01 19:26       ` Steven Rostedt
2005-08-01 21:03   ` Ingo Molnar
2005-08-01 21:24     ` Steven Rostedt
2005-08-01 21:28       ` Ingo Molnar
2005-08-01 20:50 ` Ingo Molnar

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