• Jacob Keller's avatar
    ixgbe: convert .adjfreq to .adjfine · 5a554232
    Jacob Keller authored
    Convert the ixgbe PTP frequency adjustment implementations from .adjfreq to
    .adjfine. This allows using the scaled parts per million adjustment from
    the PTP core and results in a more precise adjustment for small
    corrections.
    
    To avoid overflow, use mul_u64_u64_div_u64 to perform the calculation. On
    X86 platforms, this will use instructions that perform the operations with
    128bit intermediate values. For other architectures, the implementation
    will limit the loss of precision as much as possible.
    
    This change slightly improves the precision of frequency adjustments for
    all ixgbe based devices, and gets us one driver closer to being able to
    remove the older .adjfreq implementation from the kernel.
    Signed-off-by: default avatarJacob Keller <jacob.e.keller@intel.com>
    Tested-by: Gurucharan <gurucharanx.g@intel.com> (A Contingent worker at Intel)
    Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
    5a554232
ixgbe_ptp.c 48.3 KB