Bug 209879 - MIPS: BCM47XX: build error due to unmet dependency for BCMA_DRIVER_PCI_HOSTMODE by BCM47XX_BCMA
Summary: MIPS: BCM47XX: build error due to unmet dependency for BCMA_DRIVER_PCI_HOSTMO...
Status: NEW
Alias: None
Product: Platform Specific/Hardware
Classification: Unclassified
Component: MIPS (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: ralf
Depends on:
Reported: 2020-10-26 19:47 UTC by Necip Fazil Yildiran
Modified: 2020-10-26 19:47 UTC (History)
4 users (show)

See Also:
Kernel Version: 5.9-rc10
Regression: No
Bisected commit-id:

kernel config file and the build output (98.22 KB, application/gzip)
2020-10-26 19:47 UTC, Necip Fazil Yildiran

Description Necip Fazil Yildiran 2020-10-26 19:47:52 UTC
Created attachment 293225 [details]
kernel config file and the build output

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

disabled, it results in the following Kbuild warning:

WARNING: unmet direct dependencies detected for BCMA_DRIVER_PCI_HOSTMODE
  Depends on [n]: MIPS [=y] && BCMA_DRIVER_PCI [=n] && PCI_DRIVERS_LEGACY [=y] && BCMA [=y]=y
  Selected by [y]:
  - BCM47XX_BCMA [=y] && BCM47XX [=y] && PCI [=y]

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

drivers/bcma/driver_pci_host.c: In function 'bcma_get_cfgspace_addr':
drivers/bcma/driver_pci_host.c:67:20: error: implicit declaration of function 'bcma_pcie_read'; did you mean 'raw_pci_read'? [-Werror=implicit-function-declaration]
   67 |  if (dev >= 2 || !(bcma_pcie_read(pc, BCMA_CORE_PCI_DLLP_LSREG)
      |                    ^~~~~~~~~~~~~~
      |                    raw_pci_read
cc1: some warnings being treated as errors
scripts/Makefile.build:265: recipe for target 'drivers/bcma/driver_pci_host.o' failed
make[2]: *** [drivers/bcma/driver_pci_host.o] Error 1
make[2]: *** Waiting for unfinished jobs....

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=mips clean
  7. ~/bin/make.cross ARCH=mips olddefconfig # unmet direct dependency warning
  8. ~/bin/make.cross ARCH=mips # should have a build error

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

The bug is reproducible for v5.10-rc1 as well with the same steps.

Kernel successfully builds when the unmet direct dependencies are resolved
by enabling them in the configuration. Depending on instead of selecting
the symbols, or selecting the dependencies of the selected symbols as well
should fix the bug.


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