diff options
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/net/ethernet/sfc/ptp.c | 16 | ||||
| -rw-r--r-- | drivers/pps/kapi.c | 4 | ||||
| -rw-r--r-- | drivers/pps/kc.c | 4 |
3 files changed, 11 insertions, 13 deletions
diff --git a/drivers/net/ethernet/sfc/ptp.c b/drivers/net/ethernet/sfc/ptp.c index ad62615a93dc..fe849dbf9f80 100644 --- a/drivers/net/ethernet/sfc/ptp.c +++ b/drivers/net/ethernet/sfc/ptp.c | |||
| @@ -646,28 +646,28 @@ static void efx_ptp_send_times(struct efx_nic *efx, | |||
| 646 | struct pps_event_time *last_time) | 646 | struct pps_event_time *last_time) |
| 647 | { | 647 | { |
| 648 | struct pps_event_time now; | 648 | struct pps_event_time now; |
| 649 | struct timespec limit; | 649 | struct timespec64 limit; |
| 650 | struct efx_ptp_data *ptp = efx->ptp_data; | 650 | struct efx_ptp_data *ptp = efx->ptp_data; |
| 651 | struct timespec start; | 651 | struct timespec64 start; |
| 652 | int *mc_running = ptp->start.addr; | 652 | int *mc_running = ptp->start.addr; |
| 653 | 653 | ||
| 654 | pps_get_ts(&now); | 654 | pps_get_ts(&now); |
| 655 | start = now.ts_real; | 655 | start = now.ts_real; |
| 656 | limit = now.ts_real; | 656 | limit = now.ts_real; |
| 657 | timespec_add_ns(&limit, SYNCHRONISE_PERIOD_NS); | 657 | timespec64_add_ns(&limit, SYNCHRONISE_PERIOD_NS); |
| 658 | 658 | ||
| 659 | /* Write host time for specified period or until MC is done */ | 659 | /* Write host time for specified period or until MC is done */ |
| 660 | while ((timespec_compare(&now.ts_real, &limit) < 0) && | 660 | while ((timespec64_compare(&now.ts_real, &limit) < 0) && |
| 661 | ACCESS_ONCE(*mc_running)) { | 661 | ACCESS_ONCE(*mc_running)) { |
| 662 | struct timespec update_time; | 662 | struct timespec64 update_time; |
| 663 | unsigned int host_time; | 663 | unsigned int host_time; |
| 664 | 664 | ||
| 665 | /* Don't update continuously to avoid saturating the PCIe bus */ | 665 | /* Don't update continuously to avoid saturating the PCIe bus */ |
| 666 | update_time = now.ts_real; | 666 | update_time = now.ts_real; |
| 667 | timespec_add_ns(&update_time, SYNCHRONISATION_GRANULARITY_NS); | 667 | timespec64_add_ns(&update_time, SYNCHRONISATION_GRANULARITY_NS); |
| 668 | do { | 668 | do { |
| 669 | pps_get_ts(&now); | 669 | pps_get_ts(&now); |
| 670 | } while ((timespec_compare(&now.ts_real, &update_time) < 0) && | 670 | } while ((timespec64_compare(&now.ts_real, &update_time) < 0) && |
| 671 | ACCESS_ONCE(*mc_running)); | 671 | ACCESS_ONCE(*mc_running)); |
| 672 | 672 | ||
| 673 | /* Synchronise NIC with single word of time only */ | 673 | /* Synchronise NIC with single word of time only */ |
| @@ -723,7 +723,7 @@ efx_ptp_process_times(struct efx_nic *efx, MCDI_DECLARE_STRUCT_PTR(synch_buf), | |||
| 723 | struct efx_ptp_data *ptp = efx->ptp_data; | 723 | struct efx_ptp_data *ptp = efx->ptp_data; |
| 724 | u32 last_sec; | 724 | u32 last_sec; |
| 725 | u32 start_sec; | 725 | u32 start_sec; |
| 726 | struct timespec delta; | 726 | struct timespec64 delta; |
| 727 | ktime_t mc_time; | 727 | ktime_t mc_time; |
| 728 | 728 | ||
| 729 | if (number_readings == 0) | 729 | if (number_readings == 0) |
diff --git a/drivers/pps/kapi.c b/drivers/pps/kapi.c index cdad4d95b20e..805c749ac1ad 100644 --- a/drivers/pps/kapi.c +++ b/drivers/pps/kapi.c | |||
| @@ -179,8 +179,8 @@ void pps_event(struct pps_device *pps, struct pps_event_time *ts, int event, | |||
| 179 | /* check event type */ | 179 | /* check event type */ |
| 180 | BUG_ON((event & (PPS_CAPTUREASSERT | PPS_CAPTURECLEAR)) == 0); | 180 | BUG_ON((event & (PPS_CAPTUREASSERT | PPS_CAPTURECLEAR)) == 0); |
| 181 | 181 | ||
| 182 | dev_dbg(pps->dev, "PPS event at %ld.%09ld\n", | 182 | dev_dbg(pps->dev, "PPS event at %lld.%09ld\n", |
| 183 | ts->ts_real.tv_sec, ts->ts_real.tv_nsec); | 183 | (s64)ts->ts_real.tv_sec, ts->ts_real.tv_nsec); |
| 184 | 184 | ||
| 185 | timespec_to_pps_ktime(&ts_real, ts->ts_real); | 185 | timespec_to_pps_ktime(&ts_real, ts->ts_real); |
| 186 | 186 | ||
diff --git a/drivers/pps/kc.c b/drivers/pps/kc.c index a16cea2ba980..e219db1f1c84 100644 --- a/drivers/pps/kc.c +++ b/drivers/pps/kc.c | |||
| @@ -113,12 +113,10 @@ void pps_kc_event(struct pps_device *pps, struct pps_event_time *ts, | |||
| 113 | int event) | 113 | int event) |
| 114 | { | 114 | { |
| 115 | unsigned long flags; | 115 | unsigned long flags; |
| 116 | struct timespec64 real = timespec_to_timespec64(ts->ts_real); | ||
| 117 | struct timespec64 raw = timespec_to_timespec64(ts->ts_raw); | ||
| 118 | 116 | ||
| 119 | /* Pass some events to kernel consumer if activated */ | 117 | /* Pass some events to kernel consumer if activated */ |
| 120 | spin_lock_irqsave(&pps_kc_hardpps_lock, flags); | 118 | spin_lock_irqsave(&pps_kc_hardpps_lock, flags); |
| 121 | if (pps == pps_kc_hardpps_dev && event & pps_kc_hardpps_mode) | 119 | if (pps == pps_kc_hardpps_dev && event & pps_kc_hardpps_mode) |
| 122 | hardpps(&real, &raw); | 120 | hardpps(&ts->ts_real, &ts->ts_raw); |
| 123 | spin_unlock_irqrestore(&pps_kc_hardpps_lock, flags); | 121 | spin_unlock_irqrestore(&pps_kc_hardpps_lock, flags); |
| 124 | } | 122 | } |
