tree:
https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git queue-4.9
head: 397027034d454e3ad94e49e88938860ee15d7de6
commit: 2d843653785d83e84dd658e7ca9643ae0a42aaa5 [100/170] serial: stm32: fix tx_empty
condition
config: nios2-allyesconfig (attached as .config)
compiler: nios2-linux-gcc (GCC) 7.5.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://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git/c...
git remote add sashal-linux-stable
https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git
git fetch --no-tags sashal-linux-stable queue-4.9
git checkout 2d843653785d83e84dd658e7ca9643ae0a42aaa5
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-7.5.0 make.cross W=1 ARCH=nios2
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:4:0,
from include/linux/clk.h:15,
from drivers/tty/serial/stm32-usart.c:14:
include/linux/scatterlist.h: In function 'sg_set_buf':
arch/nios2/include/asm/page.h:90:33: warning: comparison of unsigned expression >= 0
is always true [-Wtype-limits]
# define pfn_valid(pfn) ((pfn) >= ARCH_PFN_OFFSET && \
^
include/linux/compiler.h:184:42: note: in definition of macro 'unlikely'
# define unlikely(x) __builtin_expect(!!(x), 0)
^
include/linux/scatterlist.h:140:2: note: in expansion of macro 'BUG_ON'
BUG_ON(!virt_addr_valid(buf));
^~~~~~
arch/nios2/include/asm/page.h:94:33: note: in expansion of macro 'pfn_valid'
# define virt_addr_valid(vaddr) pfn_valid(PFN_DOWN(virt_to_phys(vaddr)))
^~~~~~~~~
include/linux/scatterlist.h:140:10: note: in expansion of macro
'virt_addr_valid'
BUG_ON(!virt_addr_valid(buf));
^~~~~~~~~~~~~~~
include/linux/dma-mapping.h: In function 'dma_map_resource':
arch/nios2/include/asm/page.h:90:33: warning: comparison of unsigned expression >= 0
is always true [-Wtype-limits]
# define pfn_valid(pfn) ((pfn) >= ARCH_PFN_OFFSET && \
^
include/linux/compiler.h:184:42: note: in definition of macro 'unlikely'
# define unlikely(x) __builtin_expect(!!(x), 0)
^
include/linux/dma-mapping.h:284:2: note: in expansion of macro 'BUG_ON'
BUG_ON(pfn_valid(PHYS_PFN(phys_addr)));
^~~~~~
include/linux/dma-mapping.h:284:9: note: in expansion of macro 'pfn_valid'
BUG_ON(pfn_valid(PHYS_PFN(phys_addr)));
^~~~~~~~~
drivers/tty/serial/stm32-usart.c: In function 'stm32_tx_dma_complete':
> drivers/tty/serial/stm32-usart.c:180:34: error:
'USART_CR_TC' undeclared (first use in this function); did you mean
'USART_SR_TC'?
stm32_set_bits(port, ofs->icr, USART_CR_TC);
^~~~~~~~~~~
USART_SR_TC
drivers/tty/serial/stm32-usart.c:180:34: note: each undeclared identifier is reported
only once for each function it appears in
drivers/tty/serial/stm32-usart.c: In function 'stm32_transmit_chars_dma':
drivers/tty/serial/stm32-usart.c:223:15: warning: variable 'cookie' set but not
used [-Wunused-but-set-variable]
dma_cookie_t cookie;
^~~~~~
drivers/tty/serial/stm32-usart.c: In function 'stm32_of_dma_rx_probe':
drivers/tty/serial/stm32-usart.c:736:15: warning: variable 'cookie' set but not
used [-Wunused-but-set-variable]
dma_cookie_t cookie;
^~~~~~
vim +180 drivers/tty/serial/stm32-usart.c
48a6092fb41fab Maxime Coquelin 2015-06-10 160
3489187204eb75 Alexandre TORGUE 2016-09-15 161 static void stm32_tx_dma_complete(void
*arg)
3489187204eb75 Alexandre TORGUE 2016-09-15 162 {
3489187204eb75 Alexandre TORGUE 2016-09-15 163 struct uart_port *port = arg;
3489187204eb75 Alexandre TORGUE 2016-09-15 164 struct stm32_port *stm32port =
to_stm32_port(port);
3489187204eb75 Alexandre TORGUE 2016-09-15 165 struct stm32_usart_offsets *ofs =
&stm32port->info->ofs;
3489187204eb75 Alexandre TORGUE 2016-09-15 166 unsigned int isr;
3489187204eb75 Alexandre TORGUE 2016-09-15 167 int ret;
3489187204eb75 Alexandre TORGUE 2016-09-15 168
3489187204eb75 Alexandre TORGUE 2016-09-15 169 ret =
readl_relaxed_poll_timeout_atomic(port->membase + ofs->isr,
3489187204eb75 Alexandre TORGUE 2016-09-15 170 isr,
3489187204eb75 Alexandre TORGUE 2016-09-15 171 (isr & USART_SR_TC),
3489187204eb75 Alexandre TORGUE 2016-09-15 172 10, 100000);
3489187204eb75 Alexandre TORGUE 2016-09-15 173
3489187204eb75 Alexandre TORGUE 2016-09-15 174 if (ret)
3489187204eb75 Alexandre TORGUE 2016-09-15 175 dev_err(port->dev, "terminal
count not set\n");
3489187204eb75 Alexandre TORGUE 2016-09-15 176
3489187204eb75 Alexandre TORGUE 2016-09-15 177 if (ofs->icr == UNDEF_REG)
3489187204eb75 Alexandre TORGUE 2016-09-15 178 stm32_clr_bits(port, ofs->isr,
USART_SR_TC);
3489187204eb75 Alexandre TORGUE 2016-09-15 179 else
3489187204eb75 Alexandre TORGUE 2016-09-15 @180 stm32_set_bits(port, ofs->icr,
USART_CR_TC);
3489187204eb75 Alexandre TORGUE 2016-09-15 181
3489187204eb75 Alexandre TORGUE 2016-09-15 182 stm32_clr_bits(port, ofs->cr3,
USART_CR3_DMAT);
3489187204eb75 Alexandre TORGUE 2016-09-15 183 stm32port->tx_dma_busy = false;
3489187204eb75 Alexandre TORGUE 2016-09-15 184
3489187204eb75 Alexandre TORGUE 2016-09-15 185 /* Let's see if we have pending data
to send */
3489187204eb75 Alexandre TORGUE 2016-09-15 186 stm32_transmit_chars(port);
3489187204eb75 Alexandre TORGUE 2016-09-15 187 }
3489187204eb75 Alexandre TORGUE 2016-09-15 188
:::::: The code at line 180 was first introduced by commit
:::::: 3489187204eb75e5635d8836babfd0a18be613f4 serial: stm32: adding dma support
:::::: TO: Alexandre TORGUE <alexandre.torgue(a)st.com>
:::::: CC: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org