Kernel PPS processing

Gary E. Miller gem at
Tue Jul 5 19:45:29 UTC 2016

Yo Hal!

On Tue, 05 Jul 2016 12:19:18 -0700
Hal Murray <hmurray at> wrote:

> gem at said:
> > The big thing for NTP and gpsd would be the 64 bit math.  Both do a
> > lot of 64 bit math.   
> You can do 64 bit arithmetic without using 64 bit pointers.

Yes, Linux on Intel can have a 64 bit kernel, and run 32 bit binaries.

But it only just recently implemented.

I suspect ARM would also need a 64 bit kernel to support 32 bit pointers
and 64 bit arithmetic.

> Somebody mentioned that the plan is have one boot file that runs on
> all Raspberry Pis.

And more CPUs than just Pi's.  The trick is to get all the magic
constants into the device tree files.  Not done yet, but in progress.

Linux on Intel can also run a lesat common denominator kernel and then
load the needed modules for extra features.  Gentoo shows that
compiling for the current CPU can speed things up nicely, so I always go
custom kernel.  Just going from loadable modules to built-in make a
nice speed difference.

> Are things setup so that user code builds that
> way too?

Nope.  The NEON and SIMD differ between ARM CPUs.  And other details
like the Trustwave stuff, etc.  So most ARM code is either least
common denominator, or for those lucky enough to have a source
distro: compiled for the current CPU.

So my Gentoo get better performance on the Pi3 than Debian.

  If so, it might take a magic option to the compiler to get
> it to use the 64 bit instructions.

Plus a 64 bit kernel.  A 32 bit kernel does not know how to save and
restore 64 bit registers, or even know how many registers there are.

Linux never figured out 64 bit binaries on a 32 bit kernel, although
it was tried.  Unlikely ARM ever will.

Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
	gem at  Tel:+1 541 382 8588
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the devel mailing list