summaryrefslogtreecommitdiff
path: root/drivers/pps/generators/pps_gen_tio.c
AgeCommit message (Collapse)Author
2025-04-15pps: generators: tio: fix platform_set_drvdata()Raag Jadav
platform_set_drvdata() is setting a double pointer to struct pps_tio as driver_data, which will point to the local stack of probe function instead of intended data. Set driver_data correctly and fix illegal memory access by its user. BUG: unable to handle page fault for address: ffffc9000117b738 RIP: 0010:hrtimer_active+0x2b/0x60 Call Trace: ? hrtimer_active+0x2b/0x60 hrtimer_cancel+0x19/0x50 pps_gen_tio_remove+0x1e/0x80 [pps_gen_tio] Fixes: c89755d1111f ("pps: generators: Add PPS Generator TIO Driver") Signed-off-by: Raag Jadav <raag.jadav@intel.com> Acked-by: Rodolfo Giometti <giometti@enneenne.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20250318114038.2058677-1-raag.jadav@intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-04-05treewide: Convert new and leftover hrtimer_init() usersThomas Gleixner
hrtimer_setup() takes the callback function pointer as argument and initializes the timer completely. Replace hrtimer_init() and the open coded initialization of hrtimer::function with the new setup mechanism. Coccinelle scripted cleanup. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@kernel.org>
2025-02-21pps: generators: Add PPS Generator TIO DriverSubramanian Mohan
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> Signed-off-by: Subramanian Mohan <subramanian.mohan@intel.com> Link: https://lore.kernel.org/r/20250219040618.70962-3-subramanian.mohan@intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>