tree:
https://android.googlesource.com/kernel/common android-3.18
head: 4ab5ed1b2426544d8c587343973654305580d2f7
commit: e6987658af51adc475e3769d466a739d753134bd [143/170] tty/serial: atmel: RS485 HD
w/DMA: enable RX after TX is stopped
config: arm-at91_dt_defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 5.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
git remote add android-common
https://android.googlesource.com/kernel/common
git fetch --no-tags android-common android-3.18
git checkout e6987658af51adc475e3769d466a739d753134bd
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-5.5.0 make.cross ARCH=arm
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/dma-mapping.h:82:0,
from drivers/tty/serial/atmel_serial.c:39:
arch/arm/include/asm/dma-mapping.h: In function 'dma_mapping_error':
arch/arm/include/asm/dma-mapping.h:170:18: warning: comparison between signed and
unsigned integer expressions [-Wsign-compare]
return dma_addr == DMA_ERROR_CODE;
^
drivers/tty/serial/atmel_serial.c: At top level:
drivers/tty/serial/atmel_serial.c:296:6: warning: no previous declaration for
'atmel_config_rs485' [-Wmissing-declarations]
void atmel_config_rs485(struct uart_port *port, struct serial_rs485 *rs485conf)
^
drivers/tty/serial/atmel_serial.c: In function 'atmel_complete_tx_dma':
> drivers/tty/serial/atmel_serial.c:745:3: error: implicit
declaration of function 'atmel_uart_writel'
[-Werror=implicit-function-declaration]
atmel_uart_writel(port, ATMEL_US_IER,
^
drivers/tty/serial/atmel_serial.c: In function 'atmel_rx_from_dma':
drivers/tty/serial/atmel_serial.c:972:14: warning: comparison between signed and
unsigned integer expressions [-Wsign-compare]
if (pending > ring->head) {
^
drivers/tty/serial/atmel_serial.c:978:18: warning: comparison between signed and
unsigned integer expressions [-Wsign-compare]
if (ring->head == sg_dma_len(&atmel_port->sg_rx))
^
drivers/tty/serial/atmel_serial.c: In function 'atmel_handle_transmit':
> drivers/tty/serial/atmel_serial.c:1143:10: error: implicit
declaration of function 'atmel_uart_readl' [-Werror=implicit-function-declaration]
if (!(atmel_uart_readl(port, ATMEL_US_CSR)
^
drivers/tty/serial/atmel_serial.c: In function 'atmel_verify_port':
drivers/tty/serial/atmel_serial.c:2145:16: warning: comparison between signed and
unsigned integer expressions [-Wsign-compare]
if (port->irq != ser->irq)
^
drivers/tty/serial/atmel_serial.c:2149:25: warning: comparison between signed and
unsigned integer expressions [-Wsign-compare]
if (port->uartclk / 16 != ser->baud_base)
^
drivers/tty/serial/atmel_serial.c: In function 'atmel_is_console_port':
drivers/tty/serial/atmel_serial.c:2475:41: warning: comparison between signed and
unsigned integer expressions [-Wsign-compare]
return port->cons && port->cons->index == port->line;
^
cc1: some warnings being treated as errors
vim +/atmel_uart_writel +745 drivers/tty/serial/atmel_serial.c
708
709 static void atmel_complete_tx_dma(void *arg)
710 {
711 struct atmel_uart_port *atmel_port = arg;
712 struct uart_port *port = &atmel_port->uart;
713 struct circ_buf *xmit = &port->state->xmit;
714 struct dma_chan *chan = atmel_port->chan_tx;
715 unsigned long flags;
716
717 spin_lock_irqsave(&port->lock, flags);
718
719 if (chan)
720 dmaengine_terminate_all(chan);
721 xmit->tail += sg_dma_len(&atmel_port->sg_tx);
722 xmit->tail &= UART_XMIT_SIZE - 1;
723
724 port->icount.tx += sg_dma_len(&atmel_port->sg_tx);
725
726 spin_lock_irq(&atmel_port->lock_tx);
727 async_tx_ack(atmel_port->desc_tx);
728 atmel_port->cookie_tx = -EINVAL;
729 atmel_port->desc_tx = NULL;
730 spin_unlock_irq(&atmel_port->lock_tx);
731
732 if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
733 uart_write_wakeup(port);
734
735 /* Do we really need this? */
736 if (!uart_circ_empty(xmit))
737 tasklet_schedule(&atmel_port->tasklet);
738 else if ((atmel_port->rs485.flags & SER_RS485_ENABLED) &&
739 !(atmel_port->rs485.flags & SER_RS485_RX_DURING_TX)) {
740 /*
741 * DMA done, re-enable TXEMPTY and signal that we can stop
742 * TX and start RX for RS485
743 */
744 atmel_port->hd_start_rx = true;
745 atmel_uart_writel(port, ATMEL_US_IER,
746
atmel_port->tx_done_mask);
747 }
748
749 spin_unlock_irqrestore(&port->lock, flags);
750 }
751
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org