From: Steven Rostedt <rostedt@goodmis.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: LKML <linux-kernel@vger.kernel.org>,
Daniel Walker <dwalker@mvista.com>,
Aleksey Makarov <amakarov@dev.rtsoft.ru>
Subject: [PATCH -rt] convert watchdog cpu5wdt from compat_sem to completion.
Date: Fri, 25 Nov 2005 17:53:49 -0500 [thread overview]
Message-ID: <1132959229.24417.35.camel@localhost.localdomain> (raw)
In-Reply-To: <1132929218.11915.2.camel@localhost.localdomain>
OK Ingo,
This one is the last. Of the compat_semaphores in drivers that I looked
at, these were the trivial ones. The other ones I would not touch
unless I had hardware to test with, or the time to look deeper into it.
-- Steve
Index: linux-2.6.14-rt15/drivers/char/watchdog/cpu5wdt.c
===================================================================
--- linux-2.6.14-rt15.orig/drivers/char/watchdog/cpu5wdt.c 2005-11-25 10:14:09.000000000 -0500
+++ linux-2.6.14-rt15/drivers/char/watchdog/cpu5wdt.c 2005-11-25 16:57:31.000000000 -0500
@@ -28,6 +28,7 @@
#include <linux/init.h>
#include <linux/ioport.h>
#include <linux/timer.h>
+#include <linux/completion.h>
#include <asm/io.h>
#include <asm/uaccess.h>
@@ -56,7 +57,7 @@
/* some device data */
static struct {
- struct compat_semaphore stop;
+ struct completion stop;
volatile int running;
struct timer_list timer;
volatile int queue;
@@ -84,7 +85,7 @@
}
else {
/* ticks doesn't matter anyway */
- up(&cpu5wdt_device.stop);
+ complete(&cpu5wdt_device.stop);
}
}
@@ -238,7 +239,7 @@
if ( !val )
printk(KERN_INFO PFX "sorry, was my fault\n");
- init_MUTEX_LOCKED(&cpu5wdt_device.stop);
+ init_completion(&cpu5wdt_device.stop);
cpu5wdt_device.queue = 0;
clear_bit(0, &cpu5wdt_device.inuse);
@@ -268,7 +269,7 @@
{
if ( cpu5wdt_device.queue ) {
cpu5wdt_device.queue = 0;
- down(&cpu5wdt_device.stop);
+ wait_for_completion(&cpu5wdt_device.stop);
}
misc_deregister(&cpu5wdt_misc);
next prev parent reply other threads:[~2005-11-25 22:54 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-25 12:56 [PATCH] 2.6.14-rt15 IDE compat_semaphore to completion Aleksey Makarov
2005-11-25 14:54 ` Ingo Molnar
[not found] ` <1132929218.11915.2.camel@localhost.localdomain>
2005-11-25 21:40 ` [PATCH] " Steven Rostedt
2005-11-25 22:46 ` [PATCH] 2.6.14-rt15 " Steven Rostedt
2005-11-25 22:50 ` [PATCH -rt] convert compat sem in block device sx8 Steven Rostedt
2005-11-25 22:57 ` Steven Rostedt
2005-11-26 12:33 ` Ingo Molnar
2005-11-25 22:53 ` Steven Rostedt [this message]
2005-11-26 12:35 ` [PATCH -rt] convert watchdog cpu5wdt from compat_sem to completion 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=1132959229.24417.35.camel@localhost.localdomain \
--to=rostedt@goodmis.org \
--cc=amakarov@dev.rtsoft.ru \
--cc=dwalker@mvista.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