linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale.com>
To: Anton Blanchard <anton@samba.org>
Cc: paulus@samba.org, linuxppc-dev@lists.ozlabs.org, miltonm@bga.com,
	johnstul@us.ibm.com
Subject: Re: [PATCH 1/6] powerpc/time: Handle wrapping of decrementer
Date: Mon, 28 Nov 2011 11:44:21 -0600	[thread overview]
Message-ID: <4ED3C875.5050002@freescale.com> (raw)
In-Reply-To: <20111124060847.105131188@samba.org>

On 11/24/2011 12:07 AM, Anton Blanchard wrote:
> Index: linux-build/arch/powerpc/kernel/irq.c
> ===================================================================
> --- linux-build.orig/arch/powerpc/kernel/irq.c	2011-11-17 10:04:16.551137554 +1100
> +++ linux-build/arch/powerpc/kernel/irq.c	2011-11-17 14:23:10.834514143 +1100
> @@ -164,16 +164,13 @@ notrace void arch_local_irq_restore(unsi
>  	 */
>  	local_paca->hard_enabled = en;
>  
> -#ifndef CONFIG_BOOKE
> -	/* On server, re-trigger the decrementer if it went negative since
> -	 * some processors only trigger on edge transitions of the sign bit.
> -	 *
> -	 * BookE has a level sensitive decrementer (latches in TSR) so we
> -	 * don't need that
> +	/*
> +	 * Trigger the decrementer if we have a pending event. Some processors
> +	 * only trigger on edge transitions of the sign bit. We might also
> +	 * have disabled interrupts long enough that the decrementer wrapped
> +	 * to positive.
>  	 */
> -	if ((int)mfspr(SPRN_DEC) < 0)
> -		mtspr(SPRN_DEC, 1);
> -#endif /* CONFIG_BOOKE */
> +	decrementer_check_overflow();

Where did the #ifndef CONFIG_BOOKE go?  BookE doesn't need this; the
interrupt will continue asserting until software clears TSR[DIS].

-Scott

  reply	other threads:[~2011-11-28 17:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-24  6:07 [PATCH 0/6] ppc time fixes Anton Blanchard
2011-11-24  6:07 ` [PATCH 1/6] powerpc/time: Handle wrapping of decrementer Anton Blanchard
2011-11-28 17:44   ` Scott Wood [this message]
2011-11-28 20:01     ` Benjamin Herrenschmidt
2011-11-24  6:07 ` [PATCH 2/6] powerpc/time: Use clockevents_calc_mult_shift Anton Blanchard
2011-11-24  6:25   ` Kumar Gala
2011-11-28 11:47     ` Anton Blanchard
2011-11-24  6:07 ` [PATCH 3/6] powerpc/time: Use clocksource_register_hz Anton Blanchard
2011-11-28 23:30   ` john stultz
2011-11-24  6:07 ` [PATCH 4/6] powerpc/time: Remove unnecessary sanity check of decrementer expiration Anton Blanchard
2011-11-24  6:07 ` [PATCH 5/6] powerpc/time: Fix some style issues Anton Blanchard
2011-11-24  6:07 ` [PATCH 6/6] powerpc/time: Optimise decrementer_check_overflow Anton Blanchard

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=4ED3C875.5050002@freescale.com \
    --to=scottwood@freescale.com \
    --cc=anton@samba.org \
    --cc=johnstul@us.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=miltonm@bga.com \
    --cc=paulus@samba.org \
    /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;
as well as URLs for NNTP newsgroup(s).