From: Chris Wright <chrisw@osdl.org>
To: Arjan van de Ven <arjanv@redhat.com>
Cc: Chris Wright <chrisw@osdl.org>,
linux-kernel@vger.kernel.org, torvalds@osdl.org
Subject: Re: [PATCH 4/13] use cpu_relax() in busy loop
Date: Fri, 19 Sep 2003 12:48:45 -0700 [thread overview]
Message-ID: <20030919124845.A27079@osdlab.pdx.osdl.net> (raw)
In-Reply-To: <1063956884.5394.3.camel@laptop.fenrus.com>; from arjanv@redhat.com on Fri, Sep 19, 2003 at 09:34:44AM +0200
* Arjan van de Ven (arjanv@redhat.com) wrote:
>
> mdelay ?
Yeah, good point. For these subsecond pauses mdelay() makes more sense.
It'd be nice to get rid of long busy loops in general. Thanks for taking
a look.
-chris
[PATCH 4/13] use mdelay() instead of busy loop
Replace busy loop with mdelay().
===== drivers/cdrom/sonycd535.c 1.39 vs edited =====
--- 1.39/drivers/cdrom/sonycd535.c Tue Sep 9 07:41:30 2003
+++ edited/drivers/cdrom/sonycd535.c Fri Sep 19 10:36:18 2003
@@ -129,6 +129,7 @@
#include <linux/mm.h>
#include <linux/slab.h>
#include <linux/init.h>
+#include <linux/delay.h>
#define REALLY_SLOW_IO
#include <asm/system.h>
@@ -1520,13 +1521,12 @@
/* A negative sony535_irq_used will attempt an autoirq. */
if (sony535_irq_used < 0) {
- unsigned long irq_mask, delay;
+ unsigned long irq_mask;
irq_mask = probe_irq_on();
enable_interrupts();
outb(0, read_status_reg); /* does a reset? */
- delay = jiffies + HZ/10;
- while (time_before(jiffies, delay)) ;
+ mdelay(100);
sony535_irq_used = probe_irq_off(irq_mask);
disable_interrupts();
next prev parent reply other threads:[~2003-09-19 19:53 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-18 23:25 [PATCH 1/13] " Chris Wright
2003-09-18 23:27 ` [PATCH 2/13] " Chris Wright
2003-09-18 23:29 ` [PATCH 3/13] " Chris Wright
2003-09-18 23:31 ` [PATCH 4/13] " Chris Wright
2003-09-18 23:33 ` [PATCH 5/13] " Chris Wright
2003-09-18 23:34 ` [PATCH 6/13] " Chris Wright
2003-09-18 23:35 ` [PATCH 7/13] " Chris Wright
2003-09-18 23:36 ` [PATCH 8/13] " Chris Wright
2003-09-18 23:37 ` [PATCH 9/13] " Chris Wright
2003-09-18 23:40 ` [PATCH 10/13] " Chris Wright
2003-09-18 23:41 ` [PATCH 11/13] " Chris Wright
2003-09-18 23:43 ` [PATCH 12/13] " Chris Wright
2003-09-18 23:46 ` [PATCH 13/13] " Chris Wright
2003-09-20 7:37 ` [PATCH 9/13] " David S. Miller
2003-09-19 7:37 ` [PATCH 7/13] " Arjan van de Ven
2003-09-19 19:49 ` Chris Wright
2003-09-19 7:34 ` [PATCH 4/13] " Arjan van de Ven
2003-09-19 19:48 ` Chris Wright [this message]
2003-09-19 19:54 ` Arjan van de Ven
2003-09-19 7:33 ` [PATCH 2/13] " Arjan van de Ven
2003-09-19 19:49 ` Chris Wright
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=20030919124845.A27079@osdlab.pdx.osdl.net \
--to=chrisw@osdl.org \
--cc=arjanv@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.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
all inboxes | Powered by JetHome®