Re: randconfig build error with next-20131202, in arch/x86/pci

From: Rafael J. Wysocki
Date: Tue Dec 03 2013 - 07:55:42 EST


On Monday, December 02, 2013 04:14:32 PM Bjorn Helgaas wrote:
> [+cc Lv, Rafael, linux-acpi]
>
> Is this fallout related to "ACPI: Cleanup <acpi/acpi.h>,
> <acpi/acpi_bus.h> and <acpi/acpi_drivers.h> inclusions"?

We have a new version of that patch that should avoid at least some of these
errors. I'm going to replace the one in my tree with it shortly.

> On Mon, Dec 2, 2013 at 7:57 AM, Jim Davis <jim.epost@xxxxxxxxx> wrote:
> > Building with the attached random configuration file,
> >
> > arch/x86/pci/mmconfig-shared.c:373:1: error: unknown type name âacpi_statusâ
> > static acpi_status check_mcfg_resource(struct acpi_resource *res, void *data)
> > ^
> > arch/x86/pci/mmconfig-shared.c:373:47: warning: âstruct acpi_resourceâ
> > declared inside parameter list [enabled by default]
> > static acpi_status check_mcfg_resource(struct acpi_resource *res, void *data)
> > ^
> > arch/x86/pci/mmconfig-shared.c:373:47: warning: its scope is only this
> > definition or declaration, which is probably not what you want
> > [enabled by default]
> > arch/x86/pci/mmconfig-shared.c: In function âcheck_mcfg_resourceâ:
> > arch/x86/pci/mmconfig-shared.c:376:33: error: storage size of
> > âaddressâ isnât known
> > struct acpi_resource_address64 address;
> > ^
> > arch/x86/pci/mmconfig-shared.c:377:2: error: unknown type name âacpi_statusâ
> > acpi_status status;
> > ^
> > arch/x86/pci/mmconfig-shared.c:379:9: error: dereferencing pointer to
> > incomplete type
> > if (res->type == ACPI_RESOURCE_TYPE_FIXED_MEMORY32) {
> > ^
> > arch/x86/pci/mmconfig-shared.c:379:19: error:
> > âACPI_RESOURCE_TYPE_FIXED_MEMORY32â undeclared (first use in this
> > function)
> > if (res->type == ACPI_RESOURCE_TYPE_FIXED_MEMORY32) {
> > ^
> > arch/x86/pci/mmconfig-shared.c:379:19: note: each undeclared
> > identifier is reported only once for each function it appears in
> > arch/x86/pci/mmconfig-shared.c:381:8: error: dereferencing pointer to
> > incomplete type
> > &res->data.fixed_memory32;
> > ^
> > arch/x86/pci/mmconfig-shared.c:383:11: error: âAE_OKâ undeclared
> > (first use in this function)
> > return AE_OK;
> > ^
> > arch/x86/pci/mmconfig-shared.c:384:35: error: dereferencing pointer to
> > incomplete type
> > if ((mcfg_res->start >= fixmem32->address) &&
> > ^
> > arch/x86/pci/mmconfig-shared.c:385:33: error: dereferencing pointer to
> > incomplete type
> > (mcfg_res->end < (fixmem32->address +
> > ^
> > arch/x86/pci/mmconfig-shared.c:386:19: error: dereferencing pointer to
> > incomplete type
> > fixmem32->address_length))) {
> > ^
> > arch/x86/pci/mmconfig-shared.c:388:11: error: âAE_CTRL_TERMINATEâ
> > undeclared (first use in this function)
> > return AE_CTRL_TERMINATE;
> > ^
> > arch/x86/pci/mmconfig-shared.c:391:10: error: dereferencing pointer to
> > incomplete type
> > if ((res->type != ACPI_RESOURCE_TYPE_ADDRESS32) &&
> > ^
> > arch/x86/pci/mmconfig-shared.c:391:20: error:
> > âACPI_RESOURCE_TYPE_ADDRESS32â undeclared (first use in this function)
> > if ((res->type != ACPI_RESOURCE_TYPE_ADDRESS32) &&
> > ^
> > arch/x86/pci/mmconfig-shared.c:392:10: error: dereferencing pointer to
> > incomplete type
> > (res->type != ACPI_RESOURCE_TYPE_ADDRESS64))
> > ^
> > arch/x86/pci/mmconfig-shared.c:392:20: error:
> > âACPI_RESOURCE_TYPE_ADDRESS64â undeclared (first use in this function)
> > (res->type != ACPI_RESOURCE_TYPE_ADDRESS64))
> > ^
> > arch/x86/pci/mmconfig-shared.c:395:2: error: implicit declaration of
> > function âacpi_resource_to_address64â
> > [-Werror=implicit-function-declaration]
> > status = acpi_resource_to_address64(res, &address);
> > ^
> > arch/x86/pci/mmconfig-shared.c:396:2: error: implicit declaration of
> > function âACPI_FAILUREâ [-Werror=implicit-function-declaration]
> > if (ACPI_FAILURE(status) ||
> > ^
> > arch/x86/pci/mmconfig-shared.c:398:31: error: âACPI_MEMORY_RANGEâ
> > undeclared (first use in this function)
> > (address.resource_type != ACPI_MEMORY_RANGE))
> > ^
> > arch/x86/pci/mmconfig-shared.c:376:33: warning: unused variable
> > âaddressâ [-Wunused-variable]
> > struct acpi_resource_address64 address;
> > ^
> > arch/x86/pci/mmconfig-shared.c: At top level:
> > arch/x86/pci/mmconfig-shared.c:409:1: error: unknown type name âacpi_statusâ
> > static acpi_status find_mboard_resource(acpi_handle handle, u32 lvl,
> > ^
> > arch/x86/pci/mmconfig-shared.c:409:41: error: unknown type name âacpi_handleâ
> > static acpi_status find_mboard_resource(acpi_handle handle, u32 lvl,
> > ^
> > arch/x86/pci/mmconfig-shared.c: In function âis_acpi_reservedâ:
> > arch/x86/pci/mmconfig-shared.c:431:2: error: implicit declaration of
> > function âacpi_get_devicesâ [-Werror=implicit-function-declaration]
> > acpi_get_devices("PNP0C01", find_mboard_resource, &mcfg_res, NULL);
> > ^
> > arch/x86/pci/mmconfig-shared.c:431:30: error: âfind_mboard_resourceâ
> > undeclared ^
> > jim@krebstar:~$ more errs
> > jim@krebstar:~$ cat errs
> > arch/x86/pci/mmconfig-shared.c:373:1: error: unknown type name âacpi_statusâ
> > static acpi_status check_mcfg_resource(struct acpi_resource *res, void *data)
> > ^
> > arch/x86/pci/mmconfig-shared.c:373:47: warning: âstruct acpi_resourceâ
> > declared inside parameter list [enabled by default]
> > static acpi_status check_mcfg_resource(struct acpi_resource *res, void *data)
> > ^
> > arch/x86/pci/mmconfig-shared.c:373:47: warning: its scope is only this
> > definition or declaration, which is probably not what you want
> > [enabled by default]
> > arch/x86/pci/mmconfig-shared.c: In function âcheck_mcfg_resourceâ:
> > arch/x86/pci/mmconfig-shared.c:376:33: error: storage size of
> > âaddressâ isnât known
> > struct acpi_resource_address64 address;
> > ^
> > arch/x86/pci/mmconfig-shared.c:377:2: error: unknown type name âacpi_statusâ
> > acpi_status status;
> > ^
> > arch/x86/pci/mmconfig-shared.c:379:9: error: dereferencing pointer to
> > incomplete type
> > if (res->type == ACPI_RESOURCE_TYPE_FIXED_MEMORY32) {
> > ^
> > arch/x86/pci/mmconfig-shared.c:379:19: error:
> > âACPI_RESOURCE_TYPE_FIXED_MEMORY32â undeclared (first use in this
> > function)
> > if (res->type == ACPI_RESOURCE_TYPE_FIXED_MEMORY32) {
> > ^
> > arch/x86/pci/mmconfig-shared.c:379:19: note: each undeclared
> > identifier is reported only once for each function it appears in
> > arch/x86/pci/mmconfig-shared.c:381:8: error: dereferencing pointer to
> > incomplete type
> > &res->data.fixed_memory32;
> > ^
> > arch/x86/pci/mmconfig-shared.c:383:11: error: âAE_OKâ undeclared
> > (first use in this function)
> > return AE_OK;
> > ^
> > arch/x86/pci/mmconfig-shared.c:384:35: error: dereferencing pointer to
> > incomplete type
> > if ((mcfg_res->start >= fixmem32->address) &&
> > ^
> > arch/x86/pci/mmconfig-shared.c:385:33: error: dereferencing pointer to
> > incomplete type
> > (mcfg_res->end < (fixmem32->address +
> > ^
> > arch/x86/pci/mmconfig-shared.c:386:19: error: dereferencing pointer to
> > incomplete type
> > fixmem32->address_length))) {
> > ^
> > arch/x86/pci/mmconfig-shared.c:388:11: error: âAE_CTRL_TERMINATEâ
> > undeclared (first use in this function)
> > return AE_CTRL_TERMINATE;
> > ^
> > arch/x86/pci/mmconfig-shared.c:391:10: error: dereferencing pointer to
> > incomplete type
> > if ((res->type != ACPI_RESOURCE_TYPE_ADDRESS32) &&
> > ^
> > arch/x86/pci/mmconfig-shared.c:391:20: error:
> > âACPI_RESOURCE_TYPE_ADDRESS32â undeclared (first use in this function)
> > if ((res->type != ACPI_RESOURCE_TYPE_ADDRESS32) &&
> > ^
> > arch/x86/pci/mmconfig-shared.c:392:10: error: dereferencing pointer to
> > incomplete type
> > (res->type != ACPI_RESOURCE_TYPE_ADDRESS64))
> > ^
> > arch/x86/pci/mmconfig-shared.c:392:20: error:
> > âACPI_RESOURCE_TYPE_ADDRESS64â undeclared (first use in this function)
> > (res->type != ACPI_RESOURCE_TYPE_ADDRESS64))
> > ^
> > arch/x86/pci/mmconfig-shared.c:395:2: error: implicit declaration of
> > function âacpi_resource_to_address64â
> > [-Werror=implicit-function-declaration]
> > status = acpi_resource_to_address64(res, &address);
> > ^
> > arch/x86/pci/mmconfig-shared.c:396:2: error: implicit declaration of
> > function âACPI_FAILUREâ [-Werror=implicit-function-declaration]
> > if (ACPI_FAILURE(status) ||
> > ^
> > arch/x86/pci/mmconfig-shared.c:398:31: error: âACPI_MEMORY_RANGEâ
> > undeclared (first use in this function)
> > (address.resource_type != ACPI_MEMORY_RANGE))
> > ^
> > arch/x86/pci/mmconfig-shared.c:376:33: warning: unused variable
> > âaddressâ [-Wunused-variable]
> > struct acpi_resource_address64 address;
> > ^
> > arch/x86/pci/mmconfig-shared.c: At top level:
> > arch/x86/pci/mmconfig-shared.c:409:1: error: unknown type name âacpi_statusâ
> > static acpi_status find_mboard_resource(acpi_handle handle, u32 lvl,
> > ^
> > arch/x86/pci/mmconfig-shared.c:409:41: error: unknown type name âacpi_handleâ
> > static acpi_status find_mboard_resource(acpi_handle handle, u32 lvl,
> > ^
> > arch/x86/pci/mmconfig-shared.c: In function âis_acpi_reservedâ:
> > arch/x86/pci/mmconfig-shared.c:431:2: error: implicit declaration of
> > function âacpi_get_devicesâ [-Werror=implicit-function-declaration]
> > acpi_get_devices("PNP0C01", find_mboard_resource, &mcfg_res, NULL);
> > ^
> > arch/x86/pci/mmconfig-shared.c:431:30: error: âfind_mboard_resourceâ
> > undeclared (first use in this function)
> > acpi_get_devices("PNP0C01", find_mboard_resource, &mcfg_res, NULL);
> > ^
> > arch/x86/pci/mmconfig-shared.c: At top level:
> > arch/x86/pci/mmconfig-shared.c:544:13: warning: âstruct
> > acpi_mcfg_allocationâ declared inside parameter list [enabled by
> > default]
> > struct acpi_mcfg_allocation *cfg)
> > ^
> > arch/x86/pci/mmconfig-shared.c:544:13: warning: âstruct
> > acpi_table_mcfgâ declared inside parameter list [enabled by default]
> > arch/x86/pci/mmconfig-shared.c: In function âacpi_mcfg_check_entryâ:
> > arch/x86/pci/mmconfig-shared.c:548:9: error: dereferencing pointer to
> > incomplete type
> > if (cfg->address < 0xFFFFFFFF)
> > ^
> > arch/x86/pci/mmconfig-shared.c:551:19: error: dereferencing pointer to
> > incomplete type
> > if (!strncmp(mcfg->header.oem_id, "SGI", 3))
> > ^
> > arch/x86/pci/mmconfig-shared.c:554:10: error: dereferencing pointer to
> > incomplete type
> > if (mcfg->header.revision >= 1) {
> > ^
> > In file included from include/linux/kernel.h:13:0,
> > from include/linux/kernfs.h:10,
> > from include/linux/sysfs.h:15,
> > from include/linux/kobject.h:21,
> > from include/linux/pci.h:28,
> > from arch/x86/pci/mmconfig-shared.c:13:
> > arch/x86/pci/mmconfig-shared.c:561:39: error: dereferencing pointer to
> > incomplete type
> > "is above 4GB, ignored\n", cfg->pci_segment,
> > ^
> > include/linux/printk.h:217:33: note: in definition of macro âpr_errâ
> > printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
> > ^
> > ^
> > arch/x86/pci/mmconfig-shared.c:600:32: error: dereferencing pointer to
> > incomplete type
> > cfg->end_bus_number, cfg->address) == NULL) {
> > ^
> > arch/x86/pci/mmconfig-shared.c: In function âpci_mmcfg_early_initâ:
> > arch/x86/pci/mmconfig-shared.c:642:25: error: âACPI_SIG_MCFGâ
> > undeclared (first use in this function)
> > acpi_sfi_table_parse(ACPI_SIG_MCFG, pci_parse_mcfg);
> > ^
> > arch/x86/pci/mmconfig-shared.c: In function âpci_mmcfg_late_initâ:
> > arch/x86/pci/mmconfig-shared.c:658:24: error: âACPI_SIG_MCFGâ
> > undeclared (first use in this function)
> > acpi_sfi_table_parse(ACPI_SIG_MCFG, pci_parse_mcfg);
> > ^
> > arch/x86/pci/mmconfig-shared.c: At top level:
> > arch/x86/pci/mmconfig-shared.c:373:20: warning: âcheck_mcfg_resourceâ
> > defined but not used [-Wunused-function]
> > static acpi_status check_mcfg_resource(struct acpi_resource *res, void *data)
> > ^
> > cc1: some warnings being treated as errors
> > make[1]: *** [arch/x86/pci/mmconfig-shared.o] Error 1
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/