All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-next:master 7380/8516] drivers/net/ethernet/intel/igc/igc_main.c:4994: undefined reference to `ptp_clock_event'
@ 2021-08-18  6:44 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-08-18  6:44 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: kbuild-all, Linux Memory Management List, Jakub Kicinski,
	Vladimir Oltean

[-- Attachment #1: Type: text/plain, Size: 12076 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   9803fb968c8c2e1283f67b3baeb88e0adba435b4
commit: e5f31552674e88bff3a4e3ca3e5357668b5f2973 [7380/8516] ethernet: fix PTP_1588_CLOCK dependencies
config: x86_64-randconfig-s021-20210817 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.3-348-gf0e6938b-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=e5f31552674e88bff3a4e3ca3e5357668b5f2973
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout e5f31552674e88bff3a4e3ca3e5357668b5f2973
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=x86_64 SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_resume_worker':
   drivers/gpu/drm/drm_fb_helper.c:370: undefined reference to `fb_set_suspend'
   ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_fini':
   drivers/gpu/drm/drm_fb_helper.c:634: undefined reference to `framebuffer_release'
   ld: drivers/gpu/drm/drm_fb_helper.c:633: undefined reference to `fb_dealloc_cmap'
   ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_sys_write':
   drivers/gpu/drm/drm_fb_helper.c:746: undefined reference to `fb_sys_write'
   ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_sys_fillrect':
   drivers/gpu/drm/drm_fb_helper.c:764: undefined reference to `sys_fillrect'
   ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_sys_copyarea':
   drivers/gpu/drm/drm_fb_helper.c:779: undefined reference to `sys_copyarea'
   ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_sys_imageblit':
   drivers/gpu/drm/drm_fb_helper.c:794: undefined reference to `sys_imageblit'
   ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_cfb_fillrect':
   drivers/gpu/drm/drm_fb_helper.c:809: undefined reference to `cfb_fillrect'
   ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_cfb_copyarea':
   drivers/gpu/drm/drm_fb_helper.c:824: undefined reference to `cfb_copyarea'
   ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_cfb_imageblit':
   drivers/gpu/drm/drm_fb_helper.c:839: undefined reference to `cfb_imageblit'
   ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_set_suspend_unlocked':
   drivers/gpu/drm/drm_fb_helper.c:901: undefined reference to `fb_set_suspend'
   ld: drivers/gpu/drm/drm_fb_helper.o: in function `__drm_fb_helper_initial_config_and_unlock':
   drivers/gpu/drm/drm_fb_helper.c:1855: undefined reference to `register_framebuffer'
   ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fbdev_cleanup':
   drivers/gpu/drm/drm_fb_helper.c:2042: undefined reference to `fb_deferred_io_cleanup'
   ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_alloc_fbi':
   drivers/gpu/drm/drm_fb_helper.c:559: undefined reference to `framebuffer_alloc'
   ld: drivers/gpu/drm/drm_fb_helper.c:563: undefined reference to `fb_alloc_cmap'
   ld: drivers/gpu/drm/drm_fb_helper.c:589: undefined reference to `framebuffer_release'
   ld: drivers/gpu/drm/drm_fb_helper.c:587: undefined reference to `fb_dealloc_cmap'
   ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_generic_probe':
   drivers/gpu/drm/drm_fb_helper.c:2347: undefined reference to `fb_deferred_io_init'
   ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_set_suspend':
   drivers/gpu/drm/drm_fb_helper.c:856: undefined reference to `fb_set_suspend'
   ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_unregister_fbi':
   drivers/gpu/drm/drm_fb_helper.c:605: undefined reference to `unregister_framebuffer'
   ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_sys_read':
   drivers/gpu/drm/drm_fb_helper.c:728: undefined reference to `fb_sys_read'
   ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_unregister_fbi':
   drivers/gpu/drm/drm_fb_helper.c:605: undefined reference to `unregister_framebuffer'
   ld: drivers/net/ethernet/intel/igc/igc_main.o: in function `igc_tsync_interrupt':
>> drivers/net/ethernet/intel/igc/igc_main.c:4994: undefined reference to `ptp_clock_event'
>> ld: drivers/net/ethernet/intel/igc/igc_main.c:5048: undefined reference to `ptp_clock_event'
   ld: drivers/net/ethernet/intel/igc/igc_main.c:5038: undefined reference to `ptp_clock_event'
   ld: drivers/net/ethernet/intel/igc/igc_ethtool.o: in function `igc_ethtool_get_ts_info':
>> drivers/net/ethernet/intel/igc/igc_ethtool.c:1513: undefined reference to `ptp_clock_index'
   ld: drivers/net/ethernet/intel/igc/igc_ptp.o: in function `igc_ptp_feature_enable_i225':
>> drivers/net/ethernet/intel/igc/igc_ptp.c:303: undefined reference to `ptp_find_pin'
>> ld: drivers/net/ethernet/intel/igc/igc_ptp.c:269: undefined reference to `ptp_find_pin'
   ld: drivers/net/ethernet/intel/igc/igc_ptp.o: in function `igc_ptp_init':
>> drivers/net/ethernet/intel/igc/igc_ptp.c:806: undefined reference to `ptp_clock_register'
   ld: drivers/net/ethernet/intel/igc/igc_ptp.o: in function `igc_ptp_stop':
>> drivers/net/ethernet/intel/igc/igc_ptp.c:866: undefined reference to `ptp_clock_unregister'


vim +4994 drivers/net/ethernet/intel/igc/igc_main.c

3df25e4c1e66a6 Sasha Neftin         2018-10-11  4980  
2c344ae2450155 Vinicius Costa Gomes 2019-12-02  4981  static void igc_tsync_interrupt(struct igc_adapter *adapter)
2c344ae2450155 Vinicius Costa Gomes 2019-12-02  4982  {
87938851b6efb6 Ederson de Souza     2021-02-18  4983  	u32 ack, tsauxc, sec, nsec, tsicr;
2c344ae2450155 Vinicius Costa Gomes 2019-12-02  4984  	struct igc_hw *hw = &adapter->hw;
64433e5bf40abf Ederson de Souza     2021-02-18  4985  	struct ptp_clock_event event;
87938851b6efb6 Ederson de Souza     2021-02-18  4986  	struct timespec64 ts;
87938851b6efb6 Ederson de Souza     2021-02-18  4987  
87938851b6efb6 Ederson de Souza     2021-02-18  4988  	tsicr = rd32(IGC_TSICR);
87938851b6efb6 Ederson de Souza     2021-02-18  4989  	ack = 0;
2c344ae2450155 Vinicius Costa Gomes 2019-12-02  4990  
64433e5bf40abf Ederson de Souza     2021-02-18  4991  	if (tsicr & IGC_TSICR_SYS_WRAP) {
64433e5bf40abf Ederson de Souza     2021-02-18  4992  		event.type = PTP_CLOCK_PPS;
64433e5bf40abf Ederson de Souza     2021-02-18  4993  		if (adapter->ptp_caps.pps)
64433e5bf40abf Ederson de Souza     2021-02-18 @4994  			ptp_clock_event(adapter->ptp_clock, &event);
64433e5bf40abf Ederson de Souza     2021-02-18  4995  		ack |= IGC_TSICR_SYS_WRAP;
64433e5bf40abf Ederson de Souza     2021-02-18  4996  	}
64433e5bf40abf Ederson de Souza     2021-02-18  4997  
2c344ae2450155 Vinicius Costa Gomes 2019-12-02  4998  	if (tsicr & IGC_TSICR_TXTS) {
2c344ae2450155 Vinicius Costa Gomes 2019-12-02  4999  		/* retrieve hardware timestamp */
2c344ae2450155 Vinicius Costa Gomes 2019-12-02  5000  		schedule_work(&adapter->ptp_tx_work);
2c344ae2450155 Vinicius Costa Gomes 2019-12-02  5001  		ack |= IGC_TSICR_TXTS;
2c344ae2450155 Vinicius Costa Gomes 2019-12-02  5002  	}
2c344ae2450155 Vinicius Costa Gomes 2019-12-02  5003  
87938851b6efb6 Ederson de Souza     2021-02-18  5004  	if (tsicr & IGC_TSICR_TT0) {
87938851b6efb6 Ederson de Souza     2021-02-18  5005  		spin_lock(&adapter->tmreg_lock);
87938851b6efb6 Ederson de Souza     2021-02-18  5006  		ts = timespec64_add(adapter->perout[0].start,
87938851b6efb6 Ederson de Souza     2021-02-18  5007  				    adapter->perout[0].period);
87938851b6efb6 Ederson de Souza     2021-02-18  5008  		wr32(IGC_TRGTTIML0, ts.tv_nsec | IGC_TT_IO_TIMER_SEL_SYSTIM0);
87938851b6efb6 Ederson de Souza     2021-02-18  5009  		wr32(IGC_TRGTTIMH0, (u32)ts.tv_sec);
87938851b6efb6 Ederson de Souza     2021-02-18  5010  		tsauxc = rd32(IGC_TSAUXC);
87938851b6efb6 Ederson de Souza     2021-02-18  5011  		tsauxc |= IGC_TSAUXC_EN_TT0;
87938851b6efb6 Ederson de Souza     2021-02-18  5012  		wr32(IGC_TSAUXC, tsauxc);
87938851b6efb6 Ederson de Souza     2021-02-18  5013  		adapter->perout[0].start = ts;
87938851b6efb6 Ederson de Souza     2021-02-18  5014  		spin_unlock(&adapter->tmreg_lock);
87938851b6efb6 Ederson de Souza     2021-02-18  5015  		ack |= IGC_TSICR_TT0;
87938851b6efb6 Ederson de Souza     2021-02-18  5016  	}
87938851b6efb6 Ederson de Souza     2021-02-18  5017  
87938851b6efb6 Ederson de Souza     2021-02-18  5018  	if (tsicr & IGC_TSICR_TT1) {
87938851b6efb6 Ederson de Souza     2021-02-18  5019  		spin_lock(&adapter->tmreg_lock);
87938851b6efb6 Ederson de Souza     2021-02-18  5020  		ts = timespec64_add(adapter->perout[1].start,
87938851b6efb6 Ederson de Souza     2021-02-18  5021  				    adapter->perout[1].period);
87938851b6efb6 Ederson de Souza     2021-02-18  5022  		wr32(IGC_TRGTTIML1, ts.tv_nsec | IGC_TT_IO_TIMER_SEL_SYSTIM0);
87938851b6efb6 Ederson de Souza     2021-02-18  5023  		wr32(IGC_TRGTTIMH1, (u32)ts.tv_sec);
87938851b6efb6 Ederson de Souza     2021-02-18  5024  		tsauxc = rd32(IGC_TSAUXC);
87938851b6efb6 Ederson de Souza     2021-02-18  5025  		tsauxc |= IGC_TSAUXC_EN_TT1;
87938851b6efb6 Ederson de Souza     2021-02-18  5026  		wr32(IGC_TSAUXC, tsauxc);
87938851b6efb6 Ederson de Souza     2021-02-18  5027  		adapter->perout[1].start = ts;
87938851b6efb6 Ederson de Souza     2021-02-18  5028  		spin_unlock(&adapter->tmreg_lock);
87938851b6efb6 Ederson de Souza     2021-02-18  5029  		ack |= IGC_TSICR_TT1;
87938851b6efb6 Ederson de Souza     2021-02-18  5030  	}
87938851b6efb6 Ederson de Souza     2021-02-18  5031  
87938851b6efb6 Ederson de Souza     2021-02-18  5032  	if (tsicr & IGC_TSICR_AUTT0) {
87938851b6efb6 Ederson de Souza     2021-02-18  5033  		nsec = rd32(IGC_AUXSTMPL0);
87938851b6efb6 Ederson de Souza     2021-02-18  5034  		sec  = rd32(IGC_AUXSTMPH0);
87938851b6efb6 Ederson de Souza     2021-02-18  5035  		event.type = PTP_CLOCK_EXTTS;
87938851b6efb6 Ederson de Souza     2021-02-18  5036  		event.index = 0;
87938851b6efb6 Ederson de Souza     2021-02-18  5037  		event.timestamp = sec * NSEC_PER_SEC + nsec;
87938851b6efb6 Ederson de Souza     2021-02-18  5038  		ptp_clock_event(adapter->ptp_clock, &event);
87938851b6efb6 Ederson de Souza     2021-02-18  5039  		ack |= IGC_TSICR_AUTT0;
87938851b6efb6 Ederson de Souza     2021-02-18  5040  	}
87938851b6efb6 Ederson de Souza     2021-02-18  5041  
87938851b6efb6 Ederson de Souza     2021-02-18  5042  	if (tsicr & IGC_TSICR_AUTT1) {
87938851b6efb6 Ederson de Souza     2021-02-18  5043  		nsec = rd32(IGC_AUXSTMPL1);
87938851b6efb6 Ederson de Souza     2021-02-18  5044  		sec  = rd32(IGC_AUXSTMPH1);
87938851b6efb6 Ederson de Souza     2021-02-18  5045  		event.type = PTP_CLOCK_EXTTS;
87938851b6efb6 Ederson de Souza     2021-02-18  5046  		event.index = 1;
87938851b6efb6 Ederson de Souza     2021-02-18  5047  		event.timestamp = sec * NSEC_PER_SEC + nsec;
87938851b6efb6 Ederson de Souza     2021-02-18 @5048  		ptp_clock_event(adapter->ptp_clock, &event);
87938851b6efb6 Ederson de Souza     2021-02-18  5049  		ack |= IGC_TSICR_AUTT1;
87938851b6efb6 Ederson de Souza     2021-02-18  5050  	}
87938851b6efb6 Ederson de Souza     2021-02-18  5051  
2c344ae2450155 Vinicius Costa Gomes 2019-12-02  5052  	/* acknowledge the interrupts */
2c344ae2450155 Vinicius Costa Gomes 2019-12-02  5053  	wr32(IGC_TSICR, ack);
2c344ae2450155 Vinicius Costa Gomes 2019-12-02  5054  }
2c344ae2450155 Vinicius Costa Gomes 2019-12-02  5055  

:::::: The code at line 4994 was first introduced by commit
:::::: 64433e5bf40abf893c7edbc60899bdcdd7c70b76 igc: Enable internal i225 PPS

:::::: TO: Ederson de Souza <ederson.desouza@intel.com>
:::::: CC: Tony Nguyen <anthony.l.nguyen@intel.com>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 36682 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [linux-next:master 7380/8516] drivers/net/ethernet/intel/igc/igc_main.c:4994: undefined reference to `ptp_clock_event'
@ 2021-08-18  6:44 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-08-18  6:44 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 12241 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   9803fb968c8c2e1283f67b3baeb88e0adba435b4
commit: e5f31552674e88bff3a4e3ca3e5357668b5f2973 [7380/8516] ethernet: fix PTP_1588_CLOCK dependencies
config: x86_64-randconfig-s021-20210817 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.3-348-gf0e6938b-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=e5f31552674e88bff3a4e3ca3e5357668b5f2973
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout e5f31552674e88bff3a4e3ca3e5357668b5f2973
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=x86_64 SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_resume_worker':
   drivers/gpu/drm/drm_fb_helper.c:370: undefined reference to `fb_set_suspend'
   ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_fini':
   drivers/gpu/drm/drm_fb_helper.c:634: undefined reference to `framebuffer_release'
   ld: drivers/gpu/drm/drm_fb_helper.c:633: undefined reference to `fb_dealloc_cmap'
   ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_sys_write':
   drivers/gpu/drm/drm_fb_helper.c:746: undefined reference to `fb_sys_write'
   ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_sys_fillrect':
   drivers/gpu/drm/drm_fb_helper.c:764: undefined reference to `sys_fillrect'
   ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_sys_copyarea':
   drivers/gpu/drm/drm_fb_helper.c:779: undefined reference to `sys_copyarea'
   ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_sys_imageblit':
   drivers/gpu/drm/drm_fb_helper.c:794: undefined reference to `sys_imageblit'
   ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_cfb_fillrect':
   drivers/gpu/drm/drm_fb_helper.c:809: undefined reference to `cfb_fillrect'
   ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_cfb_copyarea':
   drivers/gpu/drm/drm_fb_helper.c:824: undefined reference to `cfb_copyarea'
   ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_cfb_imageblit':
   drivers/gpu/drm/drm_fb_helper.c:839: undefined reference to `cfb_imageblit'
   ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_set_suspend_unlocked':
   drivers/gpu/drm/drm_fb_helper.c:901: undefined reference to `fb_set_suspend'
   ld: drivers/gpu/drm/drm_fb_helper.o: in function `__drm_fb_helper_initial_config_and_unlock':
   drivers/gpu/drm/drm_fb_helper.c:1855: undefined reference to `register_framebuffer'
   ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fbdev_cleanup':
   drivers/gpu/drm/drm_fb_helper.c:2042: undefined reference to `fb_deferred_io_cleanup'
   ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_alloc_fbi':
   drivers/gpu/drm/drm_fb_helper.c:559: undefined reference to `framebuffer_alloc'
   ld: drivers/gpu/drm/drm_fb_helper.c:563: undefined reference to `fb_alloc_cmap'
   ld: drivers/gpu/drm/drm_fb_helper.c:589: undefined reference to `framebuffer_release'
   ld: drivers/gpu/drm/drm_fb_helper.c:587: undefined reference to `fb_dealloc_cmap'
   ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_generic_probe':
   drivers/gpu/drm/drm_fb_helper.c:2347: undefined reference to `fb_deferred_io_init'
   ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_set_suspend':
   drivers/gpu/drm/drm_fb_helper.c:856: undefined reference to `fb_set_suspend'
   ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_unregister_fbi':
   drivers/gpu/drm/drm_fb_helper.c:605: undefined reference to `unregister_framebuffer'
   ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_sys_read':
   drivers/gpu/drm/drm_fb_helper.c:728: undefined reference to `fb_sys_read'
   ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_unregister_fbi':
   drivers/gpu/drm/drm_fb_helper.c:605: undefined reference to `unregister_framebuffer'
   ld: drivers/net/ethernet/intel/igc/igc_main.o: in function `igc_tsync_interrupt':
>> drivers/net/ethernet/intel/igc/igc_main.c:4994: undefined reference to `ptp_clock_event'
>> ld: drivers/net/ethernet/intel/igc/igc_main.c:5048: undefined reference to `ptp_clock_event'
   ld: drivers/net/ethernet/intel/igc/igc_main.c:5038: undefined reference to `ptp_clock_event'
   ld: drivers/net/ethernet/intel/igc/igc_ethtool.o: in function `igc_ethtool_get_ts_info':
>> drivers/net/ethernet/intel/igc/igc_ethtool.c:1513: undefined reference to `ptp_clock_index'
   ld: drivers/net/ethernet/intel/igc/igc_ptp.o: in function `igc_ptp_feature_enable_i225':
>> drivers/net/ethernet/intel/igc/igc_ptp.c:303: undefined reference to `ptp_find_pin'
>> ld: drivers/net/ethernet/intel/igc/igc_ptp.c:269: undefined reference to `ptp_find_pin'
   ld: drivers/net/ethernet/intel/igc/igc_ptp.o: in function `igc_ptp_init':
>> drivers/net/ethernet/intel/igc/igc_ptp.c:806: undefined reference to `ptp_clock_register'
   ld: drivers/net/ethernet/intel/igc/igc_ptp.o: in function `igc_ptp_stop':
>> drivers/net/ethernet/intel/igc/igc_ptp.c:866: undefined reference to `ptp_clock_unregister'


vim +4994 drivers/net/ethernet/intel/igc/igc_main.c

3df25e4c1e66a6 Sasha Neftin         2018-10-11  4980  
2c344ae2450155 Vinicius Costa Gomes 2019-12-02  4981  static void igc_tsync_interrupt(struct igc_adapter *adapter)
2c344ae2450155 Vinicius Costa Gomes 2019-12-02  4982  {
87938851b6efb6 Ederson de Souza     2021-02-18  4983  	u32 ack, tsauxc, sec, nsec, tsicr;
2c344ae2450155 Vinicius Costa Gomes 2019-12-02  4984  	struct igc_hw *hw = &adapter->hw;
64433e5bf40abf Ederson de Souza     2021-02-18  4985  	struct ptp_clock_event event;
87938851b6efb6 Ederson de Souza     2021-02-18  4986  	struct timespec64 ts;
87938851b6efb6 Ederson de Souza     2021-02-18  4987  
87938851b6efb6 Ederson de Souza     2021-02-18  4988  	tsicr = rd32(IGC_TSICR);
87938851b6efb6 Ederson de Souza     2021-02-18  4989  	ack = 0;
2c344ae2450155 Vinicius Costa Gomes 2019-12-02  4990  
64433e5bf40abf Ederson de Souza     2021-02-18  4991  	if (tsicr & IGC_TSICR_SYS_WRAP) {
64433e5bf40abf Ederson de Souza     2021-02-18  4992  		event.type = PTP_CLOCK_PPS;
64433e5bf40abf Ederson de Souza     2021-02-18  4993  		if (adapter->ptp_caps.pps)
64433e5bf40abf Ederson de Souza     2021-02-18 @4994  			ptp_clock_event(adapter->ptp_clock, &event);
64433e5bf40abf Ederson de Souza     2021-02-18  4995  		ack |= IGC_TSICR_SYS_WRAP;
64433e5bf40abf Ederson de Souza     2021-02-18  4996  	}
64433e5bf40abf Ederson de Souza     2021-02-18  4997  
2c344ae2450155 Vinicius Costa Gomes 2019-12-02  4998  	if (tsicr & IGC_TSICR_TXTS) {
2c344ae2450155 Vinicius Costa Gomes 2019-12-02  4999  		/* retrieve hardware timestamp */
2c344ae2450155 Vinicius Costa Gomes 2019-12-02  5000  		schedule_work(&adapter->ptp_tx_work);
2c344ae2450155 Vinicius Costa Gomes 2019-12-02  5001  		ack |= IGC_TSICR_TXTS;
2c344ae2450155 Vinicius Costa Gomes 2019-12-02  5002  	}
2c344ae2450155 Vinicius Costa Gomes 2019-12-02  5003  
87938851b6efb6 Ederson de Souza     2021-02-18  5004  	if (tsicr & IGC_TSICR_TT0) {
87938851b6efb6 Ederson de Souza     2021-02-18  5005  		spin_lock(&adapter->tmreg_lock);
87938851b6efb6 Ederson de Souza     2021-02-18  5006  		ts = timespec64_add(adapter->perout[0].start,
87938851b6efb6 Ederson de Souza     2021-02-18  5007  				    adapter->perout[0].period);
87938851b6efb6 Ederson de Souza     2021-02-18  5008  		wr32(IGC_TRGTTIML0, ts.tv_nsec | IGC_TT_IO_TIMER_SEL_SYSTIM0);
87938851b6efb6 Ederson de Souza     2021-02-18  5009  		wr32(IGC_TRGTTIMH0, (u32)ts.tv_sec);
87938851b6efb6 Ederson de Souza     2021-02-18  5010  		tsauxc = rd32(IGC_TSAUXC);
87938851b6efb6 Ederson de Souza     2021-02-18  5011  		tsauxc |= IGC_TSAUXC_EN_TT0;
87938851b6efb6 Ederson de Souza     2021-02-18  5012  		wr32(IGC_TSAUXC, tsauxc);
87938851b6efb6 Ederson de Souza     2021-02-18  5013  		adapter->perout[0].start = ts;
87938851b6efb6 Ederson de Souza     2021-02-18  5014  		spin_unlock(&adapter->tmreg_lock);
87938851b6efb6 Ederson de Souza     2021-02-18  5015  		ack |= IGC_TSICR_TT0;
87938851b6efb6 Ederson de Souza     2021-02-18  5016  	}
87938851b6efb6 Ederson de Souza     2021-02-18  5017  
87938851b6efb6 Ederson de Souza     2021-02-18  5018  	if (tsicr & IGC_TSICR_TT1) {
87938851b6efb6 Ederson de Souza     2021-02-18  5019  		spin_lock(&adapter->tmreg_lock);
87938851b6efb6 Ederson de Souza     2021-02-18  5020  		ts = timespec64_add(adapter->perout[1].start,
87938851b6efb6 Ederson de Souza     2021-02-18  5021  				    adapter->perout[1].period);
87938851b6efb6 Ederson de Souza     2021-02-18  5022  		wr32(IGC_TRGTTIML1, ts.tv_nsec | IGC_TT_IO_TIMER_SEL_SYSTIM0);
87938851b6efb6 Ederson de Souza     2021-02-18  5023  		wr32(IGC_TRGTTIMH1, (u32)ts.tv_sec);
87938851b6efb6 Ederson de Souza     2021-02-18  5024  		tsauxc = rd32(IGC_TSAUXC);
87938851b6efb6 Ederson de Souza     2021-02-18  5025  		tsauxc |= IGC_TSAUXC_EN_TT1;
87938851b6efb6 Ederson de Souza     2021-02-18  5026  		wr32(IGC_TSAUXC, tsauxc);
87938851b6efb6 Ederson de Souza     2021-02-18  5027  		adapter->perout[1].start = ts;
87938851b6efb6 Ederson de Souza     2021-02-18  5028  		spin_unlock(&adapter->tmreg_lock);
87938851b6efb6 Ederson de Souza     2021-02-18  5029  		ack |= IGC_TSICR_TT1;
87938851b6efb6 Ederson de Souza     2021-02-18  5030  	}
87938851b6efb6 Ederson de Souza     2021-02-18  5031  
87938851b6efb6 Ederson de Souza     2021-02-18  5032  	if (tsicr & IGC_TSICR_AUTT0) {
87938851b6efb6 Ederson de Souza     2021-02-18  5033  		nsec = rd32(IGC_AUXSTMPL0);
87938851b6efb6 Ederson de Souza     2021-02-18  5034  		sec  = rd32(IGC_AUXSTMPH0);
87938851b6efb6 Ederson de Souza     2021-02-18  5035  		event.type = PTP_CLOCK_EXTTS;
87938851b6efb6 Ederson de Souza     2021-02-18  5036  		event.index = 0;
87938851b6efb6 Ederson de Souza     2021-02-18  5037  		event.timestamp = sec * NSEC_PER_SEC + nsec;
87938851b6efb6 Ederson de Souza     2021-02-18  5038  		ptp_clock_event(adapter->ptp_clock, &event);
87938851b6efb6 Ederson de Souza     2021-02-18  5039  		ack |= IGC_TSICR_AUTT0;
87938851b6efb6 Ederson de Souza     2021-02-18  5040  	}
87938851b6efb6 Ederson de Souza     2021-02-18  5041  
87938851b6efb6 Ederson de Souza     2021-02-18  5042  	if (tsicr & IGC_TSICR_AUTT1) {
87938851b6efb6 Ederson de Souza     2021-02-18  5043  		nsec = rd32(IGC_AUXSTMPL1);
87938851b6efb6 Ederson de Souza     2021-02-18  5044  		sec  = rd32(IGC_AUXSTMPH1);
87938851b6efb6 Ederson de Souza     2021-02-18  5045  		event.type = PTP_CLOCK_EXTTS;
87938851b6efb6 Ederson de Souza     2021-02-18  5046  		event.index = 1;
87938851b6efb6 Ederson de Souza     2021-02-18  5047  		event.timestamp = sec * NSEC_PER_SEC + nsec;
87938851b6efb6 Ederson de Souza     2021-02-18 @5048  		ptp_clock_event(adapter->ptp_clock, &event);
87938851b6efb6 Ederson de Souza     2021-02-18  5049  		ack |= IGC_TSICR_AUTT1;
87938851b6efb6 Ederson de Souza     2021-02-18  5050  	}
87938851b6efb6 Ederson de Souza     2021-02-18  5051  
2c344ae2450155 Vinicius Costa Gomes 2019-12-02  5052  	/* acknowledge the interrupts */
2c344ae2450155 Vinicius Costa Gomes 2019-12-02  5053  	wr32(IGC_TSICR, ack);
2c344ae2450155 Vinicius Costa Gomes 2019-12-02  5054  }
2c344ae2450155 Vinicius Costa Gomes 2019-12-02  5055  

:::::: The code at line 4994 was first introduced by commit
:::::: 64433e5bf40abf893c7edbc60899bdcdd7c70b76 igc: Enable internal i225 PPS

:::::: TO: Ederson de Souza <ederson.desouza@intel.com>
:::::: CC: Tony Nguyen <anthony.l.nguyen@intel.com>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 36682 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-08-18  6:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-18  6:44 [linux-next:master 7380/8516] drivers/net/ethernet/intel/igc/igc_main.c:4994: undefined reference to `ptp_clock_event' kernel test robot
2021-08-18  6:44 ` kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.