Linux CXL
 help / color / mirror / Atom feed
From: Dan Williams <dan.j.williams@intel.com>
To: Jonathan Cameron <Jonathan.Cameron@huawei.com>,
	<linux-cxl@vger.kernel.org>
Cc: Alison Schofield <alison.schofield@intel.com>,
	Vishal Verma <vishal.l.verma@intel.com>,
	Ira Weiny <ira.weiny@intel.com>,
	Dan Williams <dan.j.williams@intel.com>, <linuxarm@huawei.com>
Subject: RE: [PATCH v2] cxl/pci: Set the device timestamp
Date: Mon, 30 Jan 2023 11:29:46 -0800	[thread overview]
Message-ID: <63d81aaa8182f_3a36e52945b@dwillia2-xfh.jf.intel.com.notmuch> (raw)
In-Reply-To: <20230130151327.32415-1-Jonathan.Cameron@huawei.com>

Jonathan Cameron wrote:
> CXL r3.0 section 8.2.9.4.2 "Set Timestamp" recommends that the host sets
> the timestamp after every Conventional or CXL Reset to ensure accurate
> timestamps. This should include on initial boot up. The time base that
> is being set is used by a device for the poison list overflow timestamp
> and all event timestamps.  Note that the command is optional and if
> not supported and the device cannot return accurate timestamps it will
> fill the fields in with an appropriate marker (see the specification
> description of each timestamp).
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> ---
> v2: Thanks to DavidLohr, Alison and Dan for quick reviews.
>  - Drop exposure to userspace.
>  - Drop prevention of raw command based access.
>  - Check for a Not Supported return code. If that happens eat the error.
>  - Fix missing endian conversion.
>  - Switch to ktime.h include rather than timekeeping.h as per comments in
>    the headers.
> 
> Based on cxl/pending as of today.
> 
> Open question: Should we only do this if Linux has control of the
> error handling?  In theory it should be safe anyway given the
> specification is clear that the timestamp base should always be the
> same - so subject to small errors we shouldn't cause any firmware first
> handling to get confused.

I think it's safe for the reasons you give, but I will ask our platform
firmware team what they think / give them a heads up that Linux is
planning to do this unconditionally.

  reply	other threads:[~2023-01-30 19:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-30 15:13 [PATCH v2] cxl/pci: Set the device timestamp Jonathan Cameron
2023-01-30 19:29 ` Dan Williams [this message]
2023-02-22 15:34 ` Nabeel M Mohamed
2023-02-22 16:27   ` Jonathan Cameron
2023-02-23  3:55     ` Nabeel M Mohamed
2023-02-23 15:05       ` Jonathan Cameron
2023-02-23 16:10         ` Nabeel M Mohamed
2023-02-23 16:42       ` Davidlohr Bueso
2023-02-23 22:11         ` Ira Weiny
2023-04-22  1:34         ` Dan Williams

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=63d81aaa8182f_3a36e52945b@dwillia2-xfh.jf.intel.com.notmuch \
    --to=dan.j.williams@intel.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=alison.schofield@intel.com \
    --cc=ira.weiny@intel.com \
    --cc=linux-cxl@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=vishal.l.verma@intel.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