All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Xiaoliang Yang <xiaoliang.yang_1@nxp.com>,
	davem@davemloft.net, joabreu@synopsys.com, kuba@kernel.org,
	alexandre.torgue@st.com, peppe.cavallaro@st.com,
	mcoquelin.stm32@gmail.com
Cc: kbuild-all@lists.01.org, netdev@vger.kernel.org,
	boon.leong.ong@intel.com, weifeng.voon@intel.com,
	vee.khee.wong@intel.com
Subject: Re: [PATCH v1 net-next 3/3] net: stmmac: ptp: update tas basetime after ptp adjust
Date: Tue, 1 Jun 2021 19:21:48 +0800	[thread overview]
Message-ID: <202106011934.pTFjvTW6-lkp@intel.com> (raw)
In-Reply-To: <20210601083813.1078-4-xiaoliang.yang_1@nxp.com>

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

Hi Xiaoliang,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on net-next/master]

url:    https://github.com/0day-ci/linux/commits/Xiaoliang-Yang/net-stmmac-re-configure-tas-basetime-after-ptp-time-adjust/20210601-163025
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 7fc6d3abc0844a9b8ef67937af465a417af6e9e9
config: m68k-allmodconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/427b65e5ea008c937ca6bf7ceca8113db2c37f1a
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Xiaoliang-Yang/net-stmmac-re-configure-tas-basetime-after-ptp-time-adjust/20210601-163025
        git checkout 427b65e5ea008c937ca6bf7ceca8113db2c37f1a
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k 

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 >>):

   drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c: In function 'stmmac_adjust_time':
>> drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c:106:10: error: implicit declaration of function 'stmmac_calc_tas_basetime' [-Werror=implicit-function-declaration]
     106 |   time = stmmac_calc_tas_basetime(basetime,
         |          ^~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c:106:10: error: incompatible types when assigning to type 'struct timespec64' from type 'int'
   cc1: some warnings being treated as errors


vim +/stmmac_calc_tas_basetime +106 drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c

    48	
    49	/**
    50	 * stmmac_adjust_time
    51	 *
    52	 * @ptp: pointer to ptp_clock_info structure
    53	 * @delta: desired change in nanoseconds
    54	 *
    55	 * Description: this function will shift/adjust the hardware clock time.
    56	 */
    57	static int stmmac_adjust_time(struct ptp_clock_info *ptp, s64 delta)
    58	{
    59		struct stmmac_priv *priv =
    60		    container_of(ptp, struct stmmac_priv, ptp_clock_ops);
    61		unsigned long flags;
    62		u32 sec, nsec;
    63		u32 quotient, reminder;
    64		int neg_adj = 0;
    65		bool xmac, est_rst = false;
    66		int ret;
    67	
    68		xmac = priv->plat->has_gmac4 || priv->plat->has_xgmac;
    69	
    70		if (delta < 0) {
    71			neg_adj = 1;
    72			delta = -delta;
    73		}
    74	
    75		quotient = div_u64_rem(delta, 1000000000ULL, &reminder);
    76		sec = quotient;
    77		nsec = reminder;
    78	
    79		/* If EST is enabled, disabled it before adjust ptp time. */
    80		if (priv->plat->est && priv->plat->est->enable) {
    81			est_rst = true;
    82			mutex_lock(&priv->plat->est->lock);
    83			priv->plat->est->enable = false;
    84			stmmac_est_configure(priv, priv->ioaddr, priv->plat->est,
    85					     priv->plat->clk_ptp_rate);
    86			mutex_unlock(&priv->plat->est->lock);
    87		}
    88	
    89		spin_lock_irqsave(&priv->ptp_lock, flags);
    90		stmmac_adjust_systime(priv, priv->ptpaddr, sec, nsec, neg_adj, xmac);
    91		spin_unlock_irqrestore(&priv->ptp_lock, flags);
    92	
    93		/* Caculate new basetime and re-configured EST after PTP time adjust. */
    94		if (est_rst) {
    95			struct timespec64 current_time, time;
    96			ktime_t current_time_ns, basetime;
    97			u64 cycle_time;
    98	
    99			priv->ptp_clock_ops.gettime64(&priv->ptp_clock_ops, &current_time);
   100			current_time_ns = timespec64_to_ktime(current_time);
   101			time.tv_nsec = priv->plat->est->btr[0];
   102			time.tv_sec = priv->plat->est->btr[1];
   103			basetime = timespec64_to_ktime(time);
   104			cycle_time = priv->plat->est->ctr[1] * NSEC_PER_SEC +
   105				     priv->plat->est->ctr[0];
 > 106			time = stmmac_calc_tas_basetime(basetime,
   107							current_time_ns,
   108							cycle_time);
   109	
   110			mutex_lock(&priv->plat->est->lock);
   111			priv->plat->est->btr[0] = (u32)time.tv_nsec;
   112			priv->plat->est->btr[1] = (u32)time.tv_sec;
   113			priv->plat->est->enable = true;
   114			ret = stmmac_est_configure(priv, priv->ioaddr, priv->plat->est,
   115						   priv->plat->clk_ptp_rate);
   116			mutex_unlock(&priv->plat->est->lock);
   117			if (ret)
   118				netdev_err(priv->dev, "failed to configure EST\n");
   119		}
   120	
   121		return 0;
   122	}
   123	

---
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: 60487 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v1 net-next 3/3] net: stmmac: ptp: update tas basetime after ptp adjust
Date: Tue, 01 Jun 2021 19:21:48 +0800	[thread overview]
Message-ID: <202106011934.pTFjvTW6-lkp@intel.com> (raw)
In-Reply-To: <20210601083813.1078-4-xiaoliang.yang_1@nxp.com>

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

Hi Xiaoliang,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on net-next/master]

url:    https://github.com/0day-ci/linux/commits/Xiaoliang-Yang/net-stmmac-re-configure-tas-basetime-after-ptp-time-adjust/20210601-163025
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 7fc6d3abc0844a9b8ef67937af465a417af6e9e9
config: m68k-allmodconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/427b65e5ea008c937ca6bf7ceca8113db2c37f1a
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Xiaoliang-Yang/net-stmmac-re-configure-tas-basetime-after-ptp-time-adjust/20210601-163025
        git checkout 427b65e5ea008c937ca6bf7ceca8113db2c37f1a
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k 

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 >>):

   drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c: In function 'stmmac_adjust_time':
>> drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c:106:10: error: implicit declaration of function 'stmmac_calc_tas_basetime' [-Werror=implicit-function-declaration]
     106 |   time = stmmac_calc_tas_basetime(basetime,
         |          ^~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c:106:10: error: incompatible types when assigning to type 'struct timespec64' from type 'int'
   cc1: some warnings being treated as errors


vim +/stmmac_calc_tas_basetime +106 drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c

    48	
    49	/**
    50	 * stmmac_adjust_time
    51	 *
    52	 * @ptp: pointer to ptp_clock_info structure
    53	 * @delta: desired change in nanoseconds
    54	 *
    55	 * Description: this function will shift/adjust the hardware clock time.
    56	 */
    57	static int stmmac_adjust_time(struct ptp_clock_info *ptp, s64 delta)
    58	{
    59		struct stmmac_priv *priv =
    60		    container_of(ptp, struct stmmac_priv, ptp_clock_ops);
    61		unsigned long flags;
    62		u32 sec, nsec;
    63		u32 quotient, reminder;
    64		int neg_adj = 0;
    65		bool xmac, est_rst = false;
    66		int ret;
    67	
    68		xmac = priv->plat->has_gmac4 || priv->plat->has_xgmac;
    69	
    70		if (delta < 0) {
    71			neg_adj = 1;
    72			delta = -delta;
    73		}
    74	
    75		quotient = div_u64_rem(delta, 1000000000ULL, &reminder);
    76		sec = quotient;
    77		nsec = reminder;
    78	
    79		/* If EST is enabled, disabled it before adjust ptp time. */
    80		if (priv->plat->est && priv->plat->est->enable) {
    81			est_rst = true;
    82			mutex_lock(&priv->plat->est->lock);
    83			priv->plat->est->enable = false;
    84			stmmac_est_configure(priv, priv->ioaddr, priv->plat->est,
    85					     priv->plat->clk_ptp_rate);
    86			mutex_unlock(&priv->plat->est->lock);
    87		}
    88	
    89		spin_lock_irqsave(&priv->ptp_lock, flags);
    90		stmmac_adjust_systime(priv, priv->ptpaddr, sec, nsec, neg_adj, xmac);
    91		spin_unlock_irqrestore(&priv->ptp_lock, flags);
    92	
    93		/* Caculate new basetime and re-configured EST after PTP time adjust. */
    94		if (est_rst) {
    95			struct timespec64 current_time, time;
    96			ktime_t current_time_ns, basetime;
    97			u64 cycle_time;
    98	
    99			priv->ptp_clock_ops.gettime64(&priv->ptp_clock_ops, &current_time);
   100			current_time_ns = timespec64_to_ktime(current_time);
   101			time.tv_nsec = priv->plat->est->btr[0];
   102			time.tv_sec = priv->plat->est->btr[1];
   103			basetime = timespec64_to_ktime(time);
   104			cycle_time = priv->plat->est->ctr[1] * NSEC_PER_SEC +
   105				     priv->plat->est->ctr[0];
 > 106			time = stmmac_calc_tas_basetime(basetime,
   107							current_time_ns,
   108							cycle_time);
   109	
   110			mutex_lock(&priv->plat->est->lock);
   111			priv->plat->est->btr[0] = (u32)time.tv_nsec;
   112			priv->plat->est->btr[1] = (u32)time.tv_sec;
   113			priv->plat->est->enable = true;
   114			ret = stmmac_est_configure(priv, priv->ioaddr, priv->plat->est,
   115						   priv->plat->clk_ptp_rate);
   116			mutex_unlock(&priv->plat->est->lock);
   117			if (ret)
   118				netdev_err(priv->dev, "failed to configure EST\n");
   119		}
   120	
   121		return 0;
   122	}
   123	

---
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: 60487 bytes --]

  reply	other threads:[~2021-06-01 11:22 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-01  8:38 [PATCH v1 net-next 0/3] net: stmmac: re-configure tas basetime after ptp time adjust Xiaoliang Yang
2021-06-01  8:38 ` Xiaoliang Yang
2021-06-01  8:38 ` [PATCH v1 net-next 1/3] net: stmmac: separate the tas basetime calculation function Xiaoliang Yang
2021-06-01  8:38   ` Xiaoliang Yang
2021-06-01 10:58   ` kernel test robot
2021-06-01 10:58     ` kernel test robot
2021-06-01  8:38 ` [PATCH v1 net-next 2/3] net: stmmac: add mutex lock to protect est parameters Xiaoliang Yang
2021-06-01  8:38   ` Xiaoliang Yang
2021-06-01  8:38 ` [PATCH v1 net-next 3/3] net: stmmac: ptp: update tas basetime after ptp adjust Xiaoliang Yang
2021-06-01  8:38   ` Xiaoliang Yang
2021-06-01 11:21   ` kernel test robot [this message]
2021-06-01 11:21     ` kernel test robot
2021-06-02 10:18   ` Rui Sousa
2021-06-02 10:18     ` Rui Sousa
2021-06-09  9:03     ` Xiaoliang Yang
2021-06-09  9:03       ` Xiaoliang Yang
2021-06-16 17:12       ` Rui Sousa
2021-06-16 17:12         ` Rui Sousa

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=202106011934.pTFjvTW6-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=alexandre.torgue@st.com \
    --cc=boon.leong.ong@intel.com \
    --cc=davem@davemloft.net \
    --cc=joabreu@synopsys.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kuba@kernel.org \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=peppe.cavallaro@st.com \
    --cc=vee.khee.wong@intel.com \
    --cc=weifeng.voon@intel.com \
    --cc=xiaoliang.yang_1@nxp.com \
    /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.