Re: Odd pci_iounmap() declaration rules..
From: Nathan Chancellor <nathan@kernel.org>
Date: 2021-09-19 21:28:48
Also in:
llvm
On Sun, Sep 19, 2021 at 11:05:35AM -0700, Linus Torvalds wrote:
On Sun, Sep 19, 2021 at 10:04 AM Helge Deller [off-list ref] wrote:quoted
Can you test if it fixes your alpha build (with GENERIC_PCI_IOMAP=y) as well?Yup. With this I can do that "enable GENERIC_PCI_IOMAP unconditionally" thing on alpha, and the one off EISA/PCI driver now builds cleanly without PCI. I applied it directly (along with the alpha patch to GENERIC_PCI_IOMAP). I have now looked at a number of drivers and architectures that I had happily forgotten _all_ about long long ago. It's been kind of fun, but I sure can't claim it has been really _productive_.
Commit 9caea0007601 ("parisc: Declare pci_iounmap() parisc version only
when CONFIG_PCI enabled") causes the following build error on arm64 with
Fedora's config, which CKI initially reported:
https://src.fedoraproject.org/rpms/kernel/raw/rawhide/f/kernel-aarch64-fedora.config
https://lore.kernel.org/r/cki.E3FB2299E5.UQ0I0LMEXJ@redhat.com/ (local)
https://arr-cki-prod-datawarehouse-public.s3.amazonaws.com/datawarehouse-public/2021/09/19/373372721/build_aarch64_redhat%3A1603258426/build.log
In file included from ./arch/arm64/include/asm/io.h:185,
from ./include/linux/io.h:13,
from ./include/acpi/acpi_io.h:5,
from ./include/linux/acpi.h:35,
from ./include/acpi/apei.h:9,
from ./include/acpi/ghes.h:5,
from ./include/linux/arm_sdei.h:8,
from arch/arm64/kernel/asm-offsets.c:10:
./include/asm-generic/io.h:1059:21: error: static declaration of 'pci_iounmap' follows non-static declaration
1059 | #define pci_iounmap pci_iounmap
| ^~~~~~~~~~~
./include/asm-generic/io.h:1060:20: note: in expansion of macro 'pci_iounmap'
1060 | static inline void pci_iounmap(struct pci_dev *dev, void __iomem *p)
| ^~~~~~~~~~~
In file included from ./include/asm-generic/io.h:19,
from ./arch/arm64/include/asm/io.h:185,
from ./include/linux/io.h:13,
from ./include/acpi/acpi_io.h:5,
from ./include/linux/acpi.h:35,
from ./include/acpi/apei.h:9,
from ./include/acpi/ghes.h:5,
from ./include/linux/arm_sdei.h:8,
from arch/arm64/kernel/asm-offsets.c:10:
./include/asm-generic/pci_iomap.h:21:13: note: previous declaration of 'pci_iounmap' with type 'void(struct pci_dev *, void *)'
21 | extern void pci_iounmap(struct pci_dev *dev, void __iomem *);
| ^~~~~~~~~~~
make[2]: *** [scripts/Makefile.build:121: arch/arm64/kernel/asm-offsets.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1219: prepare0] Error 2
make[1]: Target 'all' not remade because of errors.
make: *** [Makefile:350: __build_one_by_one] Error 2
make: Target 'olddefconfig' not remade because of errors.
make: Target 'all' not remade because of errors.
Sorry, I do not have time at the moment to look at it (family Sunday and
whatnot) but I wanted to be sure you were aware of it.
Cheers,
Nathan