From: Pavel Machek <pavel@ucw.cz>
To: john stultz <johnstul@us.ibm.com>
Cc: Linus Torvalds <torvalds@transmeta.com>,
lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] linux-2.5.54_delay-cleanup_A0
Date: Sun, 12 Jan 2003 15:27:40 +0100 [thread overview]
Message-ID: <20030112142740.GA1691@elf.ucw.cz> (raw)
In-Reply-To: <1041993975.1052.71.camel@w-jstultz2.beaverton.ibm.com>
Hi!
> Linus, all,
> I've been busy with other things, so I've just been sitting on this for
> a while. Anyway, I figured it was about time to resend.
>
> This patch tries to cleanup the delay code by moving the timer-specific
> implementations into the timer_ops struct. Thus, rather then doing:
>
> if(x86_delay_tsc)
> __rdtsc_delay(loops);
> else if(x86_delay_cyclone)
> __cyclone_delay(loops);
> else if(whatever....
>
> we just simply do:
>
> if(timer)
> timer->delay(loops);
>
> diff -Nru a/arch/i386/kernel/timers/timer_pit.c b/arch/i386/kernel/timers/timer_pit.c
> --- a/arch/i386/kernel/timers/timer_pit.c Tue Jan 7 17:11:03 2003
> +++ b/arch/i386/kernel/timers/timer_pit.c Tue Jan 7 17:11:03 2003
> @@ -27,6 +27,19 @@
> /* nothing needed */
> }
>
> +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.
Pavel
--
Worst form of spam? Adding advertisment signatures ala sourceforge.net.
What goes next? Inserting advertisment *into* email?
prev parent reply other threads:[~2003-01-17 19:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-08 2:46 john stultz
2003-01-08 3:29 ` Linus Torvalds
2003-01-08 3:48 ` john stultz
2003-01-12 14:27 ` Pavel Machek [this message]
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=20030112142740.GA1691@elf.ucw.cz \
--to=pavel@ucw.cz \
--cc=johnstul@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
/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®