[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <m17ibcf0s8.fsf@frodo.ebiederm.org>
Date: Wed, 23 Jul 2008 19:56:07 -0700
From: ebiederm@...ssion.com (Eric W. Biederman)
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Yinghai Lu <yhlu.kernel@...il.com>, mingo@...e.hu,
tglx@...utronix.de, hpa@...or.com, andi@...stfloor.org,
arjan@...radead.org, ebiederm@...ssion.com, greg@...ah.com,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] x86: usb debug port early console
Andrew Morton <akpm@...ux-foundation.org> writes:
> On Wed, 23 Jul 2008 12:52:20 -0700
> Yinghai Lu <yhlu.kernel@...il.com> wrote:
>
>>
>>
>> based on work from Eric, and add some timeout so don't dead loop when debug
> device
>> is not installed
>>
>>
>> ...
>>
>> +static void dbgp_mdelay(int ms)
>> +{
>> + int i;
>> + while (ms--) {
>> + for (i = 0; i < 1000; i++)
>> + outb(0x1, 0x80);
>> + }
>> +}
>
> hm. port 80 has a guaranteed one microsecond?
It usually longer, but it is in the 1 microsecond ballpark, accurate
enough to be a usable delay before we have anything else.
> Why not udelay()/mdelay()/etc?
This code runs ages before udelay and mdelay work. Certainly before
calibrate delay is called, so the normal kernel delay routines don't
come anywhere close and an out to port 0x80 comes.
>> +static void dbgp_breath(void)
>> +{
>> + /* Sleep to give the debug port a chance to breathe */
>> +}
>
> I expect the compiler will optimise away any calls to this.
It is documentation that is if it might be a good idea to not hit the
hardware there.
Eric
--
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