From: john stultz <johnstul@us.ibm.com>
To: Pavel Machek <pavel@ucw.cz>
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: Re: Fwd: Re: [PATCH] linux-2.5.54_delay-cleanup_A0
Date: 17 Jan 2003 19:33:12 -0800 [thread overview]
Message-ID: <1042860792.32477.36.camel@w-jstultz2.beaverton.ibm.com> (raw)
In-Reply-To: <200301180325.h0I3PGa07081@eng2.beaverton.ibm.com>
> Hi!
Hey! Hmm. Odd, this email never got to me directly, instead I found it
through lkml. Hopefully my mail isn't bouncing somewhere...
> > +static void delay_pit(unsigned long loops)
> > +{
> > + int d0;
> > + __asm__ __volatile__(
> > + "\tjmp 1f\n"
> > + ".align 16\n"
> > + "1:\tjmp 2f\n"
> > + ".align 16\n"
> > + "2:\tdecl %0\n\tjns 2b"
> > + :"=&a" (d0)
> > + :"0" (loops));
> > +}
> > +
>
> But... this is not using pit to do the delay, right? It is sensitive
> to CPU clock changes, pit-delay should not be.
You're right, basically I took the previous __loop_delay() and
__rtsc_delay() and moved them to delay_pit() and delay_tsc(),
respectively. I guess the naming is somewhat confusing, but since this
was meant as just a cleanup, I'm trying to use the same code in the same
conditions.(ie: when using the PIT time-source, use the loop delay. when
using the TSC time-source, use the TSC delay). A changing the name or a
comment explaining it would def clear that up.
You do bring up an interesting idea: actually using the PIT to do
__delay. I think its possible, but not really worth it, as the PIT is
such a nasty bit of hardware to deal with. I'd guess that just reading
the PIT would likely delay for more time then what was actually
requested.
Thanks for the feedback!
-john
next parent reply other threads:[~2003-01-18 3:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200301180325.h0I3PGa07081@eng2.beaverton.ibm.com>
2003-01-18 3:33 ` john stultz [this message]
2003-01-18 13:54 ` Pavel Machek
2003-01-20 19:23 ` john stultz
2003-01-20 19:54 ` Pavel Machek
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=1042860792.32477.36.camel@w-jstultz2.beaverton.ibm.com \
--to=johnstul@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pavel@ucw.cz \
/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®