From: Frank Rowand <frowand@mvista.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Realtime preempt support for PPC
Date: Thu, 17 Feb 2005 05:01:39 -0800 [thread overview]
Message-ID: <421495B3.3050106@mvista.com> (raw)
In-Reply-To: <20050217080304.GA21887@elte.hu>
Ingo Molnar wrote:
> * Frank Rowand <frowand@mvista.com> wrote:
>
>
>>I have attached a patch to add realtime support for PowerPC (32 bit
>>only). [...]
>
>
> two comments:
>
> - why is us_to_tb needed? It just seems to add alot of unnecessary
> clutter to the patch, while it's not used anywhere.
Sorry, the usage of us_to_tb got dropped from the patch when I moved
it from one of my development trees to another. It gets used in
usecs_to_cycles(). The patch to add that is attached below.
Even with the usage of us_to_tb by usecs_to_cycles(), there is a lot
of added clutter for what is accomplished. I considered a nasty hack
to try to derive the proper value from other sources, but adding
us_to_tb seemed a lot easier to understand.
This patch also adds the dreaded #ifdefs, so I suspect it will not be
the correct implementation long term. I'm not sure if Manish's patch
included the ARM implementation of usecs_to_cycles() - it is a third
case in the #ifdef.
Performance instrumentation is also going to need mcount() and
_mcount(), which is currently a work in progress.
>
> - could you submit the drivers/net/ibm_emac/ibm_emac_core.c patch
> upstream as well?
Yes, I will do that.
>
> otherwise it looks pretty clean and straightforward.
>
> Ingo
Source: MontaVista Software, Inc.
Signed-off-by: Frank Rowand <frowand@mvista.com>
Index: linux-2.6.10/kernel/latency.c
===================================================================
--- linux-2.6.10.orig/kernel/latency.c
+++ linux-2.6.10/kernel/latency.c
@@ -192,7 +192,11 @@ static unsigned long notrace cycles_to_u
static cycles_t notrace usecs_to_cycles(unsigned long delta)
{
+#if defined CONFIG_X86
return (cycles_t) delta * (cycles_t) (cpu_khz/1000+1);
+#elif defined(CONFIG_PPC)
+ return delta * us_to_tb;
+#endif
}
#ifdef CONFIG_LATENCY_TRACE
Thanks,
-Frank (off to vacation for a couple days)
--
Frank Rowand <frank_rowand@mvista.com>
MontaVista Software, Inc
next prev parent reply other threads:[~2005-02-17 13:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-16 20:56 [PATCH] Realtime preempt support for PPC Frank Rowand
2005-02-17 8:03 ` Ingo Molnar
2005-02-17 13:01 ` Frank Rowand [this message]
2005-02-17 14:25 ` Matt Porter
2005-02-18 11:28 ` Realtime preempt Sven Dietrich
2005-03-29 8:37 ` Ingo Molnar
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=421495B3.3050106@mvista.com \
--to=frowand@mvista.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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