From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
To: Matt Sealey <matt@genesi-usa.com>
Cc: linuxppc-dev@ozlabs.org, Domen Puncer <domen.puncer@telargo.com>
Subject: Re: Tickless Hz/hrtimers/etc. on PowerPC
Date: Thu, 12 Jul 2007 20:41:58 +0400 [thread overview]
Message-ID: <469659D6.7070705@ru.mvista.com> (raw)
In-Reply-To: <4696369A.2010200@ru.mvista.com>
[-- Attachment #1: Type: text/plain, Size: 691 bytes --]
Sergei Shtylyov wrote:
> Hello.
>
> Domen Puncer wrote:
>
>>> Does anyone have the definitive patchset to enable the tickless hz,
>>> some kind of hrtimer and the other related improvements in the
>>> PowerPC tree?
>
>
>> I use attached patches for tickless.
>> Order in which they're applied:
>> PowerPC_GENERIC_CLOCKEVENTS.patch
Argh! Finally had forgotten to attach a fixlet for this one, somewaht
adjusting the code for classic PPC decrementer.
[...]
WBR, Sergei
> PS: All attached patches are against 2.6.21-rt2 -- fitting them into the
> current (or whatever) version of the kernel is left as an excercise to
> the readers. ;-)
This one is for 2.6.21-rt2 as well.
[-- Attachment #2: PowerPC-fix-clockevents-for-classic-CPU.patch --]
[-- Type: text/x-patch, Size: 2054 bytes --]
Uncoditionally set a maximum positive value to the decrementer before calling
an event handler for all "classic" PPC CPUs (although this is only necessary
to clear interrupt on POWER4+, I've been asked to do it this way) -- otherwise
it wouldn't have been done for an offline CPU in periodic mode since the event
reprogramming has been delegated to the timer subsystem.
Also, as the classic decrementer doesn't have periodic mode, make set_mode()
method for this case completely empty.
While at it, add a switch case for CLOCK_EVT_MODE_RESUME to hush the warning.
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
arch/powerpc/kernel/time.c | 15 +++++++--------
1 files changed, 7 insertions(+), 8 deletions(-)
Index: linux-2.6/arch/powerpc/kernel/time.c
===================================================================
--- linux-2.6.orig/arch/powerpc/kernel/time.c
+++ linux-2.6/arch/powerpc/kernel/time.c
@@ -166,11 +166,14 @@ static void decrementer_set_mode(enum cl
case CLOCK_EVT_MODE_SHUTDOWN:
tcr &= ~TCR_DIE;
break;
+ case CLOCK_EVT_MODE_RESUME:
+ break;
}
mtspr(SPRN_TCR, tcr);
-#endif
+
if (mode == CLOCK_EVT_MODE_PERIODIC)
decrementer_set_next_event(tb_ticks_per_jiffy, dev);
+#endif
}
static struct clock_event_device decrementer_clockevent = {
@@ -549,16 +552,12 @@ void timer_interrupt(struct pt_regs * re
irq_enter();
#ifdef CONFIG_GENERIC_CLOCKEVENTS
-#ifdef CONFIG_PPC_MULTIPLATFORM
+#if !defined(CONFIG_40x) && !defined(CONFIG_BOOKE)
/*
* We must write a positive value to the decrementer to clear
- * the interrupt on the IBM 970 CPU series. In periodic mode,
- * this happens when the decrementer gets reloaded later, but
- * in one-shot mode, we have to do it here since an event handler
- * may skip loading the new value...
+ * the interrupt on POWER4+ compatible CPUs.
*/
- if (per_cpu(decrementers, cpu).mode != CLOCK_EVT_MODE_PERIODIC)
- set_dec(DECREMENTER_MAX);
+ set_dec(DECREMENTER_MAX);
#endif
/*
* We can't disable the decrementer, so in the period between
next prev parent reply other threads:[~2007-07-12 16:39 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-11 18:06 Tickless Hz/hrtimers/etc. on PowerPC Matt Sealey
2007-07-11 18:17 ` Sergei Shtylyov
2007-07-11 18:33 ` Michael Neuling
2007-07-11 22:15 ` Matt Sealey
2007-07-12 6:41 ` Tony Breeds
2007-07-12 12:07 ` Matt Sealey
2007-07-16 0:45 ` Tony Breeds
2007-07-12 15:49 ` Michael Neuling
2007-07-12 20:04 ` Matt Sealey
2007-07-12 20:12 ` Geert Uytterhoeven
2007-07-13 8:34 ` Benjamin Herrenschmidt
2007-07-12 16:32 ` Sergei Shtylyov
2007-07-12 20:08 ` Matt Sealey
2007-07-12 6:51 ` Domen Puncer
2007-07-12 12:07 ` Matt Sealey
2007-07-13 8:41 ` Domen Puncer
2007-07-12 14:11 ` Sergei Shtylyov
2007-07-12 16:41 ` Sergei Shtylyov [this message]
2007-07-13 8:49 ` Domen Puncer
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=469659D6.7070705@ru.mvista.com \
--to=sshtylyov@ru.mvista.com \
--cc=domen.puncer@telargo.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=matt@genesi-usa.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.