Bug 215645 - commit 62fabd56faafe033eb0be3ba24000b8db13d4c17 cause build failure on x86
Summary: commit 62fabd56faafe033eb0be3ba24000b8db13d4c17 cause build failure on x86
Status: RESOLVED CODE_FIX
Alias: None
Product: ACPI
Classification: Unclassified
Component: Config-Other (show other bugs)
Hardware: x86-64 Linux
: P1 normal
Assignee: acpi_config-other
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-27 16:54 UTC by spasswolf
Modified: 2022-03-01 08:27 UTC (History)
0 users

See Also:
Kernel Version: linux-next-20220225
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description spasswolf 2022-02-27 16:54:33 UTC
When trying to build linux-20220225 the following build error occurs:
linux-5.17-rc5 works fine and git-bisect gave 62fabd56faafe033eb0be3ba24000b8db13d4c17 as the first bad commit

 CC      arch/x86/kernel/resource.o
In file included from arch/x86/kernel/resource.c:4:
./arch/x86/include/asm/pci_x86.h:97:8: error: unknown type name ‘raw_spinlock_t’
   97 | extern raw_spinlock_t pci_config_lock;
      |        ^~~~~~~~~~~~~~
./arch/x86/include/asm/pci_x86.h:133:20: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘dmi_check_pciprobe’
  133 | extern void __init dmi_check_pciprobe(void);
      |                    ^~~~~~~~~~~~~~~~~~
./arch/x86/include/asm/pci_x86.h:134:20: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘dmi_check_skip_isa_align’
  134 | extern void __init dmi_check_skip_isa_align(void);
      |                    ^~~~~~~~~~~~~~~~~~~~~~~~
./arch/x86/include/asm/pci_x86.h:138:19: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘pci_acpi_init’
  138 | extern int __init pci_acpi_init(void);
      |                   ^~~~~~~~~~~~~
./arch/x86/include/asm/pci_x86.h:145:20: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘pcibios_irq_init’
  145 | extern void __init pcibios_irq_init(void);
      |                    ^~~~~~~~~~~~~~~~
./arch/x86/include/asm/pci_x86.h:146:19: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘pcibios_init’
  146 | extern int __init pcibios_init(void);
      |                   ^~~~~~~~~~~~
./arch/x86/include/asm/pci_x86.h:166:19: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘pci_mmcfg_arch_init’
  166 | extern int __init pci_mmcfg_arch_init(void);
      |                   ^~~~~~~~~~~~~~~~~~~
./arch/x86/include/asm/pci_x86.h:167:20: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘pci_mmcfg_arch_free’
  167 | extern void __init pci_mmcfg_arch_free(void);
      |                    ^~~~~~~~~~~~~~~~~~~
./arch/x86/include/asm/pci_x86.h:174:40: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘pci_mmconfig_add’
  174 | extern struct pci_mmcfg_region *__init pci_mmconfig_add(int segment, int start,
      |                                        ^~~~~~~~~~~~~~~~
make[5]: *** [scripts/Makefile.build:288: arch/x86/kernel/resource.o] Fehler 1
make[4]: *** [scripts/Makefile.build:550: arch/x86/kernel] Fehler 2
make[3]: *** [Makefile:1831: arch/x86] Fehler 2

The reason is that including asm/pci_x86.h requires two additional #include statements in arch/x86/kernel/resource.c:
#include <linux/init.h>
#include <linux/spinlock_types_raw.h> // needed if asm/pci_x86.h is included
Comment 1 spasswolf 2022-02-27 17:05:35 UTC
It is probably a better idea to have the additional #include in pci_x86.h.
Comment 2 spasswolf 2022-03-01 08:27:24 UTC
Fixed in linux-next-20220228.

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