2022-09-18 01:47:32

by kernel test robot

[permalink] [raw]
Subject: sunplus-uart.c:undefined reference to `uart_suspend_port'

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: a335366bad1364a07f49df9da1fdfa6d411a5f39
commit: 0aa94eea8d955c82014e5368a843da93f1dc58f8 ARM: sunplus: Add initial support for Sunplus SP7021 SoC
date: 2 months ago
config: arm-buildonly-randconfig-r002-20220918
compiler: arm-linux-gnueabi-gcc (GCC) 12.1.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/torvalds/linux.git/commit/?id=0aa94eea8d955c82014e5368a843da93f1dc58f8
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 0aa94eea8d955c82014e5368a843da93f1dc58f8
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <[email protected]>

All errors (new ones prefixed by >>):

arm-linux-gnueabi-ld: drivers/tty/serial/sunplus-uart.o: in function `sunplus_uart_suspend':
>> sunplus-uart.c:(.text+0x2a4): undefined reference to `uart_suspend_port'
arm-linux-gnueabi-ld: drivers/tty/serial/sunplus-uart.o: in function `sunplus_uart_resume':
>> sunplus-uart.c:(.text+0x2f8): undefined reference to `uart_resume_port'
arm-linux-gnueabi-ld: drivers/tty/serial/sunplus-uart.o: in function `sunplus_uart_remove':
>> sunplus-uart.c:(.text+0x34c): undefined reference to `uart_remove_one_port'
arm-linux-gnueabi-ld: drivers/tty/serial/sunplus-uart.o: in function `sunplus_set_termios':
>> sunplus-uart.c:(.text+0x83c): undefined reference to `uart_get_baud_rate'
>> arm-linux-gnueabi-ld: sunplus-uart.c:(.text+0x948): undefined reference to `uart_update_timeout'
arm-linux-gnueabi-ld: drivers/tty/serial/sunplus-uart.o: in function `receive_chars':
>> sunplus-uart.c:(.text+0xfa8): undefined reference to `uart_insert_char'
>> arm-linux-gnueabi-ld: sunplus-uart.c:(.text+0x1030): undefined reference to `tty_flip_buffer_push'
>> arm-linux-gnueabi-ld: sunplus-uart.c:(.text+0x1174): undefined reference to `uart_try_toggle_sysrq'
>> arm-linux-gnueabi-ld: sunplus-uart.c:(.text+0x132c): undefined reference to `do_SAK'
arm-linux-gnueabi-ld: drivers/tty/serial/sunplus-uart.o: in function `sunplus_console_write':
>> sunplus-uart.c:(.text+0x1518): undefined reference to `uart_console_write'
>> arm-linux-gnueabi-ld: sunplus-uart.c:(.text+0x1604): undefined reference to `uart_console_write'
arm-linux-gnueabi-ld: sunplus-uart.c:(.text+0x172c): undefined reference to `uart_console_write'
arm-linux-gnueabi-ld: drivers/tty/serial/sunplus-uart.o: in function `sunplus_uart_probe':
>> sunplus-uart.c:(.text+0x2290): undefined reference to `uart_add_one_port'
arm-linux-gnueabi-ld: drivers/tty/serial/sunplus-uart.o: in function `sunplus_uart_irq':
>> sunplus-uart.c:(.text+0x28ec): undefined reference to `uart_write_wakeup'
>> arm-linux-gnueabi-ld: drivers/tty/serial/sunplus-uart.o:(.data+0x118): undefined reference to `uart_console_device'
arm-linux-gnueabi-ld: drivers/tty/serial/sunplus-uart.o: in function `sunplus_uart_init':
>> sunplus-uart.c:(.init.text+0x24): undefined reference to `uart_register_driver'
>> arm-linux-gnueabi-ld: sunplus-uart.c:(.init.text+0x6c): undefined reference to `uart_unregister_driver'
arm-linux-gnueabi-ld: drivers/tty/serial/sunplus-uart.o: in function `sunplus_console_setup':
>> sunplus-uart.c:(.init.text+0x25c): undefined reference to `uart_parse_options'
>> arm-linux-gnueabi-ld: sunplus-uart.c:(.init.text+0x28c): undefined reference to `uart_set_options'
arm-linux-gnueabi-ld: drivers/tty/serial/sunplus-uart.o: in function `sunplus_uart_exit':
>> sunplus-uart.c:(.exit.text+0x1c): undefined reference to `uart_unregister_driver'

Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for TEGRA20_APB_DMA
Depends on [n]: DMADEVICES [=n] && (ARCH_TEGRA [=y] || COMPILE_TEST [=y])
Selected by [y]:
- SOC_TEGRA_FUSE [=y] && ARCH_TEGRA [=y] && ARCH_TEGRA_2x_SOC [=y]
WARNING: unmet direct dependencies detected for SERIAL_SUNPLUS
Depends on [n]: TTY [=n] && HAS_IOMEM [=y] && (ARCH_SUNPLUS [=y] || COMPILE_TEST [=y])
Selected by [y]:
- SOC_SP7021 [=y] && ARCH_SUNPLUS [=y]
WARNING: unmet direct dependencies detected for SERIAL_SUNPLUS_CONSOLE
Depends on [n]: TTY [=n] && HAS_IOMEM [=y] && SERIAL_SUNPLUS [=y]
Selected by [y]:
- SOC_SP7021 [=y] && ARCH_SUNPLUS [=y]

--
0-DAY CI Kernel Test Service
https://01.org/lkp


Attachments:
(No filename) (4.73 kB)
config (161.78 kB)
Download all attachments

2022-09-18 06:16:43

by Randy Dunlap

[permalink] [raw]
Subject: Re: sunplus-uart.c:undefined reference to `uart_suspend_port'

Arnd, Qin Jian,

Fix is here:
https://lore.kernel.org/lkml/[email protected]/


On 9/17/22 18:38, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: a335366bad1364a07f49df9da1fdfa6d411a5f39
> commit: 0aa94eea8d955c82014e5368a843da93f1dc58f8 ARM: sunplus: Add initial support for Sunplus SP7021 SoC
> date: 2 months ago
> config: arm-buildonly-randconfig-r002-20220918
> compiler: arm-linux-gnueabi-gcc (GCC) 12.1.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/torvalds/linux.git/commit/?id=0aa94eea8d955c82014e5368a843da93f1dc58f8
> git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> git fetch --no-tags linus master
> git checkout 0aa94eea8d955c82014e5368a843da93f1dc58f8
> # save the config file
> mkdir build_dir && cp config build_dir/.config
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash
>
> If you fix the issue, kindly add following tag where applicable
> Reported-by: kernel test robot <[email protected]>
>
> All errors (new ones prefixed by >>):
>
> arm-linux-gnueabi-ld: drivers/tty/serial/sunplus-uart.o: in function `sunplus_uart_suspend':
>>> sunplus-uart.c:(.text+0x2a4): undefined reference to `uart_suspend_port'
> arm-linux-gnueabi-ld: drivers/tty/serial/sunplus-uart.o: in function `sunplus_uart_resume':
>>> sunplus-uart.c:(.text+0x2f8): undefined reference to `uart_resume_port'
> arm-linux-gnueabi-ld: drivers/tty/serial/sunplus-uart.o: in function `sunplus_uart_remove':
>>> sunplus-uart.c:(.text+0x34c): undefined reference to `uart_remove_one_port'
> arm-linux-gnueabi-ld: drivers/tty/serial/sunplus-uart.o: in function `sunplus_set_termios':
>>> sunplus-uart.c:(.text+0x83c): undefined reference to `uart_get_baud_rate'
>>> arm-linux-gnueabi-ld: sunplus-uart.c:(.text+0x948): undefined reference to `uart_update_timeout'
> arm-linux-gnueabi-ld: drivers/tty/serial/sunplus-uart.o: in function `receive_chars':
>>> sunplus-uart.c:(.text+0xfa8): undefined reference to `uart_insert_char'
>>> arm-linux-gnueabi-ld: sunplus-uart.c:(.text+0x1030): undefined reference to `tty_flip_buffer_push'
>>> arm-linux-gnueabi-ld: sunplus-uart.c:(.text+0x1174): undefined reference to `uart_try_toggle_sysrq'
>>> arm-linux-gnueabi-ld: sunplus-uart.c:(.text+0x132c): undefined reference to `do_SAK'
> arm-linux-gnueabi-ld: drivers/tty/serial/sunplus-uart.o: in function `sunplus_console_write':
>>> sunplus-uart.c:(.text+0x1518): undefined reference to `uart_console_write'
>>> arm-linux-gnueabi-ld: sunplus-uart.c:(.text+0x1604): undefined reference to `uart_console_write'
> arm-linux-gnueabi-ld: sunplus-uart.c:(.text+0x172c): undefined reference to `uart_console_write'
> arm-linux-gnueabi-ld: drivers/tty/serial/sunplus-uart.o: in function `sunplus_uart_probe':
>>> sunplus-uart.c:(.text+0x2290): undefined reference to `uart_add_one_port'
> arm-linux-gnueabi-ld: drivers/tty/serial/sunplus-uart.o: in function `sunplus_uart_irq':
>>> sunplus-uart.c:(.text+0x28ec): undefined reference to `uart_write_wakeup'
>>> arm-linux-gnueabi-ld: drivers/tty/serial/sunplus-uart.o:(.data+0x118): undefined reference to `uart_console_device'
> arm-linux-gnueabi-ld: drivers/tty/serial/sunplus-uart.o: in function `sunplus_uart_init':
>>> sunplus-uart.c:(.init.text+0x24): undefined reference to `uart_register_driver'
>>> arm-linux-gnueabi-ld: sunplus-uart.c:(.init.text+0x6c): undefined reference to `uart_unregister_driver'
> arm-linux-gnueabi-ld: drivers/tty/serial/sunplus-uart.o: in function `sunplus_console_setup':
>>> sunplus-uart.c:(.init.text+0x25c): undefined reference to `uart_parse_options'
>>> arm-linux-gnueabi-ld: sunplus-uart.c:(.init.text+0x28c): undefined reference to `uart_set_options'
> arm-linux-gnueabi-ld: drivers/tty/serial/sunplus-uart.o: in function `sunplus_uart_exit':
>>> sunplus-uart.c:(.exit.text+0x1c): undefined reference to `uart_unregister_driver'
>
> Kconfig warnings: (for reference only)

Root cause!

> WARNING: unmet direct dependencies detected for TEGRA20_APB_DMA
> Depends on [n]: DMADEVICES [=n] && (ARCH_TEGRA [=y] || COMPILE_TEST [=y])
> Selected by [y]:
> - SOC_TEGRA_FUSE [=y] && ARCH_TEGRA [=y] && ARCH_TEGRA_2x_SOC [=y]
> WARNING: unmet direct dependencies detected for SERIAL_SUNPLUS
> Depends on [n]: TTY [=n] && HAS_IOMEM [=y] && (ARCH_SUNPLUS [=y] || COMPILE_TEST [=y])
> Selected by [y]:
> - SOC_SP7021 [=y] && ARCH_SUNPLUS [=y]
> WARNING: unmet direct dependencies detected for SERIAL_SUNPLUS_CONSOLE
> Depends on [n]: TTY [=n] && HAS_IOMEM [=y] && SERIAL_SUNPLUS [=y]
> Selected by [y]:
> - SOC_SP7021 [=y] && ARCH_SUNPLUS [=y]
>

--
~Randy

2022-09-23 19:50:23

by Arnd Bergmann

[permalink] [raw]
Subject: Re: sunplus-uart.c:undefined reference to `uart_suspend_port'

On Sun, Sep 18, 2022, at 7:22 AM, Randy Dunlap wrote:
> Arnd, Qin Jian,
>
> Fix is here:
> https://lore.kernel.org/lkml/[email protected]/

I picked up the patch now. I was debating whether we should just remove
the 'select' entirely and handle this using the defconfig as we do
for most other platforms, but your patch is the easier fix, and
I didn't want to risk getting it wrong if I rush in a different fix
before 6.0.

Arnd