All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonas Jensen <jonas.jensen@gmail.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, arm@kernel.org,
	john.stultz@linaro.org, u.kleine-koenig@pengutronix.de,
	tomasz.figa@gmail.com, linus.walleij@linaro.org,
	thomas.petazzoni@free-electrons.com, arnd@arndb.de
Subject: Re: [PATCH v5] ARM: clocksource: add support for MOXA ART SoCs
Date: Fri, 5 Jul 2013 12:05:59 +0200	[thread overview]
Message-ID: <CACmBeS03Xfo7DyyYUbpBaO8TeR3g8BTPzcoOzQayk40k1soFzA@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1307042211420.11637@ionos.tec.linutronix.de>

On 4 July 2013 23:42, Thomas Gleixner <tglx@linutronix.de> wrote:
> You just modify bits on the "cache" variable. though you are not
> caching it. As it seems to work it looks like this register simply can
> be written with constants.

I agree, the global "cache" variable wasn't very good. The only good thing, that
it eliminated all TIMER_CR reads in moxart_clkevt_next_event.

Yes it could be written with constants, and it wouldn't be so bad, because in
this case so few need to be set. If more constants were set from init
the benefit
would be more clear.

>> +     timereg_cache = readl(base + TIMER_CR) | TIMEREG_CR_2_ENABLE;
>
> Why are you reading that back? You know excactly which of the timers
> you are using and none of those should be enabled before you reach
> that code. If it one of them is enabled by the boot loader you better
> disable it in this init function.

Removed. All timers except TIMER2 should be disabled in init.

> Now if you disable all of those timers and just use a known set, then
> you can do without a pseudo cache variable and just write constants
> into the control register, right ?

Yes, please take a look at v6.


Best regards,
Jonas

WARNING: multiple messages have this Message-ID (diff)
From: jonas.jensen@gmail.com (Jonas Jensen)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v5] ARM: clocksource: add support for MOXA ART SoCs
Date: Fri, 5 Jul 2013 12:05:59 +0200	[thread overview]
Message-ID: <CACmBeS03Xfo7DyyYUbpBaO8TeR3g8BTPzcoOzQayk40k1soFzA@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1307042211420.11637@ionos.tec.linutronix.de>

On 4 July 2013 23:42, Thomas Gleixner <tglx@linutronix.de> wrote:
> You just modify bits on the "cache" variable. though you are not
> caching it. As it seems to work it looks like this register simply can
> be written with constants.

I agree, the global "cache" variable wasn't very good. The only good thing, that
it eliminated all TIMER_CR reads in moxart_clkevt_next_event.

Yes it could be written with constants, and it wouldn't be so bad, because in
this case so few need to be set. If more constants were set from init
the benefit
would be more clear.

>> +     timereg_cache = readl(base + TIMER_CR) | TIMEREG_CR_2_ENABLE;
>
> Why are you reading that back? You know excactly which of the timers
> you are using and none of those should be enabled before you reach
> that code. If it one of them is enabled by the boot loader you better
> disable it in this init function.

Removed. All timers except TIMER2 should be disabled in init.

> Now if you disable all of those timers and just use a known set, then
> you can do without a pseudo cache variable and just write constants
> into the control register, right ?

Yes, please take a look at v6.


Best regards,
Jonas

  reply	other threads:[~2013-07-05 10:06 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-18 10:00 [PATCH] ARM: clocksource: add support for MOXA ART SoCs Jonas Jensen
2013-06-18 10:00 ` Jonas Jensen
2013-06-18 15:14 ` Thomas Petazzoni
2013-06-18 15:14   ` Thomas Petazzoni
2013-06-18 15:28 ` Arnd Bergmann
2013-06-18 15:28   ` Arnd Bergmann
2013-06-26 14:53 ` [PATCH v2] " Jonas Jensen
2013-06-26 14:53   ` Jonas Jensen
2013-06-26 14:59   ` Jonas Jensen
2013-06-26 14:59     ` Jonas Jensen
2013-06-26 16:10   ` Uwe Kleine-König
2013-06-26 16:10     ` Uwe Kleine-König
2013-06-26 19:15   ` Linus Walleij
2013-06-26 19:15     ` Linus Walleij
2013-06-27 11:23   ` [PATCH v3] " Jonas Jensen
2013-06-27 11:23     ` Jonas Jensen
2013-06-28 13:34     ` Thomas Gleixner
2013-06-28 13:34       ` Thomas Gleixner
2013-07-01 14:02     ` [PATCH v4] " Jonas Jensen
2013-07-01 14:02       ` Jonas Jensen
2013-07-01 17:55       ` Thomas Gleixner
2013-07-01 17:55         ` Thomas Gleixner
2013-07-02 20:19       ` Linus Walleij
2013-07-02 20:19         ` Linus Walleij
2013-07-04 12:19       ` [PATCH v5] " Jonas Jensen
2013-07-04 12:19         ` Jonas Jensen
2013-07-04 21:42         ` Thomas Gleixner
2013-07-04 21:42           ` Thomas Gleixner
2013-07-05 10:05           ` Jonas Jensen [this message]
2013-07-05 10:05             ` Jonas Jensen
2013-07-05 10:21             ` Thomas Gleixner
2013-07-05 10:21               ` Thomas Gleixner
2013-07-05 11:48               ` Jonas Jensen
2013-07-05 11:48                 ` Jonas Jensen
2013-07-05 10:04         ` [PATCH v6] " Jonas Jensen
2013-07-05 10:04           ` Jonas Jensen
2013-07-05 11:46           ` [PATCH v7] " Jonas Jensen
2013-07-05 11:46             ` Jonas Jensen
2013-07-16 13:52             ` Daniel Lezcano
2013-07-16 13:52               ` Daniel Lezcano
2013-07-16 14:44             ` [PATCH v8] " Jonas Jensen
2013-07-16 14:44               ` Jonas Jensen
2013-07-16 15:01               ` Daniel Lezcano
2013-07-16 15:01                 ` Daniel Lezcano
2013-07-17  8:14                 ` Jonas Jensen
2013-07-17  8:14                   ` Jonas Jensen
2013-07-17 12:13                   ` Daniel Lezcano
2013-07-17 12:13                     ` Daniel Lezcano
2013-07-17  8:04               ` [PATCH v9] " Jonas Jensen
2013-07-17  8:04                 ` Jonas Jensen
2013-07-19 11:12                 ` [PATCH] ARM: clocksource: moxart: documentation: update device tree bindings document Jonas Jensen
2013-07-19 11:12                   ` Jonas Jensen
2013-07-19 12:16                   ` Daniel Lezcano
2013-07-19 12:16                     ` Daniel Lezcano
2013-07-19 12:50                     ` Jonas Jensen
2013-07-19 12:50                       ` Jonas Jensen
2013-07-20 20:45                 ` [PATCH v9] ARM: clocksource: add support for MOXA ART SoCs Linus Walleij
2013-07-20 20:45                   ` Linus Walleij
2013-07-20 21:34                   ` Daniel Lezcano
2013-07-20 21:34                     ` Daniel Lezcano
2013-07-26 14:03                     ` [PATCH] ARM: clocksource: moxart: add bitops.h include Jonas Jensen
2013-07-26 14:03                       ` Jonas Jensen

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=CACmBeS03Xfo7DyyYUbpBaO8TeR3g8BTPzcoOzQayk40k1soFzA@mail.gmail.com \
    --to=jonas.jensen@gmail.com \
    --cc=arm@kernel.org \
    --cc=arnd@arndb.de \
    --cc=john.stultz@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=thomas.petazzoni@free-electrons.com \
    --cc=tomasz.figa@gmail.com \
    --cc=u.kleine-koenig@pengutronix.de \
    /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.