Bug 210047 - arm64: build error due to unmet dependency for PINCTRL_EXYNOS by ARCH_EXYNOS
Summary: arm64: build error due to unmet dependency for PINCTRL_EXYNOS by ARCH_EXYNOS
Status: NEW
Alias: None
Product: Platform Specific/Hardware
Classification: Unclassified
Component: ARM (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: linux-arm-kernel@lists.arm.linux.org.uk
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-11-04 15:45 UTC by Necip Fazil Yildiran
Modified: 2020-11-04 15:45 UTC (History)
4 users (show)

See Also:
Kernel Version: 5.4.4
Subsystem:
Regression: No
Bisected commit-id:


Attachments
reproduce.tar.gz (100.93 KB, application/gzip)
2020-11-04 15:45 UTC, Necip Fazil Yildiran
Details

Description Necip Fazil Yildiran 2020-11-04 15:45:00 UTC
Created attachment 293467 [details]
reproduce.tar.gz

Attachment (reproduce.tar.gz) content:
 - sample.config: Config file to reproduce the bug.
 - build_out.txt: Output of Kbuild including the error messages.

When ARCH_EXYNOS is enabled and GPIOLIB is disabled, it results in the
following Kbuild warning:

WARNING: unmet direct dependencies detected for PINCTRL_EXYNOS
  Depends on [n]: PINCTRL [=y] && OF [=y] && GPIOLIB [=n] && (ARCH_EXYNOS [=y] || ARCH_S5PV210)
  Selected by [y]:
  - ARCH_EXYNOS [=y]

Building the kernel fails due to this unmet direct dependency issue as follows:

[...]
  CC      drivers/pcmcia/socket_sysfs.o
drivers/phy/allwinner/phy-sun4i-usb.c: In function 'sun4i_usb_phy0_get_id_det':
drivers/phy/allwinner/phy-sun4i-usb.c:367:11: error: implicit declaration of function 'gpiod_get_value_cansleep'; did you mean 'gpio_get_value_cansleep'? [-Werror=implicit-function-declaration]
  367 |    return gpiod_get_value_cansleep(data->id_det_gpio);
      |           ^~~~~~~~~~~~~~~~~~~~~~~~
      |           gpio_get_value_cansleep
drivers/phy/allwinner/phy-sun4i-usb.c: In function 'sun4i_usb_phy_probe':
drivers/phy/allwinner/phy-sun4i-usb.c:706:22: error: implicit declaration of function 'devm_gpiod_get_optional'; did you mean 'devm_clk_get_optional'? [-Werror=implicit-function-declaration]
  706 |  data->id_det_gpio = devm_gpiod_get_optional(dev, "usb0_id_det",
      |                      ^~~~~~~~~~~~~~~~~~~~~~~
      |                      devm_clk_get_optional
drivers/phy/allwinner/phy-sun4i-usb.c:707:11: error: 'GPIOD_IN' undeclared (first use in this function); did you mean 'GPIOF_IN'?
  707 |           GPIOD_IN);
      |           ^~~~~~~~
      |           GPIOF_IN
drivers/phy/allwinner/phy-sun4i-usb.c:707:11: note: each undeclared identifier is reported only once for each function it appears in
drivers/phy/allwinner/phy-sun4i-usb.c:814:21: error: implicit declaration of function 'gpiod_to_irq'; did you mean 'gpio_to_irq'? [-Werror=implicit-function-declaration]
  814 |  data->id_det_irq = gpiod_to_irq(data->id_det_gpio);
      |                     ^~~~~~~~~~~~
      |                     gpio_to_irq
cc1: some warnings being treated as errors
scripts/Makefile.build:265: recipe for target 'drivers/phy/allwinner/phy-sun4i-usb.o' failed
make[3]: *** [drivers/phy/allwinner/phy-sun4i-usb.o] Error 1
[...]

Steps to reproduce the bug for v5.4.4:
  1. wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
  2. chmod +x ~/bin/make.cross
  3. tar -xvf reproduce.tar.gz # sample.config and build_out.txt
  4. cp sample.config path/to/linux-source-v5.4.4/.config
  5. cd path/to/linux-source-v5.4.4/
  6. ~/bin/make.cross ARCH=arm64 clean
  7. ~/bin/make.cross ARCH=arm64 olddefconfig # unmet direct dependency warning
  8. ~/bin/make.cross ARCH=arm64 # should have a build error

The output for the steps [6-8] can be found in build_out.txt.

Thanks,
Necip

Note You need to log in before you can comment on or make changes to this bug.