* [linux-next:master 2519/4500] ucsi.c:undefined reference to `fwnode_usb_role_switch_get'
@ 2021-01-18 10:52 kernel test robot
2021-01-18 20:40 ` Jack Pham
0 siblings, 1 reply; 4+ messages in thread
From: kernel test robot @ 2021-01-18 10:52 UTC (permalink / raw)
To: Mayank Rana
Cc: kbuild-all, Linux Memory Management List, Greg Kroah-Hartman,
Heikki Krogerus, Jack Pham
[-- Attachment #1: Type: text/plain, Size: 2371 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 93bf8b946e5f9a0b0c68155597b53fd8ccce2827
commit: 89795852c9c46b9b0701f7376d30a1c5ab4d146c [2519/4500] usb: typec: ucsi: Add support for USB role switch
config: nios2-randconfig-m031-20210118 (attached as .config)
compiler: nios2-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://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=89795852c9c46b9b0701f7376d30a1c5ab4d146c
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout 89795852c9c46b9b0701f7376d30a1c5ab4d146c
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nios2
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 >>):
nios2-linux-ld: drivers/usb/typec/ucsi/ucsi.o: in function `ucsi_register_port':
>> ucsi.c:(.text+0x15a8): undefined reference to `fwnode_usb_role_switch_get'
ucsi.c:(.text+0x15a8): relocation truncated to fit: R_NIOS2_CALL26 against `fwnode_usb_role_switch_get'
>> nios2-linux-ld: ucsi.c:(.text+0x15e8): undefined reference to `usb_role_switch_set_role'
ucsi.c:(.text+0x15e8): relocation truncated to fit: R_NIOS2_CALL26 against `usb_role_switch_set_role'
nios2-linux-ld: drivers/usb/typec/ucsi/ucsi.o: in function `ucsi_handle_connector_change':
>> ucsi.c:(.text+0x1b50): undefined reference to `usb_role_switch_set_role'
ucsi.c:(.text+0x1b50): relocation truncated to fit: R_NIOS2_CALL26 against `usb_role_switch_set_role'
nios2-linux-ld: ucsi.c:(.text+0x1c28): undefined reference to `usb_role_switch_set_role'
ucsi.c:(.text+0x1c28): relocation truncated to fit: R_NIOS2_CALL26 against `usb_role_switch_set_role'
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for SERIAL_CORE_CONSOLE
Depends on TTY && HAS_IOMEM
Selected by
- EARLY_PRINTK
---
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: 25665 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [linux-next:master 2519/4500] ucsi.c:undefined reference to `fwnode_usb_role_switch_get'
2021-01-18 10:52 [linux-next:master 2519/4500] ucsi.c:undefined reference to `fwnode_usb_role_switch_get' kernel test robot
@ 2021-01-18 20:40 ` Jack Pham
2021-01-19 2:44 ` Randy Dunlap
2021-01-19 8:30 ` Heikki Krogerus
0 siblings, 2 replies; 4+ messages in thread
From: Jack Pham @ 2021-01-18 20:40 UTC (permalink / raw)
To: kernel test robot, Greg Kroah-Hartman, Heikki Krogerus
Cc: Mayank Rana, kbuild-all, Linux Memory Management List
On Mon, Jan 18, 2021 at 06:52:23PM +0800, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head: 93bf8b946e5f9a0b0c68155597b53fd8ccce2827
> commit: 89795852c9c46b9b0701f7376d30a1c5ab4d146c [2519/4500] usb: typec: ucsi: Add support for USB role switch
> config: nios2-randconfig-m031-20210118 (attached as .config)
> compiler: nios2-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://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=89795852c9c46b9b0701f7376d30a1c5ab4d146c
> git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
> git fetch --no-tags linux-next master
> git checkout 89795852c9c46b9b0701f7376d30a1c5ab4d146c
> # save the attached .config to linux build tree
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nios2
>
> 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 >>):
>
> nios2-linux-ld: drivers/usb/typec/ucsi/ucsi.o: in function `ucsi_register_port':
> >> ucsi.c:(.text+0x15a8): undefined reference to `fwnode_usb_role_switch_get'
> ucsi.c:(.text+0x15a8): relocation truncated to fit: R_NIOS2_CALL26 against `fwnode_usb_role_switch_get'
> >> nios2-linux-ld: ucsi.c:(.text+0x15e8): undefined reference to `usb_role_switch_set_role'
> ucsi.c:(.text+0x15e8): relocation truncated to fit: R_NIOS2_CALL26 against `usb_role_switch_set_role'
> nios2-linux-ld: drivers/usb/typec/ucsi/ucsi.o: in function `ucsi_handle_connector_change':
> >> ucsi.c:(.text+0x1b50): undefined reference to `usb_role_switch_set_role'
> ucsi.c:(.text+0x1b50): relocation truncated to fit: R_NIOS2_CALL26 against `usb_role_switch_set_role'
> nios2-linux-ld: ucsi.c:(.text+0x1c28): undefined reference to `usb_role_switch_set_role'
> ucsi.c:(.text+0x1c28): relocation truncated to fit: R_NIOS2_CALL26 against `usb_role_switch_set_role'
>
> Kconfig warnings: (for reference only)
> WARNING: unmet direct dependencies detected for SERIAL_CORE_CONSOLE
> Depends on TTY && HAS_IOMEM
> Selected by
> - EARLY_PRINTK
>
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
I have no clue about the nios2, so not sure if this is an arch-specific
linker error or not.
Hmm but the .config has the following:
CONFIG_TYPEC_UCSI=y
CONFIG_USB_ROLE_SWITCH=m
So I'm guessing this patch also requires a Kconfig change to disallow
the above combination? If so, should UCSI have a "depends" or a "select"
on USB_ROLE_SWITCH?
Jack
--
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [linux-next:master 2519/4500] ucsi.c:undefined reference to `fwnode_usb_role_switch_get'
2021-01-18 20:40 ` Jack Pham
@ 2021-01-19 2:44 ` Randy Dunlap
2021-01-19 8:30 ` Heikki Krogerus
1 sibling, 0 replies; 4+ messages in thread
From: Randy Dunlap @ 2021-01-19 2:44 UTC (permalink / raw)
To: Jack Pham, kernel test robot, Greg Kroah-Hartman, Heikki Krogerus
Cc: Mayank Rana, kbuild-all, Linux Memory Management List, USB list
[adding linux-usb list]
On 1/18/21 12:40 PM, Jack Pham wrote:
> On Mon, Jan 18, 2021 at 06:52:23PM +0800, kernel test robot wrote:
>> tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
>> head: 93bf8b946e5f9a0b0c68155597b53fd8ccce2827
>> commit: 89795852c9c46b9b0701f7376d30a1c5ab4d146c [2519/4500] usb: typec: ucsi: Add support for USB role switch
>> config: nios2-randconfig-m031-20210118 (attached as .config)
>> compiler: nios2-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://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=89795852c9c46b9b0701f7376d30a1c5ab4d146c
>> git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
>> git fetch --no-tags linux-next master
>> git checkout 89795852c9c46b9b0701f7376d30a1c5ab4d146c
>> # save the attached .config to linux build tree
>> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nios2
>>
>> 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 >>):
>>
>> nios2-linux-ld: drivers/usb/typec/ucsi/ucsi.o: in function `ucsi_register_port':
>>>> ucsi.c:(.text+0x15a8): undefined reference to `fwnode_usb_role_switch_get'
>> ucsi.c:(.text+0x15a8): relocation truncated to fit: R_NIOS2_CALL26 against `fwnode_usb_role_switch_get'
>>>> nios2-linux-ld: ucsi.c:(.text+0x15e8): undefined reference to `usb_role_switch_set_role'
>> ucsi.c:(.text+0x15e8): relocation truncated to fit: R_NIOS2_CALL26 against `usb_role_switch_set_role'
>> nios2-linux-ld: drivers/usb/typec/ucsi/ucsi.o: in function `ucsi_handle_connector_change':
>>>> ucsi.c:(.text+0x1b50): undefined reference to `usb_role_switch_set_role'
>> ucsi.c:(.text+0x1b50): relocation truncated to fit: R_NIOS2_CALL26 against `usb_role_switch_set_role'
>> nios2-linux-ld: ucsi.c:(.text+0x1c28): undefined reference to `usb_role_switch_set_role'
>> ucsi.c:(.text+0x1c28): relocation truncated to fit: R_NIOS2_CALL26 against `usb_role_switch_set_role'
>>
>> Kconfig warnings: (for reference only)
>> WARNING: unmet direct dependencies detected for SERIAL_CORE_CONSOLE
>> Depends on TTY && HAS_IOMEM
>> Selected by
>> - EARLY_PRINTK
>>
>> ---
>> 0-DAY CI Kernel Test Service, Intel Corporation
>> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
>
> I have no clue about the nios2, so not sure if this is an arch-specific
> linker error or not.
>
> Hmm but the .config has the following:
>
> CONFIG_TYPEC_UCSI=y
> CONFIG_USB_ROLE_SWITCH=m
>
> So I'm guessing this patch also requires a Kconfig change to disallow
> the above combination? If so, should UCSI have a "depends" or a "select"
> on USB_ROLE_SWITCH?
Hm, there is certainly a mixture of depends and selects in the kernel source
tree. I would say "depends", based on Documentation/kbuild/kconfig-language.rst:
("->" added for emphasis)
Note:
select should be used with care. select will force
a symbol to a value without visiting the dependencies.
By abusing select you are able to select a symbol FOO even
if FOO depends on BAR that is not set.
-> In general use select only for non-visible symbols
-> (no prompts anywhere) and for symbols with no dependencies.
That will limit the usefulness but on the other hand avoid
the illegal configurations all over.
--
~Randy
You can't do anything without having to do something else first.
-- Belefant's Law
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [linux-next:master 2519/4500] ucsi.c:undefined reference to `fwnode_usb_role_switch_get'
2021-01-18 20:40 ` Jack Pham
2021-01-19 2:44 ` Randy Dunlap
@ 2021-01-19 8:30 ` Heikki Krogerus
1 sibling, 0 replies; 4+ messages in thread
From: Heikki Krogerus @ 2021-01-19 8:30 UTC (permalink / raw)
To: Jack Pham
Cc: kernel test robot, Greg Kroah-Hartman, Mayank Rana, kbuild-all,
Linux Memory Management List
On Mon, Jan 18, 2021 at 12:40:40PM -0800, Jack Pham wrote:
> On Mon, Jan 18, 2021 at 06:52:23PM +0800, kernel test robot wrote:
> > tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> > head: 93bf8b946e5f9a0b0c68155597b53fd8ccce2827
> > commit: 89795852c9c46b9b0701f7376d30a1c5ab4d146c [2519/4500] usb: typec: ucsi: Add support for USB role switch
> > config: nios2-randconfig-m031-20210118 (attached as .config)
> > compiler: nios2-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://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=89795852c9c46b9b0701f7376d30a1c5ab4d146c
> > git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
> > git fetch --no-tags linux-next master
> > git checkout 89795852c9c46b9b0701f7376d30a1c5ab4d146c
> > # save the attached .config to linux build tree
> > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nios2
> >
> > 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 >>):
> >
> > nios2-linux-ld: drivers/usb/typec/ucsi/ucsi.o: in function `ucsi_register_port':
> > >> ucsi.c:(.text+0x15a8): undefined reference to `fwnode_usb_role_switch_get'
> > ucsi.c:(.text+0x15a8): relocation truncated to fit: R_NIOS2_CALL26 against `fwnode_usb_role_switch_get'
> > >> nios2-linux-ld: ucsi.c:(.text+0x15e8): undefined reference to `usb_role_switch_set_role'
> > ucsi.c:(.text+0x15e8): relocation truncated to fit: R_NIOS2_CALL26 against `usb_role_switch_set_role'
> > nios2-linux-ld: drivers/usb/typec/ucsi/ucsi.o: in function `ucsi_handle_connector_change':
> > >> ucsi.c:(.text+0x1b50): undefined reference to `usb_role_switch_set_role'
> > ucsi.c:(.text+0x1b50): relocation truncated to fit: R_NIOS2_CALL26 against `usb_role_switch_set_role'
> > nios2-linux-ld: ucsi.c:(.text+0x1c28): undefined reference to `usb_role_switch_set_role'
> > ucsi.c:(.text+0x1c28): relocation truncated to fit: R_NIOS2_CALL26 against `usb_role_switch_set_role'
> >
> > Kconfig warnings: (for reference only)
> > WARNING: unmet direct dependencies detected for SERIAL_CORE_CONSOLE
> > Depends on TTY && HAS_IOMEM
> > Selected by
> > - EARLY_PRINTK
> >
> > ---
> > 0-DAY CI Kernel Test Service, Intel Corporation
> > https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
>
> I have no clue about the nios2, so not sure if this is an arch-specific
> linker error or not.
>
> Hmm but the .config has the following:
>
> CONFIG_TYPEC_UCSI=y
> CONFIG_USB_ROLE_SWITCH=m
>
> So I'm guessing this patch also requires a Kconfig change to disallow
> the above combination? If so, should UCSI have a "depends" or a "select"
> on USB_ROLE_SWITCH?
Kconfig needs to prevent the UCSI driver from being built-in when the
USB Role Switch Class is being build as module. That can be achieved
with this trick (it's not ideal, but it works):
depends on USB_ROLE_SWITCH || !USB_ROLE_SWITCH
I'll send the fix.
thanks,
--
heikki
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-01-19 8:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-18 10:52 [linux-next:master 2519/4500] ucsi.c:undefined reference to `fwnode_usb_role_switch_get' kernel test robot
2021-01-18 20:40 ` Jack Pham
2021-01-19 2:44 ` Randy Dunlap
2021-01-19 8:30 ` Heikki Krogerus
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox