lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6736642260849_3379ce29445@willemb.c.googlers.com.notmuch>
Date: Thu, 14 Nov 2024 15:57:06 -0500
From: Willem de Bruijn <willemdebruijn.kernel@...il.com>
To: Vadim Fedorenko <vadim.fedorenko@...ux.dev>, 
 Milena Olech <milena.olech@...el.com>, 
 intel-wired-lan@...ts.osuosl.org
Cc: netdev@...r.kernel.org, 
 anthony.l.nguyen@...el.com, 
 przemyslaw.kitszel@...el.com, 
 Alexander Lobakin <aleksander.lobakin@...el.com>
Subject: Re: [PATCH iwl-net 04/10] idpf: negotiate PTP capabilies and get PTP
 clock

Vadim Fedorenko wrote:

> > +/**
> > + * idpf_ptp_read_src_clk_reg_direct - Read directly the main timer value
> > + * @adapter: Driver specific private structure
> > + * @sts: Optional parameter for holding a pair of system timestamps from
> > + *	 the system clock. Will be ignored when NULL is given.
> > + *
> > + * Return: the device clock time on success, -errno otherwise.
> > + */
> > +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;
> > +
> > +	/* Read the system timestamp pre PHC read */
> > +	ptp_read_system_prets(sts);
> > +
> > +	idpf_ptp_enable_shtime(adapter);
> > +	lo = readl(ptp->dev_clk_regs.dev_clk_ns_l);
> > +
> > +	/* Read the system timestamp post PHC read */
> > +	ptp_read_system_postts(sts);
> > +
> > +	hi = readl(ptp->dev_clk_regs.dev_clk_ns_h);
> > +
> > +	return ((u64)hi << 32) | lo;
> > +}
> 
> Am I right that idpf_ptp_enable_shtime() "freezes" the time in clk
> registers and you can be sure that no changes will happen while you are
> doing 2 transactions? If yes, then what does unfreeze it? Or does it
> just copy new values to the registers and they will stay until the next
> command?

Yep, these are shadow registers.

I guess they remain until overwritten on the next latch.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ