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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <3be1961d-d451-4038-9cf1-5bcd44550346@shenghaoyang.info>
Date: Mon, 14 Oct 2024 03:38:49 +0800
From: Shenghao Yang <me@...nghaoyang.info>
To: Andrew Lunn <andrew@...n.ch>
Cc: netdev@...r.kernel.org, f.fainelli@...il.com, olteanv@...il.com,
 pavana.sharma@...i.com, ashkan.boldaji@...i.com, kabel@...nel.org
Subject: Re: [PATCH net v2 2/3] net: dsa: mv88e6xxx: read cycle counter period
 from hardware


On 14/10/24 01:01, Andrew Lunn wrote:

>> I've looked around a bit and this doesn't seem possible - the common
>> timecounter code in time/timecounter.c and linux/timecounter.h has a
>> dependency on the cc_mult and cc_shift fields within the cyclecounter
>> tstamp_cc.
> 
> Ah, sorry. I did not see that tstamp_cc was a timecounter structure.
> 
> Maybe have 3 const struct cyclecounter similar to you having 3 const
> mv88e6xxx_cc_coeffs. Assign the appropriate one to chip. mult and
> shift can then be dropped from mv88ex6xxx_cc_coeffs?
> 
> 	Andrew

Hi Andrew,

That might be a bit hairy too - the cyclecounters need way to reference
the chip so they can access the hardware counter in tstamp_cc->read.

That's currently done via a container_of() on tstamp_cc itself in
mv88e6xxx_ptp_clock_read. With only that single pointer available
sharing doesn't seem too possible :/.

Thanks,

Shenghao

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ