linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Muni Sekhar <munisekharrms@gmail.com>
To: linux-pci@vger.kernel.org
Subject: PCIe: readl()
Date: Thu, 6 Jan 2022 22:43:52 +0530	[thread overview]
Message-ID: <CAHhAz+jFFqD=M=F8y6V_M1f6HDnBnzZDhOJt-G-pzWLHC4idFA@mail.gmail.com> (raw)

Hi all,

We have a free-running counter on x86 PCIe bus and plan to use it as a
clocksource. The 'read' field of the clocksource structure reads from
this free-running counter and returns this value.

Since PCIe reads are synchronous, is it safe to use readl() API to
read this free-running counter value in struct clocksource.read()? If
not, what's the best way to read the counter value from the struct
clocksource read field?

Is there any other faster method to read from PCIe device memory?


-- 
Thanks,
Sekhar

             reply	other threads:[~2022-01-06 17:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-06 17:13 Muni Sekhar [this message]
2022-01-06 22:18 ` PCIe: readl() Bjorn Helgaas

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='CAHhAz+jFFqD=M=F8y6V_M1f6HDnBnzZDhOJt-G-pzWLHC4idFA@mail.gmail.com' \
    --to=munisekharrms@gmail.com \
    --cc=linux-pci@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).