When compiling 2.6.37-r4 kernel, configuration generated by menuconfig will not compile with CONFIG_XEN_PLATFORM_PCI unless CONFIG_PCI is also set. While this seems reasonable on its face, menuconfig neither indicates this dependency, nor enforces it. Thus it is possible to set CONFIG_XEN_PLATFORM_PCI without having CONFIG_PCI set, and the kernel will fail to compile as a result. 2.6.36-r9 kernel exhibits the same menuconfig behavior, but compiles successfully. Reproducible: Always Steps to Reproduce: 1. merge 2.6.37-r4 kernel 2. configure for XEN guest using attached config file Actual Results: CHK include/linux/version.h CHK include/generated/utsrelease.h CALL scripts/checksyscalls.sh CHK include/generated/compile.h CC [M] drivers/xen/platform-pci.o drivers/xen/platform-pci.c: In function 'platform_pci_init': drivers/xen/platform-pci.c:127: error: implicit declaration of function 'pci_request_region' drivers/xen/platform-pci.c:165: error: implicit declaration of function 'pci_release_region' make[2]: *** [drivers/xen/platform-pci.o] Error 1 make[1]: *** [drivers/xen] Error 2 make: *** [drivers] Error 2 Expected Results: Compile succesfully using config generated by make menuconfig
Created attachment 264525 [details] xen kernel configuration This config is from a hardened gentoo kernel, but the problem has been confirmed on vanilla as well.
Okay this appeared on 2.6.37 because of a change to drivers/xen/platform-pci.c. The calls to request_region and release_region in <=2.6.36 where changed to pci_request_region and pci_release_region in 2.6.37. While <linux/pci.h> is included, when CONFIG_PCI is off, the appropriate function prototypes, namely void pci_release_region(struct pci_dev *, int); int __must_check pci_request_region(struct pci_dev *, int, const char *); are NOT included because they are ifdef-ed out. This suggests that CONFIG_XEN_PLATFORM_PCI ought to depend on CONFIG_PCI. In the next post, I'll prepare a patch which address that. I've tested it and it does fix the problem.
Created attachment 264527 [details, diff] Make CONFIG_XEN_PLATFORM_PCI depend on CONFIG_PCI
(In reply to comment #3) > Created an attachment (id=264527) [details] > Make CONFIG_XEN_PLATFORM_PCI depend on CONFIG_PCI > Okay someone stole my thunder! The fix is already upstream: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e528db5b392ab2a624258a667fed0e65af6e411b Rather than backporting this one, I recommend we just refer people to this bug with the workaround of setting CONFIG_PCI=y until this fix makes it into one of the stable releases. Closing it FIXED.