tree:
https://github.com/intel/linux-intel-lts.git 5.4/yocto
head: eeb611e5394c56d45c5cc8f7dc484c9f19e93143
commit: 1455d4a9ab51d8fb4262402a5135b1277b8bc4cc [316/1142] net: stmmac: enable runtime
power management support
config: xtensa-randconfig-r031-20200818 (attached as .config)
compiler: xtensa-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
git checkout 1455d4a9ab51d8fb4262402a5135b1277b8bc4cc
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=xtensa
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from include/linux/err.h:5,
from include/linux/clk.h:12,
from drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:17:
include/linux/scatterlist.h: In function 'sg_set_buf':
arch/xtensa/include/asm/page.h:182:9: warning: comparison of unsigned expression >=
0 is always true [-Wtype-limits]
182 | ((pfn) >= ARCH_PFN_OFFSET && ((pfn) - ARCH_PFN_OFFSET) <
max_mapnr)
| ^~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/scatterlist.h:143:2: note: in expansion of macro 'BUG_ON'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~
arch/xtensa/include/asm/page.h:190:32: note: in expansion of macro 'pfn_valid'
190 | #define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
| ^~~~~~~~~
include/linux/scatterlist.h:143:10: note: in expansion of macro
'virt_addr_valid'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~~~~~~~~~~
In file included from ./arch/xtensa/include/generated/asm/bug.h:1,
from include/linux/bug.h:5,
from include/linux/thread_info.h:12,
from arch/xtensa/include/asm/current.h:18,
from include/linux/mutex.h:14,
from include/linux/notifier.h:14,
from include/linux/clk.h:14,
from drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:17:
include/linux/dma-mapping.h: In function 'dma_map_resource':
arch/xtensa/include/asm/page.h:182:9: warning: comparison of unsigned expression >=
0 is always true [-Wtype-limits]
182 | ((pfn) >= ARCH_PFN_OFFSET && ((pfn) - ARCH_PFN_OFFSET) <
max_mapnr)
| ^~
include/asm-generic/bug.h:139:27: note: in definition of macro 'WARN_ON_ONCE'
139 | int __ret_warn_once = !!(condition); \
| ^~~~~~~~~
include/linux/dma-mapping.h:355:19: note: in expansion of macro 'pfn_valid'
355 | if (WARN_ON_ONCE(pfn_valid(PHYS_PFN(phys_addr))))
| ^~~~~~~~~
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c: In function
'stmmac_hwtstamp_set':
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:585:7: warning: variable
'xmac' set but not used [-Wunused-but-set-variable]
585 | bool xmac;
| ^~~~
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c: At top level:
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:1445:6: warning: no previous
prototype for 'stmmac_alloc_rx_buffers' [-Wmissing-prototypes]
1445 | bool stmmac_alloc_rx_buffers(struct stmmac_rx_queue *rx_q, u32 count)
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c: In function
'stmmac_alloc_rx_buffers':
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:1471:13: warning: comparison of
unsigned expression >= 0 is always true [-Wtype-limits]
1471 | while (--i >= 0)
| ^~
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c: In function
'init_dma_rx_desc_rings':
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:1579:15: warning: comparison of
unsigned expression >= 0 is always true [-Wtype-limits]
1579 | while (queue >= 0) {
| ^~
In file included from include/linux/printk.h:327,
from include/linux/kernel.h:15,
from include/linux/clk.h:13,
from drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:17:
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c: In function 'stmmac_rx':
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:4731:27: warning: format
'%llx' expects argument of type 'long long unsigned int', but argument 6
has type 'dma_addr_t' {aka 'unsigned int'} [-Wformat=]
4731 | netdev_dbg(priv->dev, "\tdesc: %p [entry %d] buff=0x%llx\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4732 | p, entry, buf->addr);
| ~~~~~~~~~
| |
| dma_addr_t {aka unsigned int}
include/linux/dynamic_debug.h:125:15: note: in definition of macro
'__dynamic_func_call'
125 | func(&id, ##__VA_ARGS__); \
| ^~~~~~~~~~~
include/linux/dynamic_debug.h:161:2: note: in expansion of macro
'_dynamic_func_call'
161 | _dynamic_func_call(fmt, __dynamic_netdev_dbg, \
| ^~~~~~~~~~~~~~~~~~
include/linux/netdevice.h:4759:2: note: in expansion of macro
'dynamic_netdev_dbg'
4759 | dynamic_netdev_dbg(__dev, format, ##args); \
| ^~~~~~~~~~~~~~~~~~
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:4731:5: note: in expansion of macro
'netdev_dbg'
4731 | netdev_dbg(priv->dev, "\tdesc: %p [entry %d] buff=0x%llx\n",
| ^~~~~~~~~~
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:4731:60: note: format string is
defined here
4731 | netdev_dbg(priv->dev, "\tdesc: %p [entry %d] buff=0x%llx\n",
| ~~~^
| |
| long long unsigned
int
| %x
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c: In function
'stmmac_common_interrupt':
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:5096:6: warning: variable
'queues_count' set but not used [-Wunused-but-set-variable]
5096 | u32 queues_count;
| ^~~~~~~~~~~~
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c: At top level:
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:5701:5: warning: no previous
prototype for 'stmmac_xdp_xmit' [-Wmissing-prototypes]
5701 | int stmmac_xdp_xmit(struct net_device *dev, int n, struct xdp_frame **frames,
| ^~~~~~~~~~~~~~~
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:6384:6: warning: no previous
prototype for 'stmmac_clean_all_tx_rings' [-Wmissing-prototypes]
6384 | void stmmac_clean_all_tx_rings(struct stmmac_priv *priv)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c: In function
'stmmac_dvr_probe':
> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:6666:25: error:
'struct dev_pm_info' has no member named 'runtime_auto'
6666 |
if (priv->device->power.runtime_auto) {
| ^
In file included from include/linux/err.h:5,
from include/linux/clk.h:12,
from drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:17:
> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:6667:42: error:
'struct dev_pm_info' has no member named 'usage_count'
6667 |
while (atomic_read(&priv->device->power.usage_count) > 0)
| ^
include/linux/compiler.h:261:17: note: in definition of macro '__READ_ONCE'
261 | union { typeof(x) __val; char __c[1]; } __u; \
| ^
arch/xtensa/include/asm/atomic.h:48:25: note: in expansion of macro
'READ_ONCE'
48 | #define atomic_read(v) READ_ONCE((v)->counter)
| ^~~~~~~~~
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:6667:10: note: in expansion of macro
'atomic_read'
6667 | while (atomic_read(&priv->device->power.usage_count) > 0)
| ^~~~~~~~~~~
> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:6667:42: error:
'struct dev_pm_info' has no member named 'usage_count'
6667 |
while (atomic_read(&priv->device->power.usage_count) > 0)
| ^
include/linux/compiler.h:263:22: note: in definition of macro '__READ_ONCE'
263 | __read_once_size(&(x), __u.__c, sizeof(x)); \
| ^
arch/xtensa/include/asm/atomic.h:48:25: note: in expansion of macro
'READ_ONCE'
48 | #define atomic_read(v) READ_ONCE((v)->counter)
| ^~~~~~~~~
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:6667:10: note: in expansion of macro
'atomic_read'
6667 | while (atomic_read(&priv->device->power.usage_count) > 0)
| ^~~~~~~~~~~
> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:6667:42: error:
'struct dev_pm_info' has no member named 'usage_count'
6667 |
while (atomic_read(&priv->device->power.usage_count) > 0)
| ^
include/linux/compiler.h:263:42: note: in definition of macro '__READ_ONCE'
263 | __read_once_size(&(x), __u.__c, sizeof(x)); \
| ^
arch/xtensa/include/asm/atomic.h:48:25: note: in expansion of macro
'READ_ONCE'
48 | #define atomic_read(v) READ_ONCE((v)->counter)
| ^~~~~~~~~
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:6667:10: note: in expansion of macro
'atomic_read'
6667 | while (atomic_read(&priv->device->power.usage_count) > 0)
| ^~~~~~~~~~~
> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:6667:42: error:
'struct dev_pm_info' has no member named 'usage_count'
6667 |
while (atomic_read(&priv->device->power.usage_count) > 0)
| ^
include/linux/compiler.h:265:30: note: in definition of macro '__READ_ONCE'
265 | __read_once_size_nocheck(&(x), __u.__c, sizeof(x)); \
| ^
arch/xtensa/include/asm/atomic.h:48:25: note: in expansion of macro
'READ_ONCE'
48 | #define atomic_read(v) READ_ONCE((v)->counter)
| ^~~~~~~~~
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:6667:10: note: in expansion of macro
'atomic_read'
6667 | while (atomic_read(&priv->device->power.usage_count) > 0)
| ^~~~~~~~~~~
> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:6667:42: error:
'struct dev_pm_info' has no member named 'usage_count'
6667 |
while (atomic_read(&priv->device->power.usage_count) > 0)
| ^
include/linux/compiler.h:265:50: note: in definition of macro '__READ_ONCE'
265 | __read_once_size_nocheck(&(x), __u.__c, sizeof(x)); \
| ^
arch/xtensa/include/asm/atomic.h:48:25: note: in expansion of macro
'READ_ONCE'
48 | #define atomic_read(v) READ_ONCE((v)->counter)
| ^~~~~~~~~
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:6667:10: note: in expansion of macro
'atomic_read'
6667 | while (atomic_read(&priv->device->power.usage_count) > 0)
| ^~~~~~~~~~~
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:6670:42: error: 'struct
dev_pm_info' has no member named 'usage_count'
6670 | while (atomic_read(&priv->device->power.usage_count) > 1)
| ^
include/linux/compiler.h:261:17: note: in definition of macro '__READ_ONCE'
261 | union { typeof(x) __val; char __c[1]; } __u; \
| ^
arch/xtensa/include/asm/atomic.h:48:25: note: in expansion of macro
'READ_ONCE'
48 | #define atomic_read(v) READ_ONCE((v)->counter)
| ^~~~~~~~~
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:6670:10: note: in expansion of macro
'atomic_read'
6670 | while (atomic_read(&priv->device->power.usage_count) > 1)
| ^~~~~~~~~~~
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:6670:42: error: 'struct
dev_pm_info' has no member named 'usage_count'
6670 | while (atomic_read(&priv->device->power.usage_count) > 1)
| ^
include/linux/compiler.h:263:22: note: in definition of macro '__READ_ONCE'
263 | __read_once_size(&(x), __u.__c, sizeof(x)); \
| ^
arch/xtensa/include/asm/atomic.h:48:25: note: in expansion of macro
'READ_ONCE'
48 | #define atomic_read(v) READ_ONCE((v)->counter)
| ^~~~~~~~~
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:6670:10: note: in expansion of macro
'atomic_read'
6670 | while (atomic_read(&priv->device->power.usage_count) > 1)
| ^~~~~~~~~~~
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:6670:42: error: 'struct
dev_pm_info' has no member named 'usage_count'
6670 | while (atomic_read(&priv->device->power.usage_count) > 1)
| ^
include/linux/compiler.h:263:42: note: in definition of macro '__READ_ONCE'
263 | __read_once_size(&(x), __u.__c, sizeof(x)); \
| ^
arch/xtensa/include/asm/atomic.h:48:25: note: in expansion of macro
'READ_ONCE'
48 | #define atomic_read(v) READ_ONCE((v)->counter)
| ^~~~~~~~~
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:6670:10: note: in expansion of macro
'atomic_read'
6670 | while (atomic_read(&priv->device->power.usage_count) > 1)
| ^~~~~~~~~~~
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:6670:42: error: 'struct
dev_pm_info' has no member named 'usage_count'
6670 | while (atomic_read(&priv->device->power.usage_count) > 1)
| ^
include/linux/compiler.h:265:30: note: in definition of macro '__READ_ONCE'
265 | __read_once_size_nocheck(&(x), __u.__c, sizeof(x)); \
| ^
arch/xtensa/include/asm/atomic.h:48:25: note: in expansion of macro
'READ_ONCE'
48 | #define atomic_read(v) READ_ONCE((v)->counter)
| ^~~~~~~~~
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:6670:10: note: in expansion of macro
'atomic_read'
6670 | while (atomic_read(&priv->device->power.usage_count) > 1)
| ^~~~~~~~~~~
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:6670:42: error: 'struct
dev_pm_info' has no member named 'usage_count'
6670 | while (atomic_read(&priv->device->power.usage_count) > 1)
| ^
include/linux/compiler.h:265:50: note: in definition of macro '__READ_ONCE'
265 | __read_once_size_nocheck(&(x), __u.__c, sizeof(x)); \
| ^
arch/xtensa/include/asm/atomic.h:48:25: note: in expansion of macro
'READ_ONCE'
48 | #define atomic_read(v) READ_ONCE((v)->counter)
| ^~~~~~~~~
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:6670:10: note: in expansion of macro
'atomic_read'
6670 | while (atomic_read(&priv->device->power.usage_count) > 1)
| ^~~~~~~~~~~
#
https://github.com/intel/linux-intel-lts/commit/1455d4a9ab51d8fb4262402a5...
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 1455d4a9ab51d8fb4262402a5135b1277b8bc4cc
vim +6666 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
6662
6663 /* To support runtime PM, we need to make sure usage_count is equal to 0
6664 * when runtime_auto flag is set. Otherwise, it should be equal to 1.
6665 */
6666 if (priv->device->power.runtime_auto) {
6667 while (atomic_read(&priv->device->power.usage_count) > 0)
6668 pm_runtime_put_noidle(device);
6669 } else {
6670 while (atomic_read(&priv->device->power.usage_count) > 1)
6671 pm_runtime_put_noidle(device);
6672 }
6673
6674 return ret;
6675
6676 error_netdev_register:
6677 phylink_destroy(priv->phylink);
6678 error_phy_setup:
6679 if (priv->hw->pcs != STMMAC_PCS_RGMII &&
6680 priv->hw->pcs != STMMAC_PCS_TBI &&
6681 priv->hw->pcs != STMMAC_PCS_RTBI)
6682 stmmac_mdio_unregister(ndev);
6683 error_mdio_register:
6684 stmmac_napi_del(ndev);
6685
6686 error_hw_init:
6687 destroy_workqueue(priv->wq);
6688
6689 return ret;
6690 }
6691 EXPORT_SYMBOL_GPL(stmmac_dvr_probe);
6692
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org