All of lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [alaahl:netdev-next 16/21] drivers/net/dsa/ocelot/felix.c:357: undefined reference to `ocelot_port_add_txtstamp_skb'
Date: Sun, 15 Dec 2019 11:17:13 +0800	[thread overview]
Message-ID: <201912151100.omGmpO2r%lkp@intel.com> (raw)

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

Hi Jakub,

It's probably a bug fix that unveils the link errors.

tree:   https://github.com/alaahl/linux.git netdev-next
head:   5f04ed74a8a3bcb2122738b7eda857187e85aa34
commit: ab44081fef9b5d31ea5641494c9a379b0ebe1839 [16/21] sfc: fix build without CONFIG_RFS_ACCEL
config: powerpc-randconfig-a001-20191214 (attached as .config)
compiler: powerpc-linux-gcc (GCC) 7.5.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout ab44081fef9b5d31ea5641494c9a379b0ebe1839
        # save the attached .config to linux build tree
        GCC_VERSION=7.5.0 make.cross ARCH=powerpc 

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

All errors (new ones prefixed by >>):

   drivers/net/dsa/ocelot/felix.o: In function `felix_txtstamp':
>> drivers/net/dsa/ocelot/felix.c:357: undefined reference to `ocelot_port_add_txtstamp_skb'
   drivers/net/dsa/ocelot/felix.o: In function `felix_vlan_add':
   drivers/net/dsa/ocelot/felix.c:112: undefined reference to `ocelot_vlan_add'
   drivers/net/dsa/ocelot/felix.o: In function `felix_hwtstamp_set':
>> drivers/net/dsa/ocelot/felix.c:320: undefined reference to `ocelot_hwstamp_set'
   drivers/net/dsa/ocelot/felix.o: In function `felix_teardown':
   drivers/net/dsa/ocelot/felix.c:304: undefined reference to `ocelot_deinit'
   drivers/net/dsa/ocelot/felix.o: In function `felix_port_enable':
   drivers/net/dsa/ocelot/felix.c:146: undefined reference to `ocelot_port_enable'
   drivers/net/dsa/ocelot/felix.o: In function `felix_port_disable':
   drivers/net/dsa/ocelot/felix.c:155: undefined reference to `ocelot_port_disable'
   drivers/net/dsa/ocelot/felix.o: In function `felix_get_strings':
   drivers/net/dsa/ocelot/felix.c:163: undefined reference to `ocelot_get_strings'
   drivers/net/dsa/ocelot/felix.o: In function `felix_init_structs':
   drivers/net/dsa/ocelot/felix.c:220: undefined reference to `ocelot_regmap_init'
   drivers/net/dsa/ocelot/felix.c:230: undefined reference to `ocelot_regfields_init'
   drivers/net/dsa/ocelot/felix.o: In function `felix_setup':
   drivers/net/dsa/ocelot/felix.c:285: undefined reference to `ocelot_init'
   drivers/net/dsa/ocelot/felix.c:288: undefined reference to `ocelot_init_port'
   drivers/net/dsa/ocelot/felix.c:291: undefined reference to `ocelot_set_cpu_port'
   drivers/net/dsa/ocelot/felix.o: In function `felix_vlan_filtering':
   drivers/net/dsa/ocelot/felix.c:99: undefined reference to `ocelot_port_vlan_filtering'
   drivers/net/dsa/ocelot/felix.o: In function `felix_fdb_dump':
   drivers/net/dsa/ocelot/felix.c:42: undefined reference to `ocelot_fdb_dump'
   drivers/net/dsa/ocelot/felix.o: In function `felix_hwtstamp_get':
>> drivers/net/dsa/ocelot/felix.c:312: undefined reference to `ocelot_hwstamp_get'
   drivers/net/dsa/ocelot/felix.o: In function `felix_vlan_del':
   drivers/net/dsa/ocelot/felix.c:131: undefined reference to `ocelot_vlan_del'
   drivers/net/dsa/ocelot/felix.o: In function `felix_get_ethtool_stats':
   drivers/net/dsa/ocelot/felix.c:170: undefined reference to `ocelot_get_ethtool_stats'
   drivers/net/dsa/ocelot/felix.o: In function `felix_get_ts_info':
   drivers/net/dsa/ocelot/felix.c:185: undefined reference to `ocelot_get_ts_info'
   drivers/net/dsa/ocelot/felix.o: In function `felix_set_ageing_time':
   drivers/net/dsa/ocelot/felix.c:24: undefined reference to `ocelot_set_ageing_time'
   drivers/net/dsa/ocelot/felix.o: In function `felix_get_sset_count':
   drivers/net/dsa/ocelot/felix.c:177: undefined reference to `ocelot_get_sset_count'
   drivers/net/dsa/ocelot/felix.o: In function `felix_fdb_del':
   drivers/net/dsa/ocelot/felix.c:61: undefined reference to `ocelot_fdb_del'
   drivers/net/dsa/ocelot/felix.o: In function `felix_bridge_leave':
   drivers/net/dsa/ocelot/felix.c:85: undefined reference to `ocelot_port_bridge_leave'
   drivers/net/dsa/ocelot/felix.o: In function `felix_adjust_link':
   drivers/net/dsa/ocelot/felix.c:34: undefined reference to `ocelot_adjust_link'
   drivers/net/dsa/ocelot/felix.o: In function `felix_fdb_add':
   drivers/net/dsa/ocelot/felix.c:53: undefined reference to `ocelot_fdb_add'
   drivers/net/dsa/ocelot/felix.c:53: undefined reference to `ocelot_fdb_add'
   drivers/net/dsa/ocelot/felix.o: In function `felix_rxtstamp':
>> drivers/net/dsa/ocelot/felix.c:333: undefined reference to `ocelot_ptp_gettime64'
   drivers/net/dsa/ocelot/felix.o: In function `felix_bridge_stp_state_set':
   drivers/net/dsa/ocelot/felix.c:69: undefined reference to `ocelot_bridge_stp_state_set'
   drivers/net/dsa/ocelot/felix.o: In function `felix_bridge_join':
   drivers/net/dsa/ocelot/felix.c:77: undefined reference to `ocelot_port_bridge_join'
   drivers/net/dsa/ocelot/felix.o: In function `felix_irq_handler':
>> drivers/net/dsa/ocelot/felix.c:407: undefined reference to `ocelot_get_txtstamp'
   drivers/net/dsa/ocelot/felix_vsc9959.o: In function `vsc9959_reset':
   drivers/net/dsa/ocelot/felix_vsc9959.c:553: undefined reference to `__ocelot_write_ix'
   drivers/net/dsa/ocelot/felix_vsc9959.o: In function `vsc9959_sys_ram_init_status':
   drivers/net/dsa/ocelot/felix_vsc9959.c:535: undefined reference to `__ocelot_read_ix'
   drivers/net/dsa/ocelot/felix_vsc9959.c:535: undefined reference to `__ocelot_read_ix'
   drivers/net/dsa/ocelot/felix_vsc9959.c:535: undefined reference to `__ocelot_read_ix'

vim +357 drivers/net/dsa/ocelot/felix.c

56051948773eeb Vladimir Oltean 2019-11-14  269  
56051948773eeb Vladimir Oltean 2019-11-14  270  /* Hardware initialization done here so that we can allocate structures with
56051948773eeb Vladimir Oltean 2019-11-14  271   * devm without fear of dsa_register_switch returning -EPROBE_DEFER and causing
56051948773eeb Vladimir Oltean 2019-11-14  272   * us to allocate structures twice (leak memory) and map PCI memory twice
56051948773eeb Vladimir Oltean 2019-11-14  273   * (which will not work).
56051948773eeb Vladimir Oltean 2019-11-14  274   */
56051948773eeb Vladimir Oltean 2019-11-14  275  static int felix_setup(struct dsa_switch *ds)
56051948773eeb Vladimir Oltean 2019-11-14  276  {
56051948773eeb Vladimir Oltean 2019-11-14  277  	struct ocelot *ocelot = ds->priv;
56051948773eeb Vladimir Oltean 2019-11-14  278  	struct felix *felix = ocelot_to_felix(ocelot);
56051948773eeb Vladimir Oltean 2019-11-14  279  	int port, err;
56051948773eeb Vladimir Oltean 2019-11-14  280  
56051948773eeb Vladimir Oltean 2019-11-14  281  	err = felix_init_structs(felix, ds->num_ports);
56051948773eeb Vladimir Oltean 2019-11-14  282  	if (err)
56051948773eeb Vladimir Oltean 2019-11-14  283  		return err;
56051948773eeb Vladimir Oltean 2019-11-14  284  
56051948773eeb Vladimir Oltean 2019-11-14 @285  	ocelot_init(ocelot);
56051948773eeb Vladimir Oltean 2019-11-14  286  
56051948773eeb Vladimir Oltean 2019-11-14  287  	for (port = 0; port < ds->num_ports; port++) {
56051948773eeb Vladimir Oltean 2019-11-14  288  		ocelot_init_port(ocelot, port);
56051948773eeb Vladimir Oltean 2019-11-14  289  
b8fc7177d8aef1 Vladimir Oltean 2019-11-18  290  		if (dsa_is_cpu_port(ds, port))
56051948773eeb Vladimir Oltean 2019-11-14  291  			ocelot_set_cpu_port(ocelot, port,
56051948773eeb Vladimir Oltean 2019-11-14  292  					    OCELOT_TAG_PREFIX_NONE,
56051948773eeb Vladimir Oltean 2019-11-14  293  					    OCELOT_TAG_PREFIX_LONG);
56051948773eeb Vladimir Oltean 2019-11-14  294  	}
56051948773eeb Vladimir Oltean 2019-11-14  295  
56051948773eeb Vladimir Oltean 2019-11-14  296  	return 0;
56051948773eeb Vladimir Oltean 2019-11-14  297  }
56051948773eeb Vladimir Oltean 2019-11-14  298  
56051948773eeb Vladimir Oltean 2019-11-14  299  static void felix_teardown(struct dsa_switch *ds)
56051948773eeb Vladimir Oltean 2019-11-14  300  {
56051948773eeb Vladimir Oltean 2019-11-14  301  	struct ocelot *ocelot = ds->priv;
56051948773eeb Vladimir Oltean 2019-11-14  302  
56051948773eeb Vladimir Oltean 2019-11-14  303  	/* stop workqueue thread */
56051948773eeb Vladimir Oltean 2019-11-14  304  	ocelot_deinit(ocelot);
56051948773eeb Vladimir Oltean 2019-11-14  305  }
56051948773eeb Vladimir Oltean 2019-11-14  306  
c0bcf537667cf8 Yangbo Lu       2019-11-20  307  static int felix_hwtstamp_get(struct dsa_switch *ds, int port,
c0bcf537667cf8 Yangbo Lu       2019-11-20  308  			      struct ifreq *ifr)
c0bcf537667cf8 Yangbo Lu       2019-11-20  309  {
c0bcf537667cf8 Yangbo Lu       2019-11-20  310  	struct ocelot *ocelot = ds->priv;
c0bcf537667cf8 Yangbo Lu       2019-11-20  311  
c0bcf537667cf8 Yangbo Lu       2019-11-20 @312  	return ocelot_hwstamp_get(ocelot, port, ifr);
c0bcf537667cf8 Yangbo Lu       2019-11-20  313  }
c0bcf537667cf8 Yangbo Lu       2019-11-20  314  
c0bcf537667cf8 Yangbo Lu       2019-11-20  315  static int felix_hwtstamp_set(struct dsa_switch *ds, int port,
c0bcf537667cf8 Yangbo Lu       2019-11-20  316  			      struct ifreq *ifr)
c0bcf537667cf8 Yangbo Lu       2019-11-20  317  {
c0bcf537667cf8 Yangbo Lu       2019-11-20  318  	struct ocelot *ocelot = ds->priv;
c0bcf537667cf8 Yangbo Lu       2019-11-20  319  
c0bcf537667cf8 Yangbo Lu       2019-11-20 @320  	return ocelot_hwstamp_set(ocelot, port, ifr);
c0bcf537667cf8 Yangbo Lu       2019-11-20  321  }
c0bcf537667cf8 Yangbo Lu       2019-11-20  322  
c0bcf537667cf8 Yangbo Lu       2019-11-20  323  static bool felix_rxtstamp(struct dsa_switch *ds, int port,
c0bcf537667cf8 Yangbo Lu       2019-11-20  324  			   struct sk_buff *skb, unsigned int type)
c0bcf537667cf8 Yangbo Lu       2019-11-20  325  {
c0bcf537667cf8 Yangbo Lu       2019-11-20  326  	struct skb_shared_hwtstamps *shhwtstamps;
c0bcf537667cf8 Yangbo Lu       2019-11-20  327  	struct ocelot *ocelot = ds->priv;
c0bcf537667cf8 Yangbo Lu       2019-11-20  328  	u8 *extraction = skb->data - ETH_HLEN - OCELOT_TAG_LEN;
c0bcf537667cf8 Yangbo Lu       2019-11-20  329  	u32 tstamp_lo, tstamp_hi;
c0bcf537667cf8 Yangbo Lu       2019-11-20  330  	struct timespec64 ts;
c0bcf537667cf8 Yangbo Lu       2019-11-20  331  	u64 tstamp, val;
c0bcf537667cf8 Yangbo Lu       2019-11-20  332  
c0bcf537667cf8 Yangbo Lu       2019-11-20 @333  	ocelot_ptp_gettime64(&ocelot->ptp_info, &ts);
c0bcf537667cf8 Yangbo Lu       2019-11-20  334  	tstamp = ktime_set(ts.tv_sec, ts.tv_nsec);
c0bcf537667cf8 Yangbo Lu       2019-11-20  335  
c0bcf537667cf8 Yangbo Lu       2019-11-20  336  	packing(extraction, &val,  116, 85, OCELOT_TAG_LEN, UNPACK, 0);
c0bcf537667cf8 Yangbo Lu       2019-11-20  337  	tstamp_lo = (u32)val;
c0bcf537667cf8 Yangbo Lu       2019-11-20  338  
c0bcf537667cf8 Yangbo Lu       2019-11-20  339  	tstamp_hi = tstamp >> 32;
c0bcf537667cf8 Yangbo Lu       2019-11-20  340  	if ((tstamp & 0xffffffff) < tstamp_lo)
c0bcf537667cf8 Yangbo Lu       2019-11-20  341  		tstamp_hi--;
c0bcf537667cf8 Yangbo Lu       2019-11-20  342  
c0bcf537667cf8 Yangbo Lu       2019-11-20  343  	tstamp = ((u64)tstamp_hi << 32) | tstamp_lo;
c0bcf537667cf8 Yangbo Lu       2019-11-20  344  
c0bcf537667cf8 Yangbo Lu       2019-11-20  345  	shhwtstamps = skb_hwtstamps(skb);
c0bcf537667cf8 Yangbo Lu       2019-11-20  346  	memset(shhwtstamps, 0, sizeof(struct skb_shared_hwtstamps));
c0bcf537667cf8 Yangbo Lu       2019-11-20  347  	shhwtstamps->hwtstamp = tstamp;
c0bcf537667cf8 Yangbo Lu       2019-11-20  348  	return false;
c0bcf537667cf8 Yangbo Lu       2019-11-20  349  }
c0bcf537667cf8 Yangbo Lu       2019-11-20  350  
3243e04ab1c06e Chen Wandun     2019-11-22  351  static bool felix_txtstamp(struct dsa_switch *ds, int port,
c0bcf537667cf8 Yangbo Lu       2019-11-20  352  			   struct sk_buff *clone, unsigned int type)
c0bcf537667cf8 Yangbo Lu       2019-11-20  353  {
c0bcf537667cf8 Yangbo Lu       2019-11-20  354  	struct ocelot *ocelot = ds->priv;
c0bcf537667cf8 Yangbo Lu       2019-11-20  355  	struct ocelot_port *ocelot_port = ocelot->ports[port];
c0bcf537667cf8 Yangbo Lu       2019-11-20  356  
c0bcf537667cf8 Yangbo Lu       2019-11-20 @357  	if (!ocelot_port_add_txtstamp_skb(ocelot_port, clone))
c0bcf537667cf8 Yangbo Lu       2019-11-20  358  		return true;
c0bcf537667cf8 Yangbo Lu       2019-11-20  359  
c0bcf537667cf8 Yangbo Lu       2019-11-20  360  	return false;
c0bcf537667cf8 Yangbo Lu       2019-11-20  361  }
c0bcf537667cf8 Yangbo Lu       2019-11-20  362  
56051948773eeb Vladimir Oltean 2019-11-14  363  static const struct dsa_switch_ops felix_switch_ops = {
56051948773eeb Vladimir Oltean 2019-11-14  364  	.get_tag_protocol	= felix_get_tag_protocol,
56051948773eeb Vladimir Oltean 2019-11-14  365  	.setup			= felix_setup,
56051948773eeb Vladimir Oltean 2019-11-14  366  	.teardown		= felix_teardown,
56051948773eeb Vladimir Oltean 2019-11-14  367  	.set_ageing_time	= felix_set_ageing_time,
56051948773eeb Vladimir Oltean 2019-11-14  368  	.get_strings		= felix_get_strings,
56051948773eeb Vladimir Oltean 2019-11-14  369  	.get_ethtool_stats	= felix_get_ethtool_stats,
56051948773eeb Vladimir Oltean 2019-11-14  370  	.get_sset_count		= felix_get_sset_count,
56051948773eeb Vladimir Oltean 2019-11-14  371  	.get_ts_info		= felix_get_ts_info,
56051948773eeb Vladimir Oltean 2019-11-14  372  	.adjust_link		= felix_adjust_link,
56051948773eeb Vladimir Oltean 2019-11-14  373  	.port_enable		= felix_port_enable,
56051948773eeb Vladimir Oltean 2019-11-14  374  	.port_disable		= felix_port_disable,
56051948773eeb Vladimir Oltean 2019-11-14  375  	.port_fdb_dump		= felix_fdb_dump,
56051948773eeb Vladimir Oltean 2019-11-14  376  	.port_fdb_add		= felix_fdb_add,
56051948773eeb Vladimir Oltean 2019-11-14  377  	.port_fdb_del		= felix_fdb_del,
56051948773eeb Vladimir Oltean 2019-11-14  378  	.port_bridge_join	= felix_bridge_join,
56051948773eeb Vladimir Oltean 2019-11-14  379  	.port_bridge_leave	= felix_bridge_leave,
56051948773eeb Vladimir Oltean 2019-11-14  380  	.port_stp_state_set	= felix_bridge_stp_state_set,
56051948773eeb Vladimir Oltean 2019-11-14  381  	.port_vlan_prepare	= felix_vlan_prepare,
56051948773eeb Vladimir Oltean 2019-11-14  382  	.port_vlan_filtering	= felix_vlan_filtering,
56051948773eeb Vladimir Oltean 2019-11-14  383  	.port_vlan_add		= felix_vlan_add,
56051948773eeb Vladimir Oltean 2019-11-14  384  	.port_vlan_del		= felix_vlan_del,
c0bcf537667cf8 Yangbo Lu       2019-11-20  385  	.port_hwtstamp_get	= felix_hwtstamp_get,
c0bcf537667cf8 Yangbo Lu       2019-11-20  386  	.port_hwtstamp_set	= felix_hwtstamp_set,
c0bcf537667cf8 Yangbo Lu       2019-11-20  387  	.port_rxtstamp		= felix_rxtstamp,
c0bcf537667cf8 Yangbo Lu       2019-11-20  388  	.port_txtstamp		= felix_txtstamp,
56051948773eeb Vladimir Oltean 2019-11-14  389  };
56051948773eeb Vladimir Oltean 2019-11-14  390  
56051948773eeb Vladimir Oltean 2019-11-14  391  static struct felix_info *felix_instance_tbl[] = {
56051948773eeb Vladimir Oltean 2019-11-14  392  	[FELIX_INSTANCE_VSC9959] = &felix_info_vsc9959,
56051948773eeb Vladimir Oltean 2019-11-14  393  };
56051948773eeb Vladimir Oltean 2019-11-14  394  
c0bcf537667cf8 Yangbo Lu       2019-11-20  395  static irqreturn_t felix_irq_handler(int irq, void *data)
c0bcf537667cf8 Yangbo Lu       2019-11-20  396  {
c0bcf537667cf8 Yangbo Lu       2019-11-20  397  	struct ocelot *ocelot = (struct ocelot *)data;
c0bcf537667cf8 Yangbo Lu       2019-11-20  398  
c0bcf537667cf8 Yangbo Lu       2019-11-20  399  	/* The INTB interrupt is used for both PTP TX timestamp interrupt
c0bcf537667cf8 Yangbo Lu       2019-11-20  400  	 * and preemption status change interrupt on each port.
c0bcf537667cf8 Yangbo Lu       2019-11-20  401  	 *
c0bcf537667cf8 Yangbo Lu       2019-11-20  402  	 * - Get txtstamp if have
c0bcf537667cf8 Yangbo Lu       2019-11-20  403  	 * - TODO: handle preemption. Without handling it, driver may get
c0bcf537667cf8 Yangbo Lu       2019-11-20  404  	 *   interrupt storm.
c0bcf537667cf8 Yangbo Lu       2019-11-20  405  	 */
c0bcf537667cf8 Yangbo Lu       2019-11-20  406  
c0bcf537667cf8 Yangbo Lu       2019-11-20 @407  	ocelot_get_txtstamp(ocelot);
c0bcf537667cf8 Yangbo Lu       2019-11-20  408  
c0bcf537667cf8 Yangbo Lu       2019-11-20  409  	return IRQ_HANDLED;
c0bcf537667cf8 Yangbo Lu       2019-11-20  410  }
c0bcf537667cf8 Yangbo Lu       2019-11-20  411  

:::::: The code at line 357 was first introduced by commit
:::::: c0bcf537667cf88bbcbb377d01d2b79c45265741 net: dsa: ocelot: add hardware timestamping support for Felix

:::::: TO: Yangbo Lu <yangbo.lu@nxp.com>
:::::: CC: David S. Miller <davem@davemloft.net>

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org Intel Corporation

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

                 reply	other threads:[~2019-12-15  3:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201912151100.omGmpO2r%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.