From: Andrew Morton <akpm@osdl.org>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: Robert.Picco@hp.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] HPET driver
Date: Wed, 23 Jun 2004 15:23:04 -0700 [thread overview]
Message-ID: <20040623152304.6e107b09.akpm@osdl.org> (raw)
In-Reply-To: <40D9F925.2000304@pobox.com>
Jeff Garzik <jgarzik@pobox.com> wrote:
>
> > I eliminated the request_irq brain damage, eliminated procfs support,
> > made the check for FMODE_WRITE in hpet_open and responded to a few
> > other suggestions.
>
> Thanks! I'll look over it too.
Here's one fixlet against Robert's fixes:
- Need to set TASK_INTERRUPTIBLE before checking devp->hd_irqdata.
Otherwise the wakeup from hpet_interrupt() could be missed.
Signed-off-by: Andrew Morton <akpm@osdl.org>
---
25-akpm/drivers/char/hpet.c | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
diff -puN drivers/char/hpet.c~hpet-fixes-fix drivers/char/hpet.c
--- 25/drivers/char/hpet.c~hpet-fixes-fix Wed Jun 23 14:38:16 2004
+++ 25-akpm/drivers/char/hpet.c Wed Jun 23 14:38:16 2004
@@ -196,7 +196,8 @@ hpet_read(struct file *file, char *buf,
add_wait_queue(&devp->hd_waitqueue, &wait);
- do {
+ for ( ; ; ) {
+ set_current_state(TASK_INTERRUPTIBLE);
spin_lock_irq(&hpet_lock);
data = devp->hd_irqdata;
devp->hd_irqdata = 0;
@@ -211,17 +212,14 @@ hpet_read(struct file *file, char *buf,
retval = -ERESTARTSYS;
goto out;
}
-
- set_current_state(TASK_INTERRUPTIBLE);
schedule();
-
- } while (1);
+ }
retval = put_user(data, (unsigned long *)buf);
if (!retval)
retval = sizeof(unsigned long);
- out:
- current->state = TASK_RUNNING;
+out:
+ __set_current_state(TASK_RUNNING)
remove_wait_queue(&devp->hd_waitqueue, &wait);
return retval;
_
next prev parent reply other threads:[~2004-06-23 22:23 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200406181616.i5IGGECd003812@hera.kernel.org>
2004-06-18 20:57 ` Jeff Garzik
2004-06-18 21:55 ` Andrew Morton
2004-06-18 22:45 ` Jeff Garzik
2004-06-23 21:34 ` Robert Picco
2004-06-23 21:41 ` Jeff Garzik
2004-06-23 22:23 ` Andrew Morton [this message]
2004-05-13 22:34 Robert Picco
2004-05-13 23:17 ` Jeff Garzik
2004-05-13 23:42 ` Andrew Morton
2004-05-13 23:46 ` Andrew Morton
2004-05-13 23:49 ` Jeff Garzik
2004-05-14 11:19 ` Vojtech Pavlik
2004-05-14 16:59 ` Jeff Garzik
2004-05-17 22:33 ` Robert Picco
2004-05-17 22:39 ` Jeff Garzik
2004-05-17 22:43 ` Jeff Garzik
2004-05-17 23:05 ` Andrew Morton
2004-05-17 23:06 ` Jeff Garzik
2004-05-17 23:12 ` Andrew Morton
2004-05-17 23:18 ` Jeff Garzik
2004-05-17 23:25 ` Russell King
2004-05-17 23:41 ` Jeff Garzik
2004-05-17 23:33 ` Andrew Morton
2004-05-17 23:42 ` Jeff Garzik
2004-05-18 1:46 ` Andrew Morton
2004-05-18 1:59 ` Jeff Garzik
[not found] ` <16553.28862.590897.171478@napali.hpl.hp.com>
2004-05-20 2:01 ` Jeff Garzik
2004-05-13 23:18 ` Andrew Morton
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=20040623152304.6e107b09.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=Robert.Picco@hp.com \
--cc=jgarzik@pobox.com \
--cc=linux-kernel@vger.kernel.org \
/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
Powered by JetHome