public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Ivan Gorinov <ivan.gorinov@intel.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2] timer: add High Precision Event Timers (HPET) support
Date: Fri, 30 Mar 2018 18:03:01 -0700	[thread overview]
Message-ID: <20180331010301.GB45891@intel.com> (raw)
In-Reply-To: <CAHp75Vf9A7kMWDr_ndkCU1zyOqHPG6mgNqyV1CU71j0T0HDL=g@mail.gmail.com>

On Fri, Mar 30, 2018 at 10:46:40PM +0300, Andy Shevchenko wrote:

> > +       writel(0, regs + HPET_MAIN_COUNT_L);
> > +       writel(0, regs + HPET_MAIN_COUNT_H);
> 
> Can we use writeq() here?

I don't see readq/writeq defined for x86, even x86_64.

> > +               tl = readl(regs + HPET_MAIN_COUNT_L);
> > +               th = readl(regs + HPET_MAIN_COUNT_H);
> 
> Ditto.

If readq() is defined as two read operations in 32-bit code, main counter
rollover (low part overflow, high part increment) can happen between them.

  reply	other threads:[~2018-03-31  1:03 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-29 22:29 [U-Boot] [PATCH v2] timer: add High Precision Event Timers (HPET) support Ivan Gorinov
2018-03-30  9:52 ` Bin Meng
2018-03-30 19:46 ` Andy Shevchenko
2018-03-31  1:03   ` Ivan Gorinov [this message]
2018-03-31 12:31     ` Andy Shevchenko
2018-04-02 23:00       ` Ivan Gorinov
2018-04-03 12:17         ` Andy Shevchenko
2018-04-03 23:26           ` Ivan Gorinov
2018-04-04  4:15             ` Bin Meng
2018-04-04  4:40               ` Ivan Gorinov
2018-04-06 13:56                 ` Andy Shevchenko
2018-04-06 13:55             ` Andy Shevchenko

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=20180331010301.GB45891@intel.com \
    --to=ivan.gorinov@intel.com \
    --cc=u-boot@lists.denx.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox