* [PATCH v10 0/3] Add support for Intel PPS Generator
@ 2024-06-12 3:53 lakshmi.sowjanya.d
2024-06-12 3:53 ` [PATCH v10 1/3] pps: generators: Add PPS Generator TIO Driver lakshmi.sowjanya.d
` (5 more replies)
0 siblings, 6 replies; 20+ messages in thread
From: lakshmi.sowjanya.d @ 2024-06-12 3:53 UTC (permalink / raw)
To: tglx, giometti, corbet, linux-kernel, linux-doc
Cc: gregkh, andriy.shevchenko, eddie.dong, christopher.s.hall,
pandith.n, subramanian.mohan, thejesh.reddy.t.r,
lakshmi.sowjanya.d
From: Lakshmi Sowjanya D <lakshmi.sowjanya.d@intel.com>
The goal of the PPS (Pulse Per Second) hardware/software is to generate a
signal from the system on a wire so that some third-party hardware can
observe that signal and judge how close the system's time is to another
system or piece of hardware.
Existing methods (like parallel ports) require software to flip a bit at
just the right time to create a PPS signal. Many things can prevent
software from doing this precisely. This (Timed I/O) method is better
because software only "arms" the hardware in advance and then depends on
the hardware to "fire" and flip the signal at just the right time.
To generate a PPS signal with this new hardware, the kernel wakes up
twice a second, once for 1->0 edge and other for the 0->1 edge. It does
this shortly (~10ms) before the actual change in the signal needs to be
made. It computes the TSC value at which edge will happen, convert to a
value hardware understands and program this value to Timed I/O hardware.
The actual edge transition happens without any further action from the
kernel.
The result here is a signal coming out of the system that is roughly
1,000 times more accurate than the old methods. If the system is heavily
loaded, the difference in accuracy is larger in old methods.
Application Interface:
The API to use Timed I/O is very simple. It is enabled and disabled by
writing a '1' or '0' value to the sysfs enable attribute associated with
the Timed I/O PPS device. Each Timed I/O pin is represented by a PPS
device. When enabled, a pulse-per-second (PPS) synchronized with the
system clock is continuously produced on the Timed I/O pin, otherwise it
is pulled low.
The Timed I/O signal on the motherboard is enabled in the BIOS setup.
Intel Advanced Menu -> PCH IO Configuration -> Timed I/O <Enable>
References:
https://en.wikipedia.org/wiki/Pulse-per-second_signal
https://drive.google.com/file/d/1vkBRRDuELmY8I3FlfOZaEBp-DxLW6t_V/view
https://youtu.be/JLUTT-lrDqw
Patch 1 adds the pps(pulse per second) generator tio driver to the pps
subsystem.
Patch 2 documentation and usage of the pps tio generator module.
Patch 3 includes documentation for sysfs interface.
These patches are based on the timers/core branch:
[1] https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/?h=timers/core
These changes are dependent on patches that are merged in [1].
Please help to review the changes.
Thanks in advance,
Sowjanya
Changes from v2:
- Split patch 1 to remove the functions in later stages.
- Include required headers in pps_gen_tio.
Changes from v3:
- Corrections in Documentation.
- Introducing non-RFC version of the patch series.
Changes from v4:
- Setting id in ice_ptp
- Modified conversion logic in convert_base_to_cs.
- Included the usage of the APIs in the commit message of 2nd patch.
Changes from v5:
- Change nsecs variable to use_nsecs.
- Change order of 1&2 patches and modify the commit message.
- Add sysfs abi file entry in MAINTAINERS file.
- Add check to find if any event is missed and disable hardware
accordingly.
Changes from v6:
- Split patch 1 into 1&2 patches.
- Add check for overflow in convert_ns_to_cs().
- Refine commit messages.
Changes from v7:
- Split the if condition and return error if current time exceeds
expire time.
- Update kernel version and month in ABI file.
Changes from v8:
- Add function to enable Timed I/O.
- Changed the updating of tio->enabled to a centralized place in
disable and enable functions.
Changes from v9:
- use tio->enabled instead of reading ctrl register.
- change error code in enable_store to -ENODEV.
Lakshmi Sowjanya D (3):
pps: generators: Add PPS Generator TIO Driver
Documentation: driver-api: pps: Add Intel Timed I/O PPS generator
ABI: pps: Add ABI documentation for Intel TIO
.../ABI/testing/sysfs-platform-pps-tio | 7 +
Documentation/driver-api/pps.rst | 24 ++
MAINTAINERS | 1 +
drivers/pps/generators/Kconfig | 16 ++
drivers/pps/generators/Makefile | 1 +
drivers/pps/generators/pps_gen_tio.c | 264 ++++++++++++++++++
6 files changed, 313 insertions(+)
create mode 100644 Documentation/ABI/testing/sysfs-platform-pps-tio
create mode 100644 drivers/pps/generators/pps_gen_tio.c
--
2.35.3
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH v10 1/3] pps: generators: Add PPS Generator TIO Driver
2024-06-12 3:53 [PATCH v10 0/3] Add support for Intel PPS Generator lakshmi.sowjanya.d
@ 2024-06-12 3:53 ` lakshmi.sowjanya.d
2024-06-12 3:53 ` [PATCH v10 2/3] Documentation: driver-api: pps: Add Intel Timed I/O PPS generator lakshmi.sowjanya.d
` (4 subsequent siblings)
5 siblings, 0 replies; 20+ messages in thread
From: lakshmi.sowjanya.d @ 2024-06-12 3:53 UTC (permalink / raw)
To: tglx, giometti, corbet, linux-kernel, linux-doc
Cc: gregkh, andriy.shevchenko, eddie.dong, christopher.s.hall,
pandith.n, subramanian.mohan, thejesh.reddy.t.r,
lakshmi.sowjanya.d
From: Lakshmi Sowjanya D <lakshmi.sowjanya.d@intel.com>
The Intel Timed IO PPS generator driver outputs a PPS signal using
dedicated hardware that is more accurate than software actuated PPS.
The Timed IO hardware generates output events using the ART timer.
The ART timer period varies based on platform type, but is less than 100
nanoseconds for all current platforms. Timed IO output accuracy is
within 1 ART period.
PPS output is enabled by writing '1' the 'enable' sysfs attribute. The
driver uses hrtimers to schedule a wake-up 10 ms before each event
(edge) target time. At wakeup, the driver converts the target time in
terms of CLOCK_REALTIME to ART trigger time and writes this to the Timed
IO hardware. The Timed IO hardware generates an event precisely at the
requested system time without software involvement.
Co-developed-by: Christopher Hall <christopher.s.hall@intel.com>
Signed-off-by: Christopher Hall <christopher.s.hall@intel.com>
Co-developed-by: Pandith N <pandith.n@intel.com>
Signed-off-by: Pandith N <pandith.n@intel.com>
Co-developed-by: Thejesh Reddy T R <thejesh.reddy.t.r@intel.com>
Signed-off-by: Thejesh Reddy T R <thejesh.reddy.t.r@intel.com>
Signed-off-by: Lakshmi Sowjanya D <lakshmi.sowjanya.d@intel.com>
Reviewed-by: Eddie Dong <eddie.dong@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Rodolfo Giometti <giometti@enneenne.com>
---
drivers/pps/generators/Kconfig | 16 ++
drivers/pps/generators/Makefile | 1 +
drivers/pps/generators/pps_gen_tio.c | 264 +++++++++++++++++++++++++++
3 files changed, 281 insertions(+)
create mode 100644 drivers/pps/generators/pps_gen_tio.c
diff --git a/drivers/pps/generators/Kconfig b/drivers/pps/generators/Kconfig
index d615e640fcad..0f090932336f 100644
--- a/drivers/pps/generators/Kconfig
+++ b/drivers/pps/generators/Kconfig
@@ -12,3 +12,19 @@ config PPS_GENERATOR_PARPORT
If you say yes here you get support for a PPS signal generator which
utilizes STROBE pin of a parallel port to send PPS signals. It uses
parport abstraction layer and hrtimers to precisely control the signal.
+
+config PPS_GENERATOR_TIO
+ tristate "TIO PPS signal generator"
+ depends on X86 && CPU_SUP_INTEL
+ help
+ If you say yes here you get support for a PPS TIO signal generator
+ which generates a pulse at a prescribed time based on the system clock.
+ It uses time translation and hrtimers to precisely generate a pulse.
+ This hardware is present on 2019 and newer Intel CPUs. However, this
+ driver is not useful without adding highly specialized hardware outside
+ the Linux system to observe these pulses.
+
+ To compile this driver as a module, choose M here: the module
+ will be called pps_gen_tio.
+
+ If unsure, say N.
diff --git a/drivers/pps/generators/Makefile b/drivers/pps/generators/Makefile
index 2589fd0f2481..714e847ae193 100644
--- a/drivers/pps/generators/Makefile
+++ b/drivers/pps/generators/Makefile
@@ -4,5 +4,6 @@
#
obj-$(CONFIG_PPS_GENERATOR_PARPORT) += pps_gen_parport.o
+obj-$(CONFIG_PPS_GENERATOR_TIO) += pps_gen_tio.o
ccflags-$(CONFIG_PPS_DEBUG) := -DDEBUG
diff --git a/drivers/pps/generators/pps_gen_tio.c b/drivers/pps/generators/pps_gen_tio.c
new file mode 100644
index 000000000000..c4142aa8f356
--- /dev/null
+++ b/drivers/pps/generators/pps_gen_tio.c
@@ -0,0 +1,264 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Intel PPS signal Generator Driver
+ *
+ * Copyright (C) 2024 Intel Corporation
+ */
+
+#include <linux/bits.h>
+#include <linux/bitfield.h>
+#include <linux/cleanup.h>
+#include <linux/container_of.h>
+#include <linux/cpu.h>
+#include <linux/device.h>
+#include <linux/err.h>
+#include <linux/hrtimer.h>
+#include <linux/io-64-nonatomic-hi-lo.h>
+#include <linux/kstrtox.h>
+#include <linux/mod_devicetable.h>
+#include <linux/module.h>
+#include <linux/platform_device.h>
+#include <linux/spinlock.h>
+#include <linux/sysfs.h>
+#include <linux/timekeeping.h>
+#include <linux/types.h>
+
+#include <asm/cpu_device_id.h>
+
+#define TIOCTL 0x00
+#define TIOCOMPV 0x10
+#define TIOEC 0x30
+
+/* Control Register */
+#define TIOCTL_EN BIT(0)
+#define TIOCTL_DIR BIT(1)
+#define TIOCTL_EP GENMASK(3, 2)
+#define TIOCTL_EP_RISING_EDGE FIELD_PREP(TIOCTL_EP, 0)
+#define TIOCTL_EP_FALLING_EDGE FIELD_PREP(TIOCTL_EP, 1)
+#define TIOCTL_EP_TOGGLE_EDGE FIELD_PREP(TIOCTL_EP, 2)
+
+#define SAFE_TIME_NS (10 * NSEC_PER_MSEC) /* Safety time to set hrtimer early */
+#define MAGIC_CONST (NSEC_PER_SEC - SAFE_TIME_NS)
+#define ART_HW_DELAY_CYCLES 2
+
+struct pps_tio {
+ struct hrtimer timer;
+ struct device *dev;
+ spinlock_t lock;
+ struct attribute_group attrs;
+ void __iomem *base;
+ bool enabled;
+ u32 prev_count;
+};
+
+static inline u32 pps_tio_read(struct pps_tio *tio, u32 offset)
+{
+ return readl(tio->base + offset);
+}
+
+static inline void pps_ctl_write(struct pps_tio *tio, u32 value)
+{
+ writel(value, tio->base + TIOCTL);
+}
+
+/* For COMPV register, It's safer to write higher 32-bit followed by lower 32-bit */
+static inline void pps_compv_write(struct pps_tio *tio, u64 value)
+{
+ hi_lo_writeq(value, tio->base + TIOCOMPV);
+}
+
+static inline ktime_t first_event(struct pps_tio *tio)
+{
+ return ktime_set(ktime_get_real_seconds() + 1, MAGIC_CONST);
+}
+
+static u32 pps_tio_disable(struct pps_tio *tio)
+{
+ u32 ctrl;
+
+ ctrl = pps_tio_read(tio, TIOCTL);
+ pps_compv_write(tio, 0);
+
+ ctrl &= ~TIOCTL_EN;
+ pps_ctl_write(tio, ctrl);
+ tio->enabled = false;
+ tio->prev_count = 0;
+
+ return ctrl;
+}
+
+static void pps_tio_enable(struct pps_tio *tio)
+{
+ u32 ctrl;
+
+ ctrl = pps_tio_read(tio, TIOCTL);
+ ctrl |= TIOCTL_EN;
+ pps_ctl_write(tio, ctrl);
+ tio->enabled = true;
+}
+
+static void pps_tio_direction_output(struct pps_tio *tio)
+{
+ u32 ctrl;
+
+ ctrl = pps_tio_disable(tio);
+
+ /* We enable the device, be sure that the 'compare' value is invalid */
+ pps_compv_write(tio, 0);
+
+ ctrl &= ~(TIOCTL_DIR | TIOCTL_EP);
+ ctrl |= TIOCTL_EP_TOGGLE_EDGE;
+ pps_ctl_write(tio, ctrl);
+ pps_tio_enable(tio);
+}
+
+static bool pps_generate_next_pulse(struct pps_tio *tio, ktime_t expires)
+{
+ u64 art;
+
+ if (!ktime_real_to_base_clock(expires, CSID_X86_ART, &art)) {
+ pps_tio_disable(tio);
+ return false;
+ }
+
+ pps_compv_write(tio, art - ART_HW_DELAY_CYCLES);
+ return true;
+}
+
+static enum hrtimer_restart hrtimer_callback(struct hrtimer *timer)
+{
+ struct pps_tio *tio = container_of(timer, struct pps_tio, timer);
+ ktime_t expires, now;
+ u32 event_count;
+
+ guard(spinlock)(&tio->lock);
+
+ /* Check if any event is missed. If an event is missed, TIO will be disabled*/
+ event_count = pps_tio_read(tio, TIOEC);
+ if (tio->prev_count && tio->prev_count == event_count)
+ goto err;
+ tio->prev_count = event_count;
+ expires = hrtimer_get_expires(timer);
+ now = ktime_get_real();
+
+ if (now - expires >= SAFE_TIME_NS)
+ goto err;
+
+ tio->enabled = pps_generate_next_pulse(tio, expires + SAFE_TIME_NS);
+ if (!tio->enabled)
+ return HRTIMER_NORESTART;
+
+ hrtimer_forward(timer, now, NSEC_PER_SEC / 2);
+ return HRTIMER_RESTART;
+err:
+ dev_err(tio->dev, "Event missed, Disabling Timed I/O");
+ pps_tio_disable(tio);
+ return HRTIMER_NORESTART;
+}
+
+static ssize_t enable_store(struct device *dev, struct device_attribute *attr, const char *buf,
+ size_t count)
+{
+ struct pps_tio *tio = dev_get_drvdata(dev);
+ bool enable;
+ int err;
+
+ if (!timekeeping_clocksource_has_base(CSID_X86_ART)) {
+ dev_err_once(dev, "PPS cannot be used as clock is not related to ART");
+ return -ENODEV;
+ }
+
+ err = kstrtobool(buf, &enable);
+ if (err)
+ return err;
+
+ guard(spinlock_irqsave)(&tio->lock);
+ if (enable && !tio->enabled) {
+ pps_tio_direction_output(tio);
+ hrtimer_start(&tio->timer, first_event(tio), HRTIMER_MODE_ABS);
+ } else if (!enable && tio->enabled) {
+ hrtimer_cancel(&tio->timer);
+ pps_tio_disable(tio);
+ }
+ return count;
+}
+
+static ssize_t enable_show(struct device *dev, struct device_attribute *devattr, char *buf)
+{
+ struct pps_tio *tio = dev_get_drvdata(dev);
+
+ return sysfs_emit(buf, "%u\n", tio->enabled);
+}
+static DEVICE_ATTR_RW(enable);
+
+static struct attribute *pps_tio_attrs[] = {
+ &dev_attr_enable.attr,
+ NULL
+};
+ATTRIBUTE_GROUPS(pps_tio);
+
+static int pps_gen_tio_probe(struct platform_device *pdev)
+{
+ struct device *dev = &pdev->dev;
+ struct pps_tio *tio;
+
+ if (!(cpu_feature_enabled(X86_FEATURE_TSC_KNOWN_FREQ) &&
+ cpu_feature_enabled(X86_FEATURE_ART))) {
+ dev_warn(dev, "TSC/ART is not enabled");
+ return -ENODEV;
+ }
+
+ tio = devm_kzalloc(dev, sizeof(*tio), GFP_KERNEL);
+ if (!tio)
+ return -ENOMEM;
+
+ tio->dev = dev;
+ tio->base = devm_platform_ioremap_resource(pdev, 0);
+ if (IS_ERR(tio->base))
+ return PTR_ERR(tio->base);
+
+ pps_tio_disable(tio);
+ hrtimer_init(&tio->timer, CLOCK_REALTIME, HRTIMER_MODE_ABS);
+ tio->timer.function = hrtimer_callback;
+ spin_lock_init(&tio->lock);
+ platform_set_drvdata(pdev, tio);
+
+ return 0;
+}
+
+static int pps_gen_tio_remove(struct platform_device *pdev)
+{
+ struct pps_tio *tio = platform_get_drvdata(pdev);
+
+ hrtimer_cancel(&tio->timer);
+ pps_tio_disable(tio);
+
+ return 0;
+}
+
+static const struct acpi_device_id intel_pmc_tio_acpi_match[] = {
+ { "INTC1021" },
+ { "INTC1022" },
+ { "INTC1023" },
+ { "INTC1024" },
+ {}
+};
+MODULE_DEVICE_TABLE(acpi, intel_pmc_tio_acpi_match);
+
+static struct platform_driver pps_gen_tio_driver = {
+ .probe = pps_gen_tio_probe,
+ .remove = pps_gen_tio_remove,
+ .driver = {
+ .name = "intel-pps-gen-tio",
+ .acpi_match_table = intel_pmc_tio_acpi_match,
+ .dev_groups = pps_tio_groups,
+ },
+};
+module_platform_driver(pps_gen_tio_driver);
+
+MODULE_AUTHOR("Lakshmi Sowjanya D <lakshmi.sowjanya.d@intel.com>");
+MODULE_AUTHOR("Christopher Hall <christopher.s.hall@intel.com>");
+MODULE_AUTHOR("Pandith N <pandith.n@intel.com>");
+MODULE_AUTHOR("Thejesh Reddy T R <thejesh.reddy.t.r@intel.com>");
+MODULE_DESCRIPTION("Intel PMC Time-Aware IO Generator Driver");
+MODULE_LICENSE("GPL");
--
2.35.3
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH v10 2/3] Documentation: driver-api: pps: Add Intel Timed I/O PPS generator
2024-06-12 3:53 [PATCH v10 0/3] Add support for Intel PPS Generator lakshmi.sowjanya.d
2024-06-12 3:53 ` [PATCH v10 1/3] pps: generators: Add PPS Generator TIO Driver lakshmi.sowjanya.d
@ 2024-06-12 3:53 ` lakshmi.sowjanya.d
2024-06-12 8:02 ` Greg KH
2024-06-12 3:53 ` [PATCH v10 3/3] ABI: pps: Add ABI documentation for Intel TIO lakshmi.sowjanya.d
` (3 subsequent siblings)
5 siblings, 1 reply; 20+ messages in thread
From: lakshmi.sowjanya.d @ 2024-06-12 3:53 UTC (permalink / raw)
To: tglx, giometti, corbet, linux-kernel, linux-doc
Cc: gregkh, andriy.shevchenko, eddie.dong, christopher.s.hall,
pandith.n, subramanian.mohan, thejesh.reddy.t.r,
lakshmi.sowjanya.d
From: Lakshmi Sowjanya D <lakshmi.sowjanya.d@intel.com>
Add Intel Timed I/O PPS usage instructions.
Co-developed-by: Pandith N <pandith.n@intel.com>
Signed-off-by: Pandith N <pandith.n@intel.com>
Signed-off-by: Lakshmi Sowjanya D <lakshmi.sowjanya.d@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Rodolfo Giometti <giometti@enneenne.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
--
2.35.3
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH v10 3/3] ABI: pps: Add ABI documentation for Intel TIO
2024-06-12 3:53 [PATCH v10 0/3] Add support for Intel PPS Generator lakshmi.sowjanya.d
2024-06-12 3:53 ` [PATCH v10 1/3] pps: generators: Add PPS Generator TIO Driver lakshmi.sowjanya.d
2024-06-12 3:53 ` [PATCH v10 2/3] Documentation: driver-api: pps: Add Intel Timed I/O PPS generator lakshmi.sowjanya.d
@ 2024-06-12 3:53 ` lakshmi.sowjanya.d
2024-06-12 4:29 ` Randy Dunlap
2024-07-03 14:47 ` [PATCH v10 0/3] Add support for Intel PPS Generator D, Lakshmi Sowjanya
` (2 subsequent siblings)
5 siblings, 1 reply; 20+ messages in thread
From: lakshmi.sowjanya.d @ 2024-06-12 3:53 UTC (permalink / raw)
To: tglx, giometti, corbet, linux-kernel, linux-doc
Cc: gregkh, andriy.shevchenko, eddie.dong, christopher.s.hall,
pandith.n, subramanian.mohan, thejesh.reddy.t.r,
lakshmi.sowjanya.d
From: Lakshmi Sowjanya D <lakshmi.sowjanya.d@intel.com>
Document sysfs interface for Intel Timed I/O PPS driver.
Signed-off-by: Lakshmi Sowjanya D <lakshmi.sowjanya.d@intel.com>
---
Documentation/ABI/testing/sysfs-platform-pps-tio | 7 +++++++
MAINTAINERS | 1 +
2 files changed, 8 insertions(+)
create mode 100644 Documentation/ABI/testing/sysfs-platform-pps-tio
diff --git a/Documentation/ABI/testing/sysfs-platform-pps-tio b/Documentation/ABI/testing/sysfs-platform-pps-tio
new file mode 100644
index 000000000000..e461cea12d60
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-platform-pps-tio
@@ -0,0 +1,7 @@
+What: /sys/devices/platform/INTCxxxx/enable
+Date: September 2024
+KernelVersion: 6.11
+Contact: Lakshmi Sowjanya D <lakshmi.sowjanya.d@intel.com>
+Description:
+ (RW) Enable or disable PPS TIO generator output, read to
+ see the status of hardware (Enabled/Disabled).
diff --git a/MAINTAINERS b/MAINTAINERS
index aacccb376c28..9c623f167aa9 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -17946,6 +17946,7 @@ M: Rodolfo Giometti <giometti@enneenne.com>
L: linuxpps@ml.enneenne.com (subscribers-only)
S: Maintained
W: http://wiki.enneenne.com/index.php/LinuxPPS_support
+F: Documentation/ABI/testing/sysfs-platform-pps-tio
F: Documentation/ABI/testing/sysfs-pps
F: Documentation/devicetree/bindings/pps/pps-gpio.yaml
F: Documentation/driver-api/pps.rst
--
2.35.3
^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: [PATCH v10 3/3] ABI: pps: Add ABI documentation for Intel TIO
2024-06-12 3:53 ` [PATCH v10 3/3] ABI: pps: Add ABI documentation for Intel TIO lakshmi.sowjanya.d
@ 2024-06-12 4:29 ` Randy Dunlap
2024-06-12 6:57 ` Rodolfo Giometti
0 siblings, 1 reply; 20+ messages in thread
From: Randy Dunlap @ 2024-06-12 4:29 UTC (permalink / raw)
To: lakshmi.sowjanya.d, tglx, giometti, corbet, linux-kernel,
linux-doc
Cc: gregkh, andriy.shevchenko, eddie.dong, christopher.s.hall,
pandith.n, subramanian.mohan, thejesh.reddy.t.r
Hi--
On 6/11/24 8:53 PM, lakshmi.sowjanya.d@intel.com wrote:
> From: Lakshmi Sowjanya D <lakshmi.sowjanya.d@intel.com>
>
> Document sysfs interface for Intel Timed I/O PPS driver.
>
> Signed-off-by: Lakshmi Sowjanya D <lakshmi.sowjanya.d@intel.com>
> ---
> Documentation/ABI/testing/sysfs-platform-pps-tio | 7 +++++++
> MAINTAINERS | 1 +
> 2 files changed, 8 insertions(+)
> create mode 100644 Documentation/ABI/testing/sysfs-platform-pps-tio
>
> diff --git a/Documentation/ABI/testing/sysfs-platform-pps-tio b/Documentation/ABI/testing/sysfs-platform-pps-tio
> new file mode 100644
> index 000000000000..e461cea12d60
> --- /dev/null
> +++ b/Documentation/ABI/testing/sysfs-platform-pps-tio
> @@ -0,0 +1,7 @@
> +What: /sys/devices/platform/INTCxxxx/enable
> +Date: September 2024
> +KernelVersion: 6.11
> +Contact: Lakshmi Sowjanya D <lakshmi.sowjanya.d@intel.com>
> +Description:
> + (RW) Enable or disable PPS TIO generator output, read to
> + see the status of hardware (Enabled/Disabled).
> diff --git a/MAINTAINERS b/MAINTAINERS
> index aacccb376c28..9c623f167aa9 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -17946,6 +17946,7 @@ M: Rodolfo Giometti <giometti@enneenne.com>
> L: linuxpps@ml.enneenne.com (subscribers-only)
> S: Maintained
> W: http://wiki.enneenne.com/index.php/LinuxPPS_support
I can't connect to (load) that web page above (wiki...).
Is it correct? Does it work for other people?
> +F: Documentation/ABI/testing/sysfs-platform-pps-tio
> F: Documentation/ABI/testing/sysfs-pps
> F: Documentation/devicetree/bindings/pps/pps-gpio.yaml
> F: Documentation/driver-api/pps.rst
--
~Randy
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v10 3/3] ABI: pps: Add ABI documentation for Intel TIO
2024-06-12 4:29 ` Randy Dunlap
@ 2024-06-12 6:57 ` Rodolfo Giometti
2024-06-12 15:08 ` Randy Dunlap
0 siblings, 1 reply; 20+ messages in thread
From: Rodolfo Giometti @ 2024-06-12 6:57 UTC (permalink / raw)
To: Randy Dunlap, lakshmi.sowjanya.d, tglx, corbet, linux-kernel,
linux-doc
Cc: gregkh, andriy.shevchenko, eddie.dong, christopher.s.hall,
pandith.n, subramanian.mohan, thejesh.reddy.t.r
On 12/06/24 06:29, Randy Dunlap wrote:
> Hi--
>
> On 6/11/24 8:53 PM, lakshmi.sowjanya.d@intel.com wrote:
>> From: Lakshmi Sowjanya D <lakshmi.sowjanya.d@intel.com>
>>
>> Document sysfs interface for Intel Timed I/O PPS driver.
>>
>> Signed-off-by: Lakshmi Sowjanya D <lakshmi.sowjanya.d@intel.com>
>> ---
>> Documentation/ABI/testing/sysfs-platform-pps-tio | 7 +++++++
>> MAINTAINERS | 1 +
>> 2 files changed, 8 insertions(+)
>> create mode 100644 Documentation/ABI/testing/sysfs-platform-pps-tio
>>
>> diff --git a/Documentation/ABI/testing/sysfs-platform-pps-tio b/Documentation/ABI/testing/sysfs-platform-pps-tio
>> new file mode 100644
>> index 000000000000..e461cea12d60
>> --- /dev/null
>> +++ b/Documentation/ABI/testing/sysfs-platform-pps-tio
>> @@ -0,0 +1,7 @@
>> +What: /sys/devices/platform/INTCxxxx/enable
>> +Date: September 2024
>> +KernelVersion: 6.11
>> +Contact: Lakshmi Sowjanya D <lakshmi.sowjanya.d@intel.com>
>> +Description:
>> + (RW) Enable or disable PPS TIO generator output, read to
>> + see the status of hardware (Enabled/Disabled).
>> diff --git a/MAINTAINERS b/MAINTAINERS
>> index aacccb376c28..9c623f167aa9 100644
>> --- a/MAINTAINERS
>> +++ b/MAINTAINERS
>> @@ -17946,6 +17946,7 @@ M: Rodolfo Giometti <giometti@enneenne.com>
>> L: linuxpps@ml.enneenne.com (subscribers-only)
>> S: Maintained
>> W: http://wiki.enneenne.com/index.php/LinuxPPS_support
>
> I can't connect to (load) that web page above (wiki...).
> Is it correct? Does it work for other people?
The LinuxPPS wiki is at http://linuxpps.org
>> +F: Documentation/ABI/testing/sysfs-platform-pps-tio
>> F: Documentation/ABI/testing/sysfs-pps
>> F: Documentation/devicetree/bindings/pps/pps-gpio.yaml
>> F: Documentation/driver-api/pps.rst
>
Ciao,
Rodolfo
--
GNU/Linux Solutions e-mail: giometti@enneenne.com
Linux Device Driver giometti@linux.it
Embedded Systems phone: +39 349 2432127
UNIX programming
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v10 2/3] Documentation: driver-api: pps: Add Intel Timed I/O PPS generator
2024-06-12 3:53 ` [PATCH v10 2/3] Documentation: driver-api: pps: Add Intel Timed I/O PPS generator lakshmi.sowjanya.d
@ 2024-06-12 8:02 ` Greg KH
2024-06-12 8:03 ` Greg KH
0 siblings, 1 reply; 20+ messages in thread
From: Greg KH @ 2024-06-12 8:02 UTC (permalink / raw)
To: lakshmi.sowjanya.d
Cc: tglx, giometti, corbet, linux-kernel, linux-doc,
andriy.shevchenko, eddie.dong, christopher.s.hall, pandith.n,
subramanian.mohan, thejesh.reddy.t.r
On Wed, Jun 12, 2024 at 09:23:58AM +0530, lakshmi.sowjanya.d@intel.com wrote:
> From: Lakshmi Sowjanya D <lakshmi.sowjanya.d@intel.com>
>
> Add Intel Timed I/O PPS usage instructions.
>
> Co-developed-by: Pandith N <pandith.n@intel.com>
> Signed-off-by: Pandith N <pandith.n@intel.com>
> Signed-off-by: Lakshmi Sowjanya D <lakshmi.sowjanya.d@intel.com>
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Acked-by: Rodolfo Giometti <giometti@enneenne.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
Why is this not described in Documenation/ABI/ ?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v10 2/3] Documentation: driver-api: pps: Add Intel Timed I/O PPS generator
2024-06-12 8:02 ` Greg KH
@ 2024-06-12 8:03 ` Greg KH
0 siblings, 0 replies; 20+ messages in thread
From: Greg KH @ 2024-06-12 8:03 UTC (permalink / raw)
To: lakshmi.sowjanya.d
Cc: tglx, giometti, corbet, linux-kernel, linux-doc,
andriy.shevchenko, eddie.dong, christopher.s.hall, pandith.n,
subramanian.mohan, thejesh.reddy.t.r
On Wed, Jun 12, 2024 at 10:02:46AM +0200, Greg KH wrote:
> On Wed, Jun 12, 2024 at 09:23:58AM +0530, lakshmi.sowjanya.d@intel.com wrote:
> > From: Lakshmi Sowjanya D <lakshmi.sowjanya.d@intel.com>
> >
> > Add Intel Timed I/O PPS usage instructions.
> >
> > Co-developed-by: Pandith N <pandith.n@intel.com>
> > Signed-off-by: Pandith N <pandith.n@intel.com>
> > Signed-off-by: Lakshmi Sowjanya D <lakshmi.sowjanya.d@intel.com>
> > Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > Acked-by: Rodolfo Giometti <giometti@enneenne.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
>
> Why is this not described in Documenation/ABI/ ?
Oops, that was patch 3/3, sorry.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v10 3/3] ABI: pps: Add ABI documentation for Intel TIO
2024-06-12 6:57 ` Rodolfo Giometti
@ 2024-06-12 15:08 ` Randy Dunlap
0 siblings, 0 replies; 20+ messages in thread
From: Randy Dunlap @ 2024-06-12 15:08 UTC (permalink / raw)
To: Rodolfo Giometti, lakshmi.sowjanya.d, tglx, corbet, linux-kernel,
linux-doc
Cc: gregkh, andriy.shevchenko, eddie.dong, christopher.s.hall,
pandith.n, subramanian.mohan, thejesh.reddy.t.r
On 6/11/24 11:57 PM, Rodolfo Giometti wrote:
> On 12/06/24 06:29, Randy Dunlap wrote:
>> Hi--
>>
>> On 6/11/24 8:53 PM, lakshmi.sowjanya.d@intel.com wrote:
>>> From: Lakshmi Sowjanya D <lakshmi.sowjanya.d@intel.com>
>>>
>>> Document sysfs interface for Intel Timed I/O PPS driver.
>>>
>>> Signed-off-by: Lakshmi Sowjanya D <lakshmi.sowjanya.d@intel.com>
>>> ---
>>> Documentation/ABI/testing/sysfs-platform-pps-tio | 7 +++++++
>>> MAINTAINERS | 1 +
>>> 2 files changed, 8 insertions(+)
>>> create mode 100644 Documentation/ABI/testing/sysfs-platform-pps-tio
>>>
>>> diff --git a/Documentation/ABI/testing/sysfs-platform-pps-tio b/Documentation/ABI/testing/sysfs-platform-pps-tio
>>> new file mode 100644
>>> index 000000000000..e461cea12d60
>>> --- /dev/null
>>> +++ b/Documentation/ABI/testing/sysfs-platform-pps-tio
>>> @@ -0,0 +1,7 @@
>>> +What: /sys/devices/platform/INTCxxxx/enable
>>> +Date: September 2024
>>> +KernelVersion: 6.11
>>> +Contact: Lakshmi Sowjanya D <lakshmi.sowjanya.d@intel.com>
>>> +Description:
>>> + (RW) Enable or disable PPS TIO generator output, read to
>>> + see the status of hardware (Enabled/Disabled).
>>> diff --git a/MAINTAINERS b/MAINTAINERS
>>> index aacccb376c28..9c623f167aa9 100644
>>> --- a/MAINTAINERS
>>> +++ b/MAINTAINERS
>>> @@ -17946,6 +17946,7 @@ M: Rodolfo Giometti <giometti@enneenne.com>
>>> L: linuxpps@ml.enneenne.com (subscribers-only)
Is the mailing list correct?
The linuxpps.org FAQ says that the Linux PPS mail list is discussions@linuxpps.org.
>>> S: Maintained
>>> W: http://wiki.enneenne.com/index.php/LinuxPPS_support
>>
>> I can't connect to (load) that web page above (wiki...).
>> Is it correct? Does it work for other people?
>
> The LinuxPPS wiki is at http://linuxpps.org
Great. Please have someone update the MAINTAINERS file.
Thanks.
>>> +F: Documentation/ABI/testing/sysfs-platform-pps-tio
>>> F: Documentation/ABI/testing/sysfs-pps
>>> F: Documentation/devicetree/bindings/pps/pps-gpio.yaml
>>> F: Documentation/driver-api/pps.rst
>>
>
> Ciao,
>
> Rodolfo
>
--
~Randy
^ permalink raw reply [flat|nested] 20+ messages in thread
* RE: [PATCH v10 0/3] Add support for Intel PPS Generator
2024-06-12 3:53 [PATCH v10 0/3] Add support for Intel PPS Generator lakshmi.sowjanya.d
` (2 preceding siblings ...)
2024-06-12 3:53 ` [PATCH v10 3/3] ABI: pps: Add ABI documentation for Intel TIO lakshmi.sowjanya.d
@ 2024-07-03 14:47 ` D, Lakshmi Sowjanya
2024-07-04 11:50 ` Rodolfo Giometti
2024-08-13 8:15 ` Greg KH
2024-08-13 8:25 ` Greg KH
5 siblings, 1 reply; 20+ messages in thread
From: D, Lakshmi Sowjanya @ 2024-07-03 14:47 UTC (permalink / raw)
To: tglx@linutronix.de, giometti@enneenne.com, corbet@lwn.net,
linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org
Cc: gregkh@linuxfoundation.org, andriy.shevchenko@linux.intel.com,
Dong, Eddie, Hall, Christopher S, N, Pandith, Mohan, Subramanian,
T R, Thejesh Reddy
> -----Original Message-----
> From: D, Lakshmi Sowjanya <lakshmi.sowjanya.d@intel.com>
> Sent: Wednesday, June 12, 2024 9:24 AM
> To: tglx@linutronix.de; giometti@enneenne.com; corbet@lwn.net; linux-
> kernel@vger.kernel.org; linux-doc@vger.kernel.org
> Cc: gregkh@linuxfoundation.org; andriy.shevchenko@linux.intel.com; Dong,
> Eddie <eddie.dong@intel.com>; Hall, Christopher S
> <christopher.s.hall@intel.com>; N, Pandith <pandith.n@intel.com>; Mohan,
> Subramanian <subramanian.mohan@intel.com>; T R, Thejesh Reddy
> <thejesh.reddy.t.r@intel.com>; D, Lakshmi Sowjanya
> <lakshmi.sowjanya.d@intel.com>
> Subject: [PATCH v10 0/3] Add support for Intel PPS Generator
>
> From: Lakshmi Sowjanya D <lakshmi.sowjanya.d@intel.com>
>
> The goal of the PPS (Pulse Per Second) hardware/software is to generate a
> signal from the system on a wire so that some third-party hardware can observe
> that signal and judge how close the system's time is to another system or piece
> of hardware.
>
> Existing methods (like parallel ports) require software to flip a bit at just the right
> time to create a PPS signal. Many things can prevent software from doing this
> precisely. This (Timed I/O) method is better because software only "arms" the
> hardware in advance and then depends on the hardware to "fire" and flip the
> signal at just the right time.
>
> To generate a PPS signal with this new hardware, the kernel wakes up twice a
> second, once for 1->0 edge and other for the 0->1 edge. It does this shortly
> (~10ms) before the actual change in the signal needs to be made. It computes
> the TSC value at which edge will happen, convert to a value hardware
> understands and program this value to Timed I/O hardware.
> The actual edge transition happens without any further action from the kernel.
>
> The result here is a signal coming out of the system that is roughly
> 1,000 times more accurate than the old methods. If the system is heavily loaded,
> the difference in accuracy is larger in old methods.
>
> Application Interface:
> The API to use Timed I/O is very simple. It is enabled and disabled by writing a '1'
> or '0' value to the sysfs enable attribute associated with the Timed I/O PPS
> device. Each Timed I/O pin is represented by a PPS device. When enabled, a
> pulse-per-second (PPS) synchronized with the system clock is continuously
> produced on the Timed I/O pin, otherwise it is pulled low.
>
> The Timed I/O signal on the motherboard is enabled in the BIOS setup.
> Intel Advanced Menu -> PCH IO Configuration -> Timed I/O <Enable>
>
> References:
> https://en.wikipedia.org/wiki/Pulse-per-second_signal
> https://drive.google.com/file/d/1vkBRRDuELmY8I3FlfOZaEBp-DxLW6t_V/view
> https://youtu.be/JLUTT-lrDqw
>
> Patch 1 adds the pps(pulse per second) generator tio driver to the pps
> subsystem.
> Patch 2 documentation and usage of the pps tio generator module.
> Patch 3 includes documentation for sysfs interface.
>
> These patches are based on the timers/core branch:
> [1] https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/?h=timers/core
> These changes are dependent on patches that are merged in [1].
>
> Please help to review the changes.
>
> Thanks in advance,
> Sowjanya
>
> Changes from v2:
> - Split patch 1 to remove the functions in later stages.
> - Include required headers in pps_gen_tio.
>
> Changes from v3:
> - Corrections in Documentation.
> - Introducing non-RFC version of the patch series.
>
> Changes from v4:
> - Setting id in ice_ptp
> - Modified conversion logic in convert_base_to_cs.
> - Included the usage of the APIs in the commit message of 2nd patch.
>
> Changes from v5:
> - Change nsecs variable to use_nsecs.
> - Change order of 1&2 patches and modify the commit message.
> - Add sysfs abi file entry in MAINTAINERS file.
> - Add check to find if any event is missed and disable hardware
> accordingly.
>
> Changes from v6:
> - Split patch 1 into 1&2 patches.
> - Add check for overflow in convert_ns_to_cs().
> - Refine commit messages.
>
> Changes from v7:
> - Split the if condition and return error if current time exceeds
> expire time.
> - Update kernel version and month in ABI file.
>
> Changes from v8:
> - Add function to enable Timed I/O.
> - Changed the updating of tio->enabled to a centralized place in
> disable and enable functions.
>
> Changes from v9:
> - use tio->enabled instead of reading ctrl register.
> - change error code in enable_store to -ENODEV.
>
> Lakshmi Sowjanya D (3):
> pps: generators: Add PPS Generator TIO Driver
> Documentation: driver-api: pps: Add Intel Timed I/O PPS generator
> ABI: pps: Add ABI documentation for Intel TIO
>
> .../ABI/testing/sysfs-platform-pps-tio | 7 +
> Documentation/driver-api/pps.rst | 24 ++
> MAINTAINERS | 1 +
> drivers/pps/generators/Kconfig | 16 ++
> drivers/pps/generators/Makefile | 1 +
> drivers/pps/generators/pps_gen_tio.c | 264 ++++++++++++++++++
> 6 files changed, 313 insertions(+)
> create mode 100644 Documentation/ABI/testing/sysfs-platform-pps-tio
> create mode 100644 drivers/pps/generators/pps_gen_tio.c
>
> --
> 2.35.3
Hi,
A gentle reminder for the review of the pps patchset.
Regards
Sowjanya
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v10 0/3] Add support for Intel PPS Generator
2024-07-03 14:47 ` [PATCH v10 0/3] Add support for Intel PPS Generator D, Lakshmi Sowjanya
@ 2024-07-04 11:50 ` Rodolfo Giometti
2024-07-15 8:06 ` Thomas Gleixner
0 siblings, 1 reply; 20+ messages in thread
From: Rodolfo Giometti @ 2024-07-04 11:50 UTC (permalink / raw)
To: D, Lakshmi Sowjanya, tglx@linutronix.de, corbet@lwn.net,
linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org
Cc: gregkh@linuxfoundation.org, andriy.shevchenko@linux.intel.com,
Dong, Eddie, Hall, Christopher S, N, Pandith, Mohan, Subramanian,
T R, Thejesh Reddy
On 03/07/24 16:47, D, Lakshmi Sowjanya wrote:
[sbip]
>> Subject: [PATCH v10 0/3] Add support for Intel PPS Generator
>>
>> From: Lakshmi Sowjanya D <lakshmi.sowjanya.d@intel.com>
>>
>> The goal of the PPS (Pulse Per Second) hardware/software is to generate a
>> signal from the system on a wire so that some third-party hardware can observe
>> that signal and judge how close the system's time is to another system or piece
>> of hardware.
[snip]
> Hi,
>
> A gentle reminder for the review of the pps patchset.
I already acked these patchset, didn't I? =8-o
Please let me know if I missed something.
Rodolfo
--
GNU/Linux Solutions e-mail: giometti@enneenne.com
Linux Device Driver giometti@linux.it
Embedded Systems phone: +39 349 2432127
UNIX programming
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v10 0/3] Add support for Intel PPS Generator
2024-07-04 11:50 ` Rodolfo Giometti
@ 2024-07-15 8:06 ` Thomas Gleixner
2024-07-15 9:36 ` Rodolfo Giometti
0 siblings, 1 reply; 20+ messages in thread
From: Thomas Gleixner @ 2024-07-15 8:06 UTC (permalink / raw)
To: Rodolfo Giometti, D, Lakshmi Sowjanya, corbet@lwn.net,
linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org
Cc: gregkh@linuxfoundation.org, andriy.shevchenko@linux.intel.com,
Dong, Eddie, Hall, Christopher S, N, Pandith, Mohan, Subramanian,
T R, Thejesh Reddy
On Thu, Jul 04 2024 at 13:50, Rodolfo Giometti wrote:
> On 03/07/24 16:47, D, Lakshmi Sowjanya wrote:
>>
>> A gentle reminder for the review of the pps patchset.
>
> I already acked these patchset, didn't I? =8-o
>
> Please let me know if I missed something.
Sorry, I missed that V10 posting. It's too late now.
Rodolfo, can you pick it up after rc1 for the next merge window. All
prerequisites should be in Linus tree then.
Thanks,
tglx
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v10 0/3] Add support for Intel PPS Generator
2024-07-15 8:06 ` Thomas Gleixner
@ 2024-07-15 9:36 ` Rodolfo Giometti
2024-07-24 21:39 ` Hall, Christopher S
0 siblings, 1 reply; 20+ messages in thread
From: Rodolfo Giometti @ 2024-07-15 9:36 UTC (permalink / raw)
To: Thomas Gleixner, D, Lakshmi Sowjanya, corbet@lwn.net,
linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org
Cc: gregkh@linuxfoundation.org, andriy.shevchenko@linux.intel.com,
Dong, Eddie, Hall, Christopher S, N, Pandith, Mohan, Subramanian,
T R, Thejesh Reddy, Andrew Morton
On 15/07/24 10:06, Thomas Gleixner wrote:
> On Thu, Jul 04 2024 at 13:50, Rodolfo Giometti wrote:
>> On 03/07/24 16:47, D, Lakshmi Sowjanya wrote:
>>>
>>> A gentle reminder for the review of the pps patchset.
>>
>> I already acked these patchset, didn't I? =8-o
>>
>> Please let me know if I missed something.
>
> Sorry, I missed that V10 posting. It's too late now.
>
> Rodolfo, can you pick it up after rc1 for the next merge window. All
> prerequisites should be in Linus tree then.
LinuxPPS has no dedicated tree as other Linux subsystems. Usually I send my
"Acked" to Greg Kroah-Hartman and Andrew Morton, and they push patches by
themselves.
Ciao,
Rodolfo
--
GNU/Linux Solutions e-mail: giometti@enneenne.com
Linux Device Driver giometti@linux.it
Embedded Systems phone: +39 349 2432127
UNIX programming
^ permalink raw reply [flat|nested] 20+ messages in thread
* RE: [PATCH v10 0/3] Add support for Intel PPS Generator
2024-07-15 9:36 ` Rodolfo Giometti
@ 2024-07-24 21:39 ` Hall, Christopher S
2024-07-25 7:05 ` Rodolfo Giometti
0 siblings, 1 reply; 20+ messages in thread
From: Hall, Christopher S @ 2024-07-24 21:39 UTC (permalink / raw)
To: Rodolfo Giometti
Cc: gregkh@linuxfoundation.org, andriy.shevchenko@linux.intel.com,
Thomas Gleixner, Dong, Eddie, N, Pandith, Mohan, Subramanian,
T R, Thejesh Reddy, Andrew Morton, D, Lakshmi Sowjanya,
corbet@lwn.net, linux-kernel@vger.kernel.org,
linux-doc@vger.kernel.org, Zage, David
Hello Rodolfo,
> From: Rodolfo Giometti <giometti@enneenne.com>
> Sent: Monday, July 15, 2024 2:37 AM
> Subject: Re: [PATCH v10 0/3] Add support for Intel PPS Generator
>
> On 15/07/24 10:06, Thomas Gleixner wrote:
> > On Thu, Jul 04 2024 at 13:50, Rodolfo Giometti wrote:
> >> On 03/07/24 16:47, D, Lakshmi Sowjanya wrote:
> >>>
> >>> A gentle reminder for the review of the pps patchset.
> >>
> >> I already acked these patchset, didn't I? =8-o
> >>
> >> Please let me know if I missed something.
> >
> > Sorry, I missed that V10 posting. It's too late now.
> >
> > Rodolfo, can you pick it up after rc1 for the next merge window. All
> > prerequisites should be in Linus tree then.
>
> LinuxPPS has no dedicated tree as other Linux subsystems. Usually I send my
> "Acked" to Greg Kroah-Hartman and Andrew Morton, and they push patches
> by
> themselves.
Is the PPS driver on track to be included in the 6.11 release candidate?
Thanks,
Chris
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v10 0/3] Add support for Intel PPS Generator
2024-07-24 21:39 ` Hall, Christopher S
@ 2024-07-25 7:05 ` Rodolfo Giometti
2024-07-25 7:09 ` gregkh
0 siblings, 1 reply; 20+ messages in thread
From: Rodolfo Giometti @ 2024-07-25 7:05 UTC (permalink / raw)
To: Hall, Christopher S
Cc: gregkh@linuxfoundation.org, andriy.shevchenko@linux.intel.com,
Thomas Gleixner, Dong, Eddie, N, Pandith, Mohan, Subramanian,
T R, Thejesh Reddy, Andrew Morton, D, Lakshmi Sowjanya,
corbet@lwn.net, linux-kernel@vger.kernel.org,
linux-doc@vger.kernel.org, Zage, David
On 24/07/24 23:39, Hall, Christopher S wrote:
> Hello Rodolfo,
>
>> From: Rodolfo Giometti <giometti@enneenne.com>
>> Sent: Monday, July 15, 2024 2:37 AM
>
>> Subject: Re: [PATCH v10 0/3] Add support for Intel PPS Generator
>>
>> On 15/07/24 10:06, Thomas Gleixner wrote:
>>> On Thu, Jul 04 2024 at 13:50, Rodolfo Giometti wrote:
>>>> On 03/07/24 16:47, D, Lakshmi Sowjanya wrote:
>>>>>
>>>>> A gentle reminder for the review of the pps patchset.
>>>>
>>>> I already acked these patchset, didn't I? =8-o
>>>>
>>>> Please let me know if I missed something.
>>>
>>> Sorry, I missed that V10 posting. It's too late now.
>>>
>>> Rodolfo, can you pick it up after rc1 for the next merge window. All
>>> prerequisites should be in Linus tree then.
>>
>> LinuxPPS has no dedicated tree as other Linux subsystems. Usually I send my
>> "Acked" to Greg Kroah-Hartman and Andrew Morton, and they push patches
>> by
>> themselves.
>
> Is the PPS driver on track to be included in the 6.11 release candidate?
I hope so! ^_^"
Unluckily the LinuxPPS is a minor subsystem with no dedicated tree, and
inclusion is not under my control.
Ciao,
Rodolfo
--
GNU/Linux Solutions e-mail: giometti@enneenne.com
Linux Device Driver giometti@linux.it
Embedded Systems phone: +39 349 2432127
UNIX programming
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v10 0/3] Add support for Intel PPS Generator
2024-07-25 7:05 ` Rodolfo Giometti
@ 2024-07-25 7:09 ` gregkh
2024-07-26 11:09 ` Thomas Gleixner
0 siblings, 1 reply; 20+ messages in thread
From: gregkh @ 2024-07-25 7:09 UTC (permalink / raw)
To: Rodolfo Giometti
Cc: Hall, Christopher S, andriy.shevchenko@linux.intel.com,
Thomas Gleixner, Dong, Eddie, N, Pandith, Mohan, Subramanian,
T R, Thejesh Reddy, Andrew Morton, D, Lakshmi Sowjanya,
corbet@lwn.net, linux-kernel@vger.kernel.org,
linux-doc@vger.kernel.org, Zage, David
On Thu, Jul 25, 2024 at 09:05:02AM +0200, Rodolfo Giometti wrote:
> On 24/07/24 23:39, Hall, Christopher S wrote:
> > Hello Rodolfo,
> >
> > > From: Rodolfo Giometti <giometti@enneenne.com>
> > > Sent: Monday, July 15, 2024 2:37 AM
> >
> > > Subject: Re: [PATCH v10 0/3] Add support for Intel PPS Generator
> > >
> > > On 15/07/24 10:06, Thomas Gleixner wrote:
> > > > On Thu, Jul 04 2024 at 13:50, Rodolfo Giometti wrote:
> > > > > On 03/07/24 16:47, D, Lakshmi Sowjanya wrote:
> > > > > >
> > > > > > A gentle reminder for the review of the pps patchset.
> > > > >
> > > > > I already acked these patchset, didn't I? =8-o
> > > > >
> > > > > Please let me know if I missed something.
> > > >
> > > > Sorry, I missed that V10 posting. It's too late now.
> > > >
> > > > Rodolfo, can you pick it up after rc1 for the next merge window. All
> > > > prerequisites should be in Linus tree then.
> > >
> > > LinuxPPS has no dedicated tree as other Linux subsystems. Usually I send my
> > > "Acked" to Greg Kroah-Hartman and Andrew Morton, and they push patches
> > > by
> > > themselves.
> >
> > Is the PPS driver on track to be included in the 6.11 release candidate?
>
> I hope so! ^_^"
Are the patches in linux-next? If so, what tree did they go through?
If not, they can't be merged into 6.11-rc1.
> Unluckily the LinuxPPS is a minor subsystem with no dedicated tree, and
> inclusion is not under my control.
I pick up many "smaller" driver subsystems all the time, I just have to
be asked to do so...
thanks,
greg k-h
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v10 0/3] Add support for Intel PPS Generator
2024-07-25 7:09 ` gregkh
@ 2024-07-26 11:09 ` Thomas Gleixner
0 siblings, 0 replies; 20+ messages in thread
From: Thomas Gleixner @ 2024-07-26 11:09 UTC (permalink / raw)
To: gregkh@linuxfoundation.org, Rodolfo Giometti
Cc: Hall, Christopher S, andriy.shevchenko@linux.intel.com,
Dong, Eddie, N, Pandith, Mohan, Subramanian, T R, Thejesh Reddy,
Andrew Morton, D, Lakshmi Sowjanya, corbet@lwn.net,
linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
Zage, David
On Thu, Jul 25 2024 at 09:09, gregkh@linuxfoundation.org wrote:
> Are the patches in linux-next? If so, what tree did they go through?
> If not, they can't be merged into 6.11-rc1.
Sorry, I missed that last submission.
It has dependencies on the timers/core branch which got merged into
mainline in the current merge window. So if someone could have picked it
up that would have been me.
It's unfortunately too late now, so this can be picked up for 6.12 by
anyone without dependencies.
Thanks,
tglx
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v10 0/3] Add support for Intel PPS Generator
2024-06-12 3:53 [PATCH v10 0/3] Add support for Intel PPS Generator lakshmi.sowjanya.d
` (3 preceding siblings ...)
2024-07-03 14:47 ` [PATCH v10 0/3] Add support for Intel PPS Generator D, Lakshmi Sowjanya
@ 2024-08-13 8:15 ` Greg KH
2024-08-14 4:36 ` Mohan, Subramanian
2024-08-13 8:25 ` Greg KH
5 siblings, 1 reply; 20+ messages in thread
From: Greg KH @ 2024-08-13 8:15 UTC (permalink / raw)
To: lakshmi.sowjanya.d
Cc: tglx, giometti, corbet, linux-kernel, linux-doc,
andriy.shevchenko, eddie.dong, christopher.s.hall, pandith.n,
subramanian.mohan, thejesh.reddy.t.r
On Wed, Jun 12, 2024 at 09:23:56AM +0530, lakshmi.sowjanya.d@intel.com wrote:
> From: Lakshmi Sowjanya D <lakshmi.sowjanya.d@intel.com>
>
> The goal of the PPS (Pulse Per Second) hardware/software is to generate a
> signal from the system on a wire so that some third-party hardware can
> observe that signal and judge how close the system's time is to another
> system or piece of hardware.
>
> Existing methods (like parallel ports) require software to flip a bit at
> just the right time to create a PPS signal. Many things can prevent
> software from doing this precisely. This (Timed I/O) method is better
> because software only "arms" the hardware in advance and then depends on
> the hardware to "fire" and flip the signal at just the right time.
>
> To generate a PPS signal with this new hardware, the kernel wakes up
> twice a second, once for 1->0 edge and other for the 0->1 edge. It does
> this shortly (~10ms) before the actual change in the signal needs to be
> made. It computes the TSC value at which edge will happen, convert to a
> value hardware understands and program this value to Timed I/O hardware.
> The actual edge transition happens without any further action from the
> kernel.
>
> The result here is a signal coming out of the system that is roughly
> 1,000 times more accurate than the old methods. If the system is heavily
> loaded, the difference in accuracy is larger in old methods.
>
> Application Interface:
> The API to use Timed I/O is very simple. It is enabled and disabled by
> writing a '1' or '0' value to the sysfs enable attribute associated with
> the Timed I/O PPS device. Each Timed I/O pin is represented by a PPS
> device. When enabled, a pulse-per-second (PPS) synchronized with the
> system clock is continuously produced on the Timed I/O pin, otherwise it
> is pulled low.
>
> The Timed I/O signal on the motherboard is enabled in the BIOS setup.
> Intel Advanced Menu -> PCH IO Configuration -> Timed I/O <Enable>
>
> References:
> https://en.wikipedia.org/wiki/Pulse-per-second_signal
> https://drive.google.com/file/d/1vkBRRDuELmY8I3FlfOZaEBp-DxLW6t_V/view
> https://youtu.be/JLUTT-lrDqw
>
> Patch 1 adds the pps(pulse per second) generator tio driver to the pps
> subsystem.
> Patch 2 documentation and usage of the pps tio generator module.
> Patch 3 includes documentation for sysfs interface.
>
> These patches are based on the timers/core branch:
> [1] https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/?h=timers/core
> These changes are dependent on patches that are merged in [1].
This series now breaks the build due to api changes in 6.11-rc1. Please
fix up and resend.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v10 0/3] Add support for Intel PPS Generator
2024-06-12 3:53 [PATCH v10 0/3] Add support for Intel PPS Generator lakshmi.sowjanya.d
` (4 preceding siblings ...)
2024-08-13 8:15 ` Greg KH
@ 2024-08-13 8:25 ` Greg KH
5 siblings, 0 replies; 20+ messages in thread
From: Greg KH @ 2024-08-13 8:25 UTC (permalink / raw)
To: lakshmi.sowjanya.d
Cc: tglx, giometti, corbet, linux-kernel, linux-doc,
andriy.shevchenko, eddie.dong, christopher.s.hall, pandith.n,
subramanian.mohan, thejesh.reddy.t.r
On Wed, Jun 12, 2024 at 09:23:56AM +0530, lakshmi.sowjanya.d@intel.com wrote:
> From: Lakshmi Sowjanya D <lakshmi.sowjanya.d@intel.com>
Note, this email address is now bouncing, so that's not a good
recomendation for accepting a patch series :(
sorry,
greg k-h
^ permalink raw reply [flat|nested] 20+ messages in thread
* RE: [PATCH v10 0/3] Add support for Intel PPS Generator
2024-08-13 8:15 ` Greg KH
@ 2024-08-14 4:36 ` Mohan, Subramanian
0 siblings, 0 replies; 20+ messages in thread
From: Mohan, Subramanian @ 2024-08-14 4:36 UTC (permalink / raw)
To: Greg KH
Cc: tglx@linutronix.de, giometti@enneenne.com, corbet@lwn.net,
linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
andriy.shevchenko@linux.intel.com, Dong, Eddie,
Hall, Christopher S, N, Pandith, T R, Thejesh Reddy
Hi Greg,
> -----Original Message-----
> From: Greg KH <gregkh@linuxfoundation.org>
> Sent: Tuesday, August 13, 2024 1:46 PM
> To: lakshmi.sowjanya.d@intel.com
> Cc: tglx@linutronix.de; giometti@enneenne.com; corbet@lwn.net; linux-
> kernel@vger.kernel.org; linux-doc@vger.kernel.org;
> andriy.shevchenko@linux.intel.com; Dong, Eddie <eddie.dong@intel.com>;
> Hall, Christopher S <christopher.s.hall@intel.com>; N, Pandith
> <pandith.n@intel.com>; Mohan, Subramanian
> <subramanian.mohan@intel.com>; T R, Thejesh Reddy
> <thejesh.reddy.t.r@intel.com>
> Subject: Re: [PATCH v10 0/3] Add support for Intel PPS Generator
>
> On Wed, Jun 12, 2024 at 09:23:56AM +0530, lakshmi.sowjanya.d@intel.com
> wrote:
> > From: Lakshmi Sowjanya D <lakshmi.sowjanya.d@intel.com>
> >
> > The goal of the PPS (Pulse Per Second) hardware/software is to
> > generate a signal from the system on a wire so that some third-party
> > hardware can observe that signal and judge how close the system's time
> > is to another system or piece of hardware.
> >
> > Existing methods (like parallel ports) require software to flip a bit
> > at just the right time to create a PPS signal. Many things can prevent
> > software from doing this precisely. This (Timed I/O) method is better
> > because software only "arms" the hardware in advance and then depends
> > on the hardware to "fire" and flip the signal at just the right time.
> >
> > To generate a PPS signal with this new hardware, the kernel wakes up
> > twice a second, once for 1->0 edge and other for the 0->1 edge. It
> > does this shortly (~10ms) before the actual change in the signal needs
> > to be made. It computes the TSC value at which edge will happen,
> > convert to a value hardware understands and program this value to Timed
> I/O hardware.
> > The actual edge transition happens without any further action from the
> > kernel.
> >
> > The result here is a signal coming out of the system that is roughly
> > 1,000 times more accurate than the old methods. If the system is
> > heavily loaded, the difference in accuracy is larger in old methods.
> >
> > Application Interface:
> > The API to use Timed I/O is very simple. It is enabled and disabled by
> > writing a '1' or '0' value to the sysfs enable attribute associated
> > with the Timed I/O PPS device. Each Timed I/O pin is represented by a
> > PPS device. When enabled, a pulse-per-second (PPS) synchronized with
> > the system clock is continuously produced on the Timed I/O pin,
> > otherwise it is pulled low.
> >
> > The Timed I/O signal on the motherboard is enabled in the BIOS setup.
> > Intel Advanced Menu -> PCH IO Configuration -> Timed I/O <Enable>
> >
> > References:
> > https://en.wikipedia.org/wiki/Pulse-per-second_signal
> > https://drive.google.com/file/d/1vkBRRDuELmY8I3FlfOZaEBp-
> DxLW6t_V/view
> > https://youtu.be/JLUTT-lrDqw
> >
> > Patch 1 adds the pps(pulse per second) generator tio driver to the pps
> > subsystem.
> > Patch 2 documentation and usage of the pps tio generator module.
> > Patch 3 includes documentation for sysfs interface.
> >
> > These patches are based on the timers/core branch:
> > [1]
> > https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/?h=timers/
> > core These changes are dependent on patches that are merged in [1].
>
> This series now breaks the build due to api changes in 6.11-rc1. Please fix up
> and resend.
Ok, will fix up the API changes and resend the patch series.
> thanks,
>
> greg k-h
Thanks,
Subbu
^ permalink raw reply [flat|nested] 20+ messages in thread
end of thread, other threads:[~2024-08-14 4:36 UTC | newest]
Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-12 3:53 [PATCH v10 0/3] Add support for Intel PPS Generator lakshmi.sowjanya.d
2024-06-12 3:53 ` [PATCH v10 1/3] pps: generators: Add PPS Generator TIO Driver lakshmi.sowjanya.d
2024-06-12 3:53 ` [PATCH v10 2/3] Documentation: driver-api: pps: Add Intel Timed I/O PPS generator lakshmi.sowjanya.d
2024-06-12 8:02 ` Greg KH
2024-06-12 8:03 ` Greg KH
2024-06-12 3:53 ` [PATCH v10 3/3] ABI: pps: Add ABI documentation for Intel TIO lakshmi.sowjanya.d
2024-06-12 4:29 ` Randy Dunlap
2024-06-12 6:57 ` Rodolfo Giometti
2024-06-12 15:08 ` Randy Dunlap
2024-07-03 14:47 ` [PATCH v10 0/3] Add support for Intel PPS Generator D, Lakshmi Sowjanya
2024-07-04 11:50 ` Rodolfo Giometti
2024-07-15 8:06 ` Thomas Gleixner
2024-07-15 9:36 ` Rodolfo Giometti
2024-07-24 21:39 ` Hall, Christopher S
2024-07-25 7:05 ` Rodolfo Giometti
2024-07-25 7:09 ` gregkh
2024-07-26 11:09 ` Thomas Gleixner
2024-08-13 8:15 ` Greg KH
2024-08-14 4:36 ` Mohan, Subramanian
2024-08-13 8:25 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).