All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jacob Keller <jacob.e.keller@intel.com>
To: Milena Olech <milena.olech@intel.com>,
	<intel-wired-lan@lists.osuosl.org>
Cc: <netdev@vger.kernel.org>, <anthony.l.nguyen@intel.com>,
	<przemyslaw.kitszel@intel.com>,
	Willem de Bruijn <willemb@google.com>,
	"Mina Almasry" <almasrymina@google.com>,
	Samuel Salin <Samuel.salin@intel.com>
Subject: Re: [Intel-wired-lan] [PATCH v10 iwl-next 05/11] idpf: negotiate PTP capabilities and get PTP clock
Date: Tue, 8 Apr 2025 14:15:21 -0700	[thread overview]
Message-ID: <fd2098e1-c5c5-4cf8-b34e-ebe0bd288248@intel.com> (raw)
In-Reply-To: <20250408103240.30287-13-milena.olech@intel.com>



On 4/8/2025 3:30 AM, Milena Olech wrote:
> +static u64 idpf_ptp_read_src_clk_reg_direct(struct idpf_adapter *adapter,
> +					    struct ptp_system_timestamp *sts)
> +{
> +	struct idpf_ptp *ptp = adapter->ptp;
> +	u32 hi, lo;
> +
> +	spin_lock(&ptp->read_dev_clk_lock);
> +
> +	/* Read the system timestamp pre PHC read */
> +	ptp_read_system_prets(sts);
> +
> +	idpf_ptp_enable_shtime(adapter);
> +
> +	/* Read the system timestamp post PHC read */
> +	ptp_read_system_postts(sts);
> +
> +	lo = readl(ptp->dev_clk_regs.dev_clk_ns_l);
> +	hi = readl(ptp->dev_clk_regs.dev_clk_ns_h);
> +
> +	spin_unlock(&ptp->read_dev_clk_lock);
> +
> +	return ((u64)hi << 32) | lo;
> +}
v9 had comments regarding the latching of the registers for direct
access. Can you confirm whether this is known to be safe, or if you need
to implement a 3-part read like we do in ice and other hardware? Even
with a spinlock there could be issues with rollover in the hardware I think?

Thanks,
Jake

  reply	other threads:[~2025-04-08 21:15 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-08 10:30 [Intel-wired-lan] [PATCH v10 iwl-next 00/11] idpf: add initial PTP support Milena Olech
2025-04-08 10:30 ` Milena Olech
2025-04-08 10:30 ` [Intel-wired-lan] [PATCH v10 iwl-next 01/11] idpf: change the method for mailbox workqueue allocation Milena Olech
2025-04-08 10:30   ` Milena Olech
2025-04-08 21:01   ` [Intel-wired-lan] " Jacob Keller
2025-04-08 10:30 ` [Intel-wired-lan] [PATCH v10 iwl-next 02/11] idpf: add initial PTP support Milena Olech
2025-04-08 10:30   ` Milena Olech
2025-04-08 21:02   ` [Intel-wired-lan] " Jacob Keller
2025-04-08 10:30 ` [Intel-wired-lan] [PATCH v10 iwl-next 03/11] virtchnl: add PTP virtchnl definitions Milena Olech
2025-04-08 10:30   ` Milena Olech
2025-04-08 21:12   ` [Intel-wired-lan] " Jacob Keller
2025-04-09 11:51     ` Olech, Milena
2025-04-09 11:51       ` Olech, Milena
2025-04-09 18:11       ` Jacob Keller
2025-04-10 13:18         ` Olech, Milena
2025-04-10 13:18           ` Olech, Milena
2025-04-08 10:30 ` [Intel-wired-lan] [PATCH v10 iwl-next 04/11] idpf: move virtchnl structures to the header file Milena Olech
2025-04-08 10:30   ` Milena Olech
2025-04-08 21:12   ` [Intel-wired-lan] " Jacob Keller
2025-04-08 10:30 ` [Intel-wired-lan] [PATCH v10 iwl-next 05/11] idpf: negotiate PTP capabilities and get PTP clock Milena Olech
2025-04-08 10:30   ` Milena Olech
2025-04-08 21:15   ` Jacob Keller [this message]
2025-04-09 12:55     ` [Intel-wired-lan] " Olech, Milena
2025-04-09 12:55       ` Olech, Milena
2025-04-09 18:14       ` Jacob Keller
2025-04-08 10:30 ` [Intel-wired-lan] [PATCH v10 iwl-next 06/11] idpf: add mailbox access to read PTP clock time Milena Olech
2025-04-08 10:30   ` Milena Olech
2025-04-08 21:16   ` [Intel-wired-lan] " Jacob Keller
2025-04-09 13:01     ` Olech, Milena
2025-04-09 13:01       ` Olech, Milena
2025-04-08 21:17   ` Jacob Keller
2025-04-08 10:31 ` [Intel-wired-lan] [PATCH v10 iwl-next 07/11] idpf: add cross timestamping Milena Olech
2025-04-08 10:31   ` Milena Olech
2025-04-08 21:18   ` [Intel-wired-lan] " Jacob Keller
2025-04-08 10:31 ` [Intel-wired-lan] [PATCH v10 iwl-next 08/11] idpf: add PTP clock configuration Milena Olech
2025-04-08 10:31   ` Milena Olech
2025-04-08 21:20   ` [Intel-wired-lan] " Jacob Keller
2025-04-08 10:31 ` [Intel-wired-lan] [PATCH v10 iwl-next 09/11] idpf: add Tx timestamp capabilities negotiation Milena Olech
2025-04-08 10:31   ` Milena Olech
2025-04-08 21:23   ` [Intel-wired-lan] " Jacob Keller
2025-04-09 14:04     ` Olech, Milena
2025-04-09 14:04       ` Olech, Milena
2025-04-09 18:08       ` Jacob Keller
2025-04-10 14:11         ` Olech, Milena
2025-04-10 14:11           ` Olech, Milena
2025-04-10 15:36           ` Keller, Jacob E
2025-04-10 15:36             ` Keller, Jacob E
2025-04-08 10:31 ` [Intel-wired-lan] [PATCH v10 iwl-next 10/11] idpf: add Tx timestamp flows Milena Olech
2025-04-08 10:31   ` Milena Olech
2025-04-08 21:31   ` [Intel-wired-lan] " Jacob Keller
2025-04-10 13:28     ` Olech, Milena
2025-04-10 13:28       ` Olech, Milena
2025-04-08 10:31 ` [Intel-wired-lan] [PATCH v10 iwl-next 11/11] idpf: add support for Rx timestamping Milena Olech
2025-04-08 10:31   ` Milena Olech
2025-04-08 21:31   ` [Intel-wired-lan] " Jacob Keller

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=fd2098e1-c5c5-4cf8-b34e-ebe0bd288248@intel.com \
    --to=jacob.e.keller@intel.com \
    --cc=Samuel.salin@intel.com \
    --cc=almasrymina@google.com \
    --cc=anthony.l.nguyen@intel.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=milena.olech@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=przemyslaw.kitszel@intel.com \
    --cc=willemb@google.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 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.