The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Luca Falavigna <dktrkranz@gmail.com>
To: mingo@elte.hu
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [PATCH] Real-Time Preemption V0.7.52-07: rt_init_MUTEX_LOCKED declaration
Date: Mon, 01 Aug 2005 16:26:15 +0000	[thread overview]
Message-ID: <42EE4D27.8060500@gmail.com> (raw)

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


             reply	other threads:[~2005-08-01 18:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-01 16:26 Luca Falavigna [this message]
2005-08-01 18:57 ` [PATCH] Real-Time Preemption V0.7.52-07: rt_init_MUTEX_LOCKED declaration 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=42EE4D27.8060500@gmail.com \
    --to=dktrkranz@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox