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] [thread-next>] [day] [month] [year] [list]
Message-ID: <801c7a93-667b-4c23-9493-4cbe979847a2@enneenne.com>
Date: Tue, 27 Aug 2024 15:09:15 +0200
From: Rodolfo Giometti <giometti@...eenne.com>
To: Greg KH <gregkh@...uxfoundation.org>, subramanian.mohan@...el.com
Cc: tglx@...utronix.de, corbet@....net, linux-kernel@...r.kernel.org,
 linux-doc@...r.kernel.org, andriy.shevchenko@...ux.intel.com,
 eddie.dong@...el.com, christopher.s.hall@...el.com, pandith.n@...el.com,
 thejesh.reddy.t.r@...el.com, david.zage@...el.com,
 srinivasan.chinnadurai@...el.com
Subject: Re: [PATCH v12 2/3] Documentation: driver-api: pps: Add Intel Timed
 I/O PPS generator

On 24/08/24 04:21, Greg KH wrote:
> On Fri, Aug 23, 2024 at 12:31:07PM +0530, subramanian.mohan@...el.com wrote:
>> From: Subramanian Mohan <subramanian.mohan@...el.com>
>>
>> Add Intel Timed I/O PPS usage instructions.
>>
>> Co-developed-by: Pandith N <pandith.n@...el.com>
>> Signed-off-by: Pandith N <pandith.n@...el.com>
>> Signed-off-by: Lakshmi Sowjanya D <lakshmi.sowjanya.d@...el.com>
>> Reviewed-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
>> Acked-by: Rodolfo Giometti <giometti@...eenne.com>
>> Signed-off-by: Subramanian Mohan <subramanian.mohan@...el.com>
>> ---
>>   Documentation/driver-api/pps.rst | 24 ++++++++++++++++++++++++
>>   1 file changed, 24 insertions(+)
>>
>> diff --git a/Documentation/driver-api/pps.rst b/Documentation/driver-api/pps.rst
>> index 78dded03e5d8..75f7b094f963 100644
>> --- a/Documentation/driver-api/pps.rst
>> +++ b/Documentation/driver-api/pps.rst
>> @@ -246,3 +246,27 @@ delay between assert and clear edge as small as possible to reduce system
>>   latencies. But if it is too small slave won't be able to capture clear edge
>>   transition. The default of 30us should be good enough in most situations.
>>   The delay can be selected using 'delay' pps_gen_parport module parameter.
>> +
>> +
>> +Intel Timed I/O PPS signal generator
>> +------------------------------------
>> +
>> +Intel Timed I/O is a high precision device, present on 2019 and newer Intel
>> +CPUs, that can generate PPS signals.
>> +
>> +Timed I/O and system time are both driven by same hardware clock. The signal
>> +is generated with a precision of ~20 nanoseconds. The generated PPS signal
>> +is used to synchronize an external device with system clock. For example,
>> +it can be used to share your clock with a device that receives PPS signal,
>> +generated by Timed I/O device. There are dedicated Timed I/O pins to deliver
>> +the PPS signal to an external device.
>> +
>> +Usage of Intel Timed I/O as PPS generator:
>> +
>> +Start generating PPS signal::
>> +
>> +        $echo 1 > /sys/devices/platform/INTCxxxx\:00/enable
>> +
>> +Stop generating PPS signal::
>> +
>> +        $echo 0 > /sys/devices/platform/INTCxxxx\:00/enable
> 
> As I mentioned on the sysfs documentation, why isn't this just a generic
> pps class attribute instead?  Why did you make it
> only-this-one-special-driver type of thing?

This is an Original Sin when PPS generators were introduced. :-(

In 2011 a patch from Alexander Gordeev <lasaine@....cs.msu.su> (which introduced 
the "parallel port PPS signal generator") was committed in the main kernel.

At the time it was something exotic and doing a PPS generator interface for it 
was not considered (since it actually has no controlling inputs), but now 
several Ethernet cards have such PPS generator functionalities, and they are 
enabled in a per-driver way or via the PTP API.

This code is a pure PPS generator and it cannot use any other way to enable such 
functionality than the one above since the PPS layer misses a proper 
implementation for PPS generator.

If you are willing to stop the inclusion due this fact maybe its time to add 
such PPS generators interface... on the other hand, if you agree for inclusion 
we can do this job as soon as the code has been included, in order to fix this 
anomalous status.

Ciao,

Rodolfo

-- 
GNU/Linux Solutions                  e-mail: giometti@...eenne.com
Linux Device Driver                          giometti@...ux.it
Embedded Systems                     phone:  +39 349 2432127
UNIX programming


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ