Skip to content

pps: several fixes and improvements

Alexander Gordeev lkml 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest16 patches 11 repliesIn review
  2. v517 patches 15 repliesSuperseded
  3. v417 patches 32 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v316 patches25 repliesSuperseded

Changes in v6 from the cover letter

* drop patch that fixes a race condition in tty code because it's already fixed in 2.6.37-rc2
* fix getnstime_raw_and_real() comments (thanks Thomas Gleixner for the note)

Patches in v6 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/16pps: trivial fixesdrivers/pps/kapi.c include/linux/pps_kernel.h+7 -20 replies
2/16pps: declare variables where they are used in switchdrivers/pps/pps.c+6 -40 replies
3/16pps: fix race in PPS_FETCH handlerdrivers/pps/kapi.c drivers/pps/pps.c include/linux/pps_kernel.h+10 -60 replies
4/16pps: unify timestamp gatheringdrivers/pps/clients/pps-ktimer.c drivers/pps/clients/pps-ldisc.c drivers/pps/kapi.c +3 more+44 -310 replies
5/16pps: access pps device by direct pointerdrivers/pps/clients/pps-ktimer.c drivers/pps/clients/pps-ldisc.c drivers/pps/kapi.c +2 more+82 -1580 replies
6/16pps: convert printk/pr_* to dev_*drivers/pps/clients/pps-ktimer.c drivers/pps/clients/pps-ldisc.c drivers/pps/kapi.c +1 more+26 -210 replies
7/16pps: move idr stuff to pps.cdrivers/pps/kapi.c drivers/pps/pps.c+52 -543 replies
8/16pps: do not disable interrupts for idr operationsdrivers/pps/pps.c+6 -60 replies
9/16pps: use BUG_ON for kernel API safety checksdrivers/pps/kapi.c+2 -40 replies
10/16pps: simplify conditions a bitdrivers/pps/kapi.c+2 -40 replies
11/16pps: timestamp is always passed to dcd_change()Documentation/serial/tty.txt drivers/pps/clients/pps-ldisc.c include/linux/tty_ldisc.h+2 -100 replies
12/16ntp: add hardpps implementationdrivers/pps/Kconfig include/linux/timex.h kernel/time/ntp.c+418 -150 replies
13/16pps: capture MONOTONIC_RAW timestamps as wellinclude/linux/pps_kernel.h include/linux/time.h kernel/time/timekeeping.c+43 -10 replies
14/16pps: add kernel consumer supportDocumentation/ioctl/ioctl-number.txt drivers/pps/Kconfig drivers/pps/kapi.c +3 more+103 -20 replies
15/16pps: add parallel port PPS clientdrivers/pps/clients/Kconfig drivers/pps/clients/Makefile drivers/pps/clients/pps_parport.c+255 -03 replies
16/16pps: add parallel port PPS signal generatorDocumentation/pps/pps.txt drivers/pps/Kconfig drivers/pps/Makefile +3 more+350 -12 replies

Reviews trailers per patch

All 16 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchRodolfo GiomettiJohn Stultz
SeriesA-b A-b A-b A-b
1/16A-b
2/16A-b
3/16A-b
4/16A-b
5/16A-b
6/16A-b
7/16A-b
8/16A-b
9/16A-b
10/16A-b
11/16A-b
12/16A-b
13/16A-b
14/16A-b
15/16A-b
16/16A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v6 thread

Cover letter [PATCHv6 00/16] pps: several fixes and improvements

This patchset contains several changes that improve an overall design/performance of PPS subsystem. I'd like these patches to be merged mainline if no one objects.

Patches 1-3 are bugfixes.
Patches 4-11 are other improvements to PPS subsystem. Patches 12-14 add kernel consumer support. Patch 15 adds parallel port PPS client.
Patch 16 adds parallel port PPS generator.

You can find description for my previous patchset (it describes patches 12-16 in more detail) here: http://lkml.org/lkml/2010/2/24/189

This patchset is tested against the vanilla 2.6.37-rc6 kernel. But we are actually using it on 2.6.33.7-rt29 rt-preempt kernel most of the time. Those who are interested in other versions of the patchset can find them in my git repository:
git://github.com/ago/linux-2.6.git

There is one problem however: kernel consumer works bad (if enabled) when CONFIG_NO_HZ is enabled. The reason for this is commit a092ff0f90cae22b2ac8028ecd2c6f6c1a9e4601. Without it hardpps() is able to sync to 1us precision in about 10 seconds. With CONFIG_NO_HZ it is not syncing at all. This only affects patches 12-14, others are ok.

Changelog
v5 -> v6:
* drop patch that fixes a race condition in tty code because it's already fixed in 2.6.37-rc2
* fix getnstime_raw_and_real() comments (thanks Thomas Gleixner for the note)

Alexander Gordeev (16):
pps: trivial fixes
pps: declare variables where they are used in switch
pps: fix race in PPS_FETCH handler
pps: unify timestamp gathering
pps: access pps device by direct pointer
pps: convert printk/pr_* to dev_*
pps: move idr stuff to pps.c
pps: do not disable interrupts for idr operations
pps: use BUG_ON for kernel API safety checks
pps: simplify conditions a bit
pps: timestamp is always passed to dcd_change()
ntp: add hardpps implementation
pps: capture MONOTONIC_RAW timestamps as well
pps: add kernel consumer support
pps: add parallel port PPS client
pps: add parallel port PPS signal generator

 Documentation/ioctl/ioctl-number.txt     |    2 +-
 Documentation/pps/pps.txt                |   46 ++++
 Documentation/serial/tty.txt             |    2 +-
 drivers/pps/Kconfig                      |   10 +
 drivers/pps/Makefile                     |    2 +-
 drivers/pps/clients/Kconfig              |    7 +
 drivers/pps/clients/Makefile             |    1 +
 drivers/pps/clients/pps-ktimer.c         |   44 ++--
 drivers/pps/clients/pps-ldisc.c          |   59 ++--
 drivers/pps/clients/pps_parport.c        |  247 +++++++++++++++++
 drivers/pps/generators/Kconfig           |   17 ++
 drivers/pps/generators/Makefile          |    9 +
 drivers/pps/generators/pps_gen_parport.c |  275 +++++++++++++++++++
 drivers/pps/kapi.c                       |  221 +++++-----------
 drivers/pps/pps.c                        |  177 ++++++++++---
 include/linux/pps.h                      |    7 +
 include/linux/pps_kernel.h               |   54 +++-
 include/linux/serial_core.h              |    5 +-
 include/linux/time.h                     |    2 +
 include/linux/timex.h                    |    1 +
 include/linux/tty_ldisc.h                |    7 +-
 kernel/time/ntp.c                        |  425 ++++++++++++++++++++++++++++-
 kernel/time/timekeeping.c                |   39 +++
 23 files changed, 1374 insertions(+), 285 deletions(-)
 create mode 100644 drivers/pps/clients/pps_parport.c
 create mode 100644 drivers/pps/generators/Kconfig
 create mode 100644 drivers/pps/generators/Makefile
 create mode 100644 drivers/pps/generators/pps_gen_parport.c
Signature · 1 line
1.7.2.3