[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20071217164832.GA13353@elte.hu>
Date: Mon, 17 Dec 2007 17:48:32 +0100
From: Ingo Molnar <mingo@...e.hu>
To: Alan Cox <alan@...rguk.ukuu.org.uk>
Cc: "David P. Reed" <dpreed@...d.com>,
Rene Herman <rene.herman@...il.com>,
"H. Peter Anvin" <hpa@...or.com>, Paul Rolland <rol@...917.net>,
Pavel Machek <pavel@....cz>,
Thomas Gleixner <tglx@...utronix.de>,
linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...hat.com>,
rol@...be.net
Subject: Re: [PATCH] x86: provide a DMI based port 0x80 I/O delay override.
* Alan Cox <alan@...rguk.ukuu.org.uk> wrote:
> I don't think we should be offering udelay based delays at this point.
> There are a lot of drivers to fix first. This is just one trivial
> example
>
> ...
>
> --- drivers/watchdog/wdt.c~ 2007-12-17 15:58:49.000000000 +0000
> +++ drivers/watchdog/wdt.c 2007-12-17 15:58:49.000000000 +0000
> @@ -70,6 +70,8 @@
> static int io=0x240;
> static int irq=11;
>
> +static DEFINE_SPINLOCK(wdt_lock);
> +
> module_param(io, int, 0);
> MODULE_PARM_DESC(io, "WDT io port (default=0x240)");
> module_param(irq, int, 0);
> @@ -109,6 +111,8 @@
>
> static int wdt_start(void)
> {
> + unsigned long flags;
> + spin_lock_irqsave(&wdt_lock, flags);
> inb_p(WDT_DC); /* Disable watchdog */
> wdt_ctr_mode(0,3); /* Program CTR0 for Mode 3:
a really stupid question, in what way does:
inb_p(WDT_DC);
work better than:
inb(WDT_DC);
delay(2);
?
(i'm not suggesting you are wrong, this detail just fails to click at
the moment.)
Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists