mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Srinivas KANDAGATLA <srinivas.kandagatla@st.com>
Cc: John Stultz <john.stultz@linaro.org>,
	Grant Likely <grant.likely@linaro.org>,
	Rob Herring <rob.herring@calxeda.com>,
	Rob Landley <rob@landley.net>,
	devicetree-discuss@lists.ozlabs.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Linus Walleij <linus.walleij@linaro.org>,
	Stuart Menefy <stuart.menefy@st.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Rob Herring <robherring2@gmail.com>,
	Will Deacon <will.deacon@arm.com>
Subject: Re: [PATCH v6] clocksource:arm_global_timer: Add ARM global timer support.
Date: Tue, 25 Jun 2013 16:00:25 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.02.1306251559160.4013@ionos.tec.linutronix.de> (raw)
In-Reply-To: <51C99E33.4070009@st.com>

On Tue, 25 Jun 2013, Srinivas KANDAGATLA wrote:
> On 25/06/13 14:17, Thomas Gleixner wrote:
> > On Tue, 25 Jun 2013, Srinivas KANDAGATLA wrote:
> >> +static void gt_compare_set(unsigned long delta, int periodic)
> >> +{
> >> +	u64 counter = gt_counter_read();
> >> +	unsigned long ctrl = readl(gt_base + GT_CONTROL);
> > 
> > Why are you reading the control register back over and over? All you
> > need to preserve is the GT_CONTROL_TIMER_ENABLE bit. So you can spare
> > that read out and just do
> > 
> > 	ctrl = GT_CONTROL_TIMER_ENABLE;
> > 	writel(ctrl, gt_base + GT_CONTROL);
> 
> Logically you are right we could do as you suggested, However its not
> implicit that which bits are going to be cleared. Its more to do with
> readability of the code.
> If you still insist I can change it.

I'm not insisting. I just pointed out, that you can save cycles in a
hotpath. :)

Thanks,

	tglx

  reply	other threads:[~2013-06-25 14:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-25  9:31 Srinivas KANDAGATLA
2013-06-25 13:17 ` Thomas Gleixner
2013-06-25 13:42   ` Srinivas KANDAGATLA
2013-06-25 14:00     ` Thomas Gleixner [this message]
2013-06-25 21:14 ` Sören Brinkmann
2013-06-26  9:17   ` Srinivas KANDAGATLA

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=alpine.DEB.2.02.1306251559160.4013@ionos.tec.linutronix.de \
    --to=tglx@linutronix.de \
    --cc=arnd@arndb.de \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=grant.likely@linaro.org \
    --cc=john.stultz@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rob.herring@calxeda.com \
    --cc=rob@landley.net \
    --cc=robherring2@gmail.com \
    --cc=srinivas.kandagatla@st.com \
    --cc=stuart.menefy@st.com \
    --cc=will.deacon@arm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®