public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: arnd@arndb•de (Arnd Bergmann)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH v3 02/10] clocksource:arm_global_timer: Add ARM global timer support.
Date: Thu, 20 Jun 2013 21:02:30 +0200	[thread overview]
Message-ID: <201306202102.30478.arnd@arndb.de> (raw)
In-Reply-To: <1371737121-9295-1-git-send-email-srinivas.kandagatla@st.com>

On Thursday 20 June 2013, Srinivas KANDAGATLA wrote:
> +static u64 gt_counter_read(void)
> +{
> +       u64 counter;
> +       u32 lower;
> +       u32 upper, old_upper;
> +
> +       upper = __raw_readl(gt_base + GT_COUNTER1);
> +       do {
> +               old_upper = upper;
> +               lower = __raw_readl(gt_base + GT_COUNTER0);
> +               upper = __raw_readl(gt_base + GT_COUNTER1);
> +       } while (upper != old_upper);
> +
> +       counter = upper;
> +       counter <<= 32;
> +       counter |= lower;
> +       return counter;
> +}

Please replace __raw_readl etc with the non-__raw variants
throughout the code.

The __raw accessors are not endian safe and are not meant
for device drivers. If you are worried about latency from
extra barriers, use readl_relaxed().

	Arnd

  reply	other threads:[~2013-06-20 19:02 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-20 14:03 [PATCH v3 00/10] ARM:STixxxx: Add STixxxx platform and board support Srinivas KANDAGATLA
2013-06-20 14:05 ` [PATCH v3 01/10] serial:st-asc: Add ST ASC driver Srinivas KANDAGATLA
2013-06-20 19:01   ` Arnd Bergmann
2013-06-21  9:17     ` Srinivas KANDAGATLA
2013-06-21 13:50     ` Srinivas KANDAGATLA
2013-06-21 14:02       ` Greg Kroah-Hartman
2013-06-20 14:05 ` [PATCH v3 02/10] clocksource:arm_global_timer: Add ARM global timer support Srinivas KANDAGATLA
2013-06-20 19:02   ` Arnd Bergmann [this message]
2013-06-21  7:15     ` Srinivas KANDAGATLA
2013-06-20 14:05 ` [PATCH v3 03/10] pinctrl:st: Add pinctrl and pinconf support Srinivas KANDAGATLA
2013-06-21 13:41   ` Srinivas KANDAGATLA
2013-06-24 11:57     ` Linus Walleij
2013-06-24 12:24       ` Srinivas KANDAGATLA
2013-06-24 14:12       ` Mark Brown
2013-06-25  9:39         ` [STLinux Kernel] " Srinivas KANDAGATLA
2013-06-25 10:58         ` Linus Walleij
2013-06-25 11:08           ` [STLinux Kernel] " Srinivas KANDAGATLA
2013-06-25 15:35   ` Mark Brown
2013-06-20 14:05 ` [PATCH v3 04/10] ARM:stixxxx: Add STiH415 SOC support Srinivas KANDAGATLA
2013-06-20 14:06 ` [PATCH v3 05/10] ARM:stixxxx: Add STiH416 " Srinivas KANDAGATLA
2013-06-20 14:06 ` [PATCH v3 06/10] ARM:stixxxx: Add DEBUG_LL console support Srinivas KANDAGATLA
2013-06-20 18:55   ` Arnd Bergmann
2013-06-21  6:50     ` Srinivas KANDAGATLA
2013-06-20 14:06 ` [PATCH v3 07/10] ARM:multi_v7_defconfig: rerun savedefconfig Srinivas KANDAGATLA
2013-06-20 14:06 ` [PATCH v3 08/10] ARM:stixxxx: Add stixxxx options to multi_v7_defconfig Srinivas KANDAGATLA
2013-06-20 14:06 ` [PATCH v3 09/10] ARM:stih41x: Add B2000 board support Srinivas KANDAGATLA
2013-06-20 14:07 ` [PATCH v3 10/10] ARM:stih41x: Add B2020 " 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=201306202102.30478.arnd@arndb.de \
    --to=arnd@arndb$(echo .)de \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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