tree:
https://github.com/intel/linux-intel-lts.git 5.4/yocto
head: 1fb75387e725710ca9427292c43d24d34397e1c2
commit: 23eaaf813799b52b3df39373c4c82d81a0988816 [14766/15157] igc: Add support for PTP
getcrosststamp()
config: x86_64-randconfig-s021-20210312 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-262-g5e674421-dirty
#
https://github.com/intel/linux-intel-lts/commit/23eaaf813799b52b3df39373c...
git remote add intel-linux-intel-lts
https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-linux-intel-lts 5.4/yocto
git checkout 23eaaf813799b52b3df39373c4c82d81a0988816
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
"sparse warnings: (new ones prefixed by >>)"
> drivers/net/ethernet/intel/igc/igc_ptp.c:457:21: sparse: sparse:
cast to restricted __be32
> drivers/net/ethernet/intel/igc/igc_ptp.c:457:21: sparse: sparse: cast to restricted
__be32
> drivers/net/ethernet/intel/igc/igc_ptp.c:457:21: sparse: sparse: cast to restricted
__be32
> drivers/net/ethernet/intel/igc/igc_ptp.c:457:21: sparse: sparse: cast to restricted
__be32
> drivers/net/ethernet/intel/igc/igc_ptp.c:457:21: sparse: sparse: cast to restricted
__be32
> drivers/net/ethernet/intel/igc/igc_ptp.c:457:21: sparse: sparse: cast to restricted
__be32
vim +457 drivers/net/ethernet/intel/igc/igc_ptp.c
441
442 static void igc_ptm_gather_report(struct igc_adapter *adapter)
443 {
444 struct igc_hw *hw = &adapter->hw;
445 u32 t2_curr_h, t2_curr_l;
446 ktime_t t1, t2_curr;
447
448 t1 = ktime_set(rd32(IGC_PTM_T1_TIM0_H),
449 rd32(IGC_PTM_T1_TIM0_L));
450
451 t2_curr_l = rd32(IGC_PTM_CURR_T2_L);
452 t2_curr_h = rd32(IGC_PTM_CURR_T2_H);
453
454 /* FIXME: There's an ambiguity on what endianness some PCIe PTM
455 * messages should use. Find a more robust way to handle this.
456 */
457 t2_curr_h = be32_to_cpu(t2_curr_h);
458
459 t2_curr = ((s64)t2_curr_h << 32 | t2_curr_l);
460
461 wr32(IGC_PTM_STAT, IGC_PTM_STAT_VALID);
462
463 mutex_lock(&adapter->ptm_time_lock);
464
465 /* Because get_device_system_crosststamp() requires that the
466 * historic timestamp is before the PTM device/host
467 * timestamps, we keep track of the current and previous
468 * snapshot (historic timestamp).
469 */
470 memcpy(&adapter->prev_snapshot,
471 &adapter->curr_snapshot, sizeof(adapter->prev_snapshot));
472 ktime_get_snapshot(&adapter->curr_snapshot);
473
474 adapter->ptm_device_time = t1;
475 adapter->ptm_host_time = igc_device_tstamp_to_system(t2_curr);
476 mutex_unlock(&adapter->ptm_time_lock);
477
478 mod_delayed_work(system_wq, &adapter->ptm_report,
479 msecs_to_jiffies(IGC_PTM_CYCLE_TIME_MSECS));
480 }
481
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org