All of lore.kernel.org
 help / color / mirror / Atom feed
From: laurent.pinchart@ideasonboard.com (Laurent Pinchart)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] clocksource: arm_arch_timer: Don't wait for probe of unexisting timers
Date: Thu, 23 Oct 2014 20:43:08 +0300	[thread overview]
Message-ID: <2089236.IjCeu0x8pS@avalon> (raw)
In-Reply-To: <54493D46.6040202@codeaurora.org>

Hi Stephen,

On Thursday 23 October 2014 10:39:18 Stephen Boyd wrote:
> On 10/23/2014 10:32 AM, Laurent Pinchart wrote:
> > Commit c387f07e6205 ("clocksource: arm_arch_timer: Discard unavailable
> > timers correctly") attempted to avoid waiting for probe of disabled
> > timers, but got its condition check wrong and resulted in the driver
> > waiting for probe of timers not present in DT at all. Fix it.
> > 
> > Fixes: c387f07e6205 ("clocksource: arm_arch_timer: Discard unavailable
> > timers correctly") Signed-off-by: Laurent Pinchart
> > <laurent.pinchart+renesas@ideasonboard.com> ---
> 
> You're the third one.

Sorry about that.

> I like how the function has been renamed in this patch. arch_timer_probed()
> is not accurately describing the intention of the code so
> arch_timer_need_probe() reads better. Maybe your rename of the function can
> be squashed into Marc's patch.

Sure, that's fine with me.

> >  drivers/clocksource/arm_arch_timer.c | 15 ++++++++-------
> >  1 file changed, 8 insertions(+), 7 deletions(-)
> > 
> > This patch fixes a regression introduced in v3.18-rc1.
> > 
> > diff --git a/drivers/clocksource/arm_arch_timer.c
> > b/drivers/clocksource/arm_arch_timer.c index 2133f9d..5caf32c 100644
> > --- a/drivers/clocksource/arm_arch_timer.c
> > +++ b/drivers/clocksource/arm_arch_timer.c
> > @@ -657,17 +657,17 @@ static const struct of_device_id
> > arch_timer_mem_of_match[] __initconst = {> 
> >  };
> >  
> >  static bool __init
> > -arch_timer_probed(int type, const struct of_device_id *matches)
> > +arch_timer_need_probe(int type, const struct of_device_id *matches)
> >  {
> >  	struct device_node *dn;
> > -	bool probed = false;
> > +	bool need_probe = false;
> > 
> >  	dn = of_find_matching_node(NULL, matches);
> > -	if (dn && of_device_is_available(dn) && (arch_timers_present & type))
> > -		probed = true;
> > +	if (dn && of_device_is_available(dn) && !(arch_timers_present &
> > type))
> > +		need_probe = true;
> >  	of_node_put(dn);
> > 
> > -	return probed;
> > +	return need_probe;
> >  }
> >  
> >  static void __init arch_timer_common_init(void)
> > @@ -676,9 +676,10 @@ static void __init arch_timer_common_init(void)
> > 
> >  	/* Wait until both nodes are probed if we have two timers */
> >  	if ((arch_timers_present & mask) != mask) {
> > -		if (!arch_timer_probed(ARCH_MEM_TIMER, arch_timer_mem_of_match))
> > +		if (arch_timer_need_probe(ARCH_MEM_TIMER,
> > +					  arch_timer_mem_of_match))
> >  			return;
> > -		if (!arch_timer_probed(ARCH_CP15_TIMER, arch_timer_of_match))
> > +		if (arch_timer_need_probe(ARCH_CP15_TIMER, arch_timer_of_match))
> >  			return;
> >  	}

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2014-10-23 17:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-23 17:32 [PATCH] clocksource: arm_arch_timer: Don't wait for probe of unexisting timers Laurent Pinchart
2014-10-23 17:39 ` Stephen Boyd
2014-10-23 17:43   ` Laurent Pinchart [this message]
2014-10-23 17:49   ` Mark Rutland
2014-10-23 23:29     ` Laurent Pinchart

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=2089236.IjCeu0x8pS@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=linux-arm-kernel@lists.infradead.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 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.