lkml.org 
[lkml]   [2021]   [May]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectdrivers/net/ethernet/pensando/ionic/ionic_lif.c:2953: undefined reference to `ionic_lif_free_phc'
Hi Shannon,

FYI, the error/warning still remains.

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 5e321ded302da4d8c5d5dd953423d9b748ab3775
commit: f0790bcd36063f2850301982f167128139a51f62 ionic: set up hw timestamp queues
date: 4 weeks ago
config: x86_64-randconfig-a016-20210504 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f0790bcd36063f2850301982f167128139a51f62
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout f0790bcd36063f2850301982f167128139a51f62
# save the attached .config to linux build tree
make W=1 W=1 ARCH=x86_64

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/net/ethernet/pensando/ionic/ionic_lif.o: in function `ionic_lif_free':
>> drivers/net/ethernet/pensando/ionic/ionic_lif.c:2953: undefined reference to `ionic_lif_free_phc'
ld: drivers/net/ethernet/pensando/ionic/ionic_lif.o: in function `ionic_lif_alloc':
>> drivers/net/ethernet/pensando/ionic/ionic_lif.c:2831: undefined reference to `ionic_lif_alloc_phc'


vim +2953 drivers/net/ethernet/pensando/ionic/ionic_lif.c

2728
2729 int ionic_lif_alloc(struct ionic *ionic)
2730 {
2731 struct device *dev = ionic->dev;
2732 union ionic_lif_identity *lid;
2733 struct net_device *netdev;
2734 struct ionic_lif *lif;
2735 int tbl_sz;
2736 int err;
2737
2738 lid = kzalloc(sizeof(*lid), GFP_KERNEL);
2739 if (!lid)
2740 return -ENOMEM;
2741
2742 netdev = alloc_etherdev_mqs(sizeof(*lif),
2743 ionic->ntxqs_per_lif, ionic->ntxqs_per_lif);
2744 if (!netdev) {
2745 dev_err(dev, "Cannot allocate netdev, aborting\n");
2746 err = -ENOMEM;
2747 goto err_out_free_lid;
2748 }
2749
2750 SET_NETDEV_DEV(netdev, dev);
2751
2752 lif = netdev_priv(netdev);
2753 lif->netdev = netdev;
2754 ionic->lif = lif;
2755 netdev->netdev_ops = &ionic_netdev_ops;
2756 ionic_ethtool_set_ops(netdev);
2757
2758 netdev->watchdog_timeo = 2 * HZ;
2759 netif_carrier_off(netdev);
2760
2761 lif->identity = lid;
2762 lif->lif_type = IONIC_LIF_TYPE_CLASSIC;
2763 err = ionic_lif_identify(ionic, lif->lif_type, lif->identity);
2764 if (err) {
2765 dev_err(ionic->dev, "Cannot identify type %d: %d\n",
2766 lif->lif_type, err);
2767 goto err_out_free_netdev;
2768 }
2769 lif->netdev->min_mtu = max_t(unsigned int, ETH_MIN_MTU,
2770 le32_to_cpu(lif->identity->eth.min_frame_size));
2771 lif->netdev->max_mtu =
2772 le32_to_cpu(lif->identity->eth.max_frame_size) - ETH_HLEN - VLAN_HLEN;
2773
2774 lif->neqs = ionic->neqs_per_lif;
2775 lif->nxqs = ionic->ntxqs_per_lif;
2776
2777 lif->ionic = ionic;
2778 lif->index = 0;
2779 lif->ntxq_descs = IONIC_DEF_TXRX_DESC;
2780 lif->nrxq_descs = IONIC_DEF_TXRX_DESC;
2781
2782 /* Convert the default coalesce value to actual hw resolution */
2783 lif->rx_coalesce_usecs = IONIC_ITR_COAL_USEC_DEFAULT;
2784 lif->rx_coalesce_hw = ionic_coal_usec_to_hw(lif->ionic,
2785 lif->rx_coalesce_usecs);
2786 lif->tx_coalesce_usecs = lif->rx_coalesce_usecs;
2787 lif->tx_coalesce_hw = lif->rx_coalesce_hw;
2788 set_bit(IONIC_LIF_F_RX_DIM_INTR, lif->state);
2789 set_bit(IONIC_LIF_F_TX_DIM_INTR, lif->state);
2790
2791 snprintf(lif->name, sizeof(lif->name), "lif%u", lif->index);
2792
2793 spin_lock_init(&lif->adminq_lock);
2794
2795 spin_lock_init(&lif->deferred.lock);
2796 INIT_LIST_HEAD(&lif->deferred.list);
2797 INIT_WORK(&lif->deferred.work, ionic_lif_deferred_work);
2798
2799 /* allocate lif info */
2800 lif->info_sz = ALIGN(sizeof(*lif->info), PAGE_SIZE);
2801 lif->info = dma_alloc_coherent(dev, lif->info_sz,
2802 &lif->info_pa, GFP_KERNEL);
2803 if (!lif->info) {
2804 dev_err(dev, "Failed to allocate lif info, aborting\n");
2805 err = -ENOMEM;
2806 goto err_out_free_netdev;
2807 }
2808
2809 ionic_debugfs_add_lif(lif);
2810
2811 /* allocate control queues and txrx queue arrays */
2812 ionic_lif_queue_identify(lif);
2813 err = ionic_qcqs_alloc(lif);
2814 if (err)
2815 goto err_out_free_lif_info;
2816
2817 /* allocate rss indirection table */
2818 tbl_sz = le16_to_cpu(lif->ionic->ident.lif.eth.rss_ind_tbl_sz);
2819 lif->rss_ind_tbl_sz = sizeof(*lif->rss_ind_tbl) * tbl_sz;
2820 lif->rss_ind_tbl = dma_alloc_coherent(dev, lif->rss_ind_tbl_sz,
2821 &lif->rss_ind_tbl_pa,
2822 GFP_KERNEL);
2823
2824 if (!lif->rss_ind_tbl) {
2825 err = -ENOMEM;
2826 dev_err(dev, "Failed to allocate rss indirection table, aborting\n");
2827 goto err_out_free_qcqs;
2828 }
2829 netdev_rss_key_fill(lif->rss_hash_key, IONIC_RSS_HASH_KEY_SIZE);
2830
> 2831 ionic_lif_alloc_phc(lif);
2832
2833 return 0;
2834
2835 err_out_free_qcqs:
2836 ionic_qcqs_free(lif);
2837 err_out_free_lif_info:
2838 dma_free_coherent(dev, lif->info_sz, lif->info, lif->info_pa);
2839 lif->info = NULL;
2840 lif->info_pa = 0;
2841 err_out_free_netdev:
2842 free_netdev(lif->netdev);
2843 lif = NULL;
2844 err_out_free_lid:
2845 kfree(lid);
2846
2847 return err;
2848 }
2849
2850 static void ionic_lif_reset(struct ionic_lif *lif)
2851 {
2852 struct ionic_dev *idev = &lif->ionic->idev;
2853
2854 mutex_lock(&lif->ionic->dev_cmd_lock);
2855 ionic_dev_cmd_lif_reset(idev, lif->index);
2856 ionic_dev_cmd_wait(lif->ionic, DEVCMD_TIMEOUT);
2857 mutex_unlock(&lif->ionic->dev_cmd_lock);
2858 }
2859
2860 static void ionic_lif_handle_fw_down(struct ionic_lif *lif)
2861 {
2862 struct ionic *ionic = lif->ionic;
2863
2864 if (test_and_set_bit(IONIC_LIF_F_FW_RESET, lif->state))
2865 return;
2866
2867 dev_info(ionic->dev, "FW Down: Stopping LIFs\n");
2868
2869 netif_device_detach(lif->netdev);
2870
2871 if (test_bit(IONIC_LIF_F_UP, lif->state)) {
2872 dev_info(ionic->dev, "Surprise FW stop, stopping queues\n");
2873 mutex_lock(&lif->queue_lock);
2874 ionic_stop_queues(lif);
2875 mutex_unlock(&lif->queue_lock);
2876 }
2877
2878 if (netif_running(lif->netdev)) {
2879 ionic_txrx_deinit(lif);
2880 ionic_txrx_free(lif);
2881 }
2882 ionic_lif_deinit(lif);
2883 ionic_reset(ionic);
2884 ionic_qcqs_free(lif);
2885
2886 dev_info(ionic->dev, "FW Down: LIFs stopped\n");
2887 }
2888
2889 static void ionic_lif_handle_fw_up(struct ionic_lif *lif)
2890 {
2891 struct ionic *ionic = lif->ionic;
2892 int err;
2893
2894 if (!test_bit(IONIC_LIF_F_FW_RESET, lif->state))
2895 return;
2896
2897 dev_info(ionic->dev, "FW Up: restarting LIFs\n");
2898
2899 ionic_init_devinfo(ionic);
2900 err = ionic_identify(ionic);
2901 if (err)
2902 goto err_out;
2903 err = ionic_port_identify(ionic);
2904 if (err)
2905 goto err_out;
2906 err = ionic_port_init(ionic);
2907 if (err)
2908 goto err_out;
2909 err = ionic_qcqs_alloc(lif);
2910 if (err)
2911 goto err_out;
2912
2913 err = ionic_lif_init(lif);
2914 if (err)
2915 goto err_qcqs_free;
2916
2917 if (lif->registered)
2918 ionic_lif_set_netdev_info(lif);
2919
2920 ionic_rx_filter_replay(lif);
2921
2922 if (netif_running(lif->netdev)) {
2923 err = ionic_txrx_alloc(lif);
2924 if (err)
2925 goto err_lifs_deinit;
2926
2927 err = ionic_txrx_init(lif);
2928 if (err)
2929 goto err_txrx_free;
2930 }
2931
2932 clear_bit(IONIC_LIF_F_FW_RESET, lif->state);
2933 ionic_link_status_check_request(lif, CAN_SLEEP);
2934 netif_device_attach(lif->netdev);
2935 dev_info(ionic->dev, "FW Up: LIFs restarted\n");
2936
2937 return;
2938
2939 err_txrx_free:
2940 ionic_txrx_free(lif);
2941 err_lifs_deinit:
2942 ionic_lif_deinit(lif);
2943 err_qcqs_free:
2944 ionic_qcqs_free(lif);
2945 err_out:
2946 dev_err(ionic->dev, "FW Up: LIFs restart failed - err %d\n", err);
2947 }
2948
2949 void ionic_lif_free(struct ionic_lif *lif)
2950 {
2951 struct device *dev = lif->ionic->dev;
2952
> 2953 ionic_lif_free_phc(lif);
2954
2955 /* free rss indirection table */
2956 dma_free_coherent(dev, lif->rss_ind_tbl_sz, lif->rss_ind_tbl,
2957 lif->rss_ind_tbl_pa);
2958 lif->rss_ind_tbl = NULL;
2959 lif->rss_ind_tbl_pa = 0;
2960
2961 /* free queues */
2962 ionic_qcqs_free(lif);
2963 if (!test_bit(IONIC_LIF_F_FW_RESET, lif->state))
2964 ionic_lif_reset(lif);
2965
2966 /* free lif info */
2967 kfree(lif->identity);
2968 dma_free_coherent(dev, lif->info_sz, lif->info, lif->info_pa);
2969 lif->info = NULL;
2970 lif->info_pa = 0;
2971
2972 /* unmap doorbell page */
2973 ionic_bus_unmap_dbpage(lif->ionic, lif->kern_dbpage);
2974 lif->kern_dbpage = NULL;
2975 kfree(lif->dbid_inuse);
2976 lif->dbid_inuse = NULL;
2977
2978 /* free netdev & lif */
2979 ionic_debugfs_del_lif(lif);
2980 free_netdev(lif->netdev);
2981 }
2982

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2021-05-04 05:29    [W:0.029 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site