All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurentiu Tudor <Laurentiu.Tudor@freescale.com>
To: <linuxppc-dev@ozlabs.org>
Cc: Laurentiu Tudor <Laurentiu.Tudor@freescale.com>
Subject: [PATCH] powerpc/time: When starting the decrementer don't zero the other bits in TCR
Date: Thu, 25 Aug 2011 15:19:55 +0300	[thread overview]
Message-ID: <1314274795-4966-1-git-send-email-Laurentiu.Tudor@freescale.com> (raw)

Clearing the other TCR bits might break code that sets them (e.g. to setup
the watchdog or fixed interval timer) before start_cpu_decrementer() gets
called.

Signed-off-by: Laurentiu Tudor <Laurentiu.Tudor@freescale.com>
---
 arch/powerpc/kernel/time.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index 03b29a6..e8b5cdc 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -721,7 +721,7 @@ void start_cpu_decrementer(void)
 	mtspr(SPRN_TSR, TSR_ENW | TSR_WIS | TSR_DIS | TSR_FIS);
 
 	/* Enable decrementer interrupt */
-	mtspr(SPRN_TCR, TCR_DIE);
+	mtspr(SPRN_TCR, mfspr(SPRN_TCR) | TCR_DIE);
 #endif /* defined(CONFIG_BOOKE) || defined(CONFIG_40x) */
 }
 
-- 
1.7.1

             reply	other threads:[~2011-08-25 12:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-25 12:19 Laurentiu Tudor [this message]
2011-09-01  6:27 ` [PATCH] powerpc/time: When starting the decrementer don't zero the other bits in TCR Kumar Gala
2011-09-01  8:31   ` Tudor Laurentiu
2011-09-01 13:56     ` Kumar Gala
2011-09-01 15:38       ` Tudor Laurentiu
2011-09-01 18:49         ` Kumar Gala

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=1314274795-4966-1-git-send-email-Laurentiu.Tudor@freescale.com \
    --to=laurentiu.tudor@freescale.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=testfarm@localhost.localdomain \
    /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.