# Re: \[PATCH\] powerpc/time: When starting the decrementer don't zero the other bits in TCR

- From: Kumar Gala \<hidden\>
- Date: 2011-09-01 06:27:33 
- List: linuxppc-dev
- Page: https://ratatoskr.run/linuxppc-dev/2011/09/9466192
- Thread: https://ratatoskr.run/linuxppc-dev/2011/08/9466090/t.md

```text

On Aug 25, 2011, at 7:19 AM, Laurentiu Tudor wrote:

> 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.

Can you be more specific about the case you're concerned about.  I'm not =
sure we want to leave the FIT enabled if it was previously.  Watchdog I =
could possibly see leaving alone.
>=20
> Signed-off-by: Laurentiu Tudor <redacted>
> ---
> arch/powerpc/kernel/time.c |    2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>=20
> 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);
>=20
> 	/* Enable decrementer interrupt */
> -	mtspr(SPRN_TCR, TCR_DIE);
> +	mtspr(SPRN_TCR, mfspr(SPRN_TCR) | TCR_DIE);
> #endif /* defined(CONFIG_BOOKE) || defined(CONFIG_40x) */
> }
>=20
> --=20
> 1.7.1
>=20
>=20
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
```
