sh: Provide prototypes for PCI I/O mapping in asm/io.h
PATCH 1/1 sh: Provide prototypes for PCI I/O mapping in asm/io.h
Most architectures provide prototypes for the PCI I/O mapping operations when asm/io.h is included but SH doesn't currently do that, leading to for example warnings in sound/pci/hda/patch_ca0132.c when pci_iomap() is used on current -next. Make SH more consistent with other architectures by including asm-generic/pci_iomap.h in asm/io.h.
--- arch/sh/include/asm/io.h | 1 + 1 file changed, 1 insertion(+)
arch/sh/include/asm/io.h +1 -0
@@ -24,6 +24,7 @@#define __IO_PREFIX generic#include <asm/io_generic.h> #include <asm/io_trapped.h> +#include <asm-generic/pci_iomap.h> #include <mach/mangle-port.h> #define __raw_writeb (v,a) (__chk_io_ptr(a), *(volatile u8 __force *)(a) = (v))
Signature · 1 line
2.19.0.rc2
Hi Mark,
Quoted 4 lines · Mark Brown
Most architectures provide prototypes for the PCI I/O mapping operations when
asm/io.his included but SH doesn't currently do that, leading to for example warnings insound/pci/hda/patch_ca0132.cwhenpci_iomap()is used on current -next. Make SH more consistent with other architectures
Also on v4.20-rc1, cfr.
http://kisskb.ellerman.id.au/kisskb/buildresult/13576888/
Quoted 4 lines
by including
asm-generic/pci_iomap.hinasm/io.h.Reported-by kbuild test robot <[email protected]>Signed-off-by Mark Brown <[email protected]>
Thanks for your patch!
arch/sh/include/asm/io.h line 27
Quoted 7 lines
arch/sh/include/asm/io.h +1
-0@@ -24,6 +24,7 @@#define __IO_PREFIX generic#include <asm/io_generic.h> #include <asm/io_trapped.h> +#include <asm-generic/pci_iomap.h>
Is this sufficient?
include/asm-generic/pci_iomap.h provides the dummies if CONFIG_PCI=n and CONFIG_GENERIC_PCI_IOMAP=y, while arch/sh/Kconfig selects GENERIC_PCI_IOMAP only if PCI is enabled. Hence it's not set in the failing config (sh/allyesconfig).
Probably SH should select GENERIC_PCI_IOMAP unconditionally, like most other architectures do (alpha and powerpc select it conditionally, though)?
arch/sh/include/asm/io.h line 30
Quoted 3 lines
arch/sh/include/asm/io.h +0
-0#include <mach/mangle-port.h> #define __raw_writeb (v,a) (__chk_io_ptr(a), *(volatile u8 __force *)(a) = (v))
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Quoted 8 lines · Geert Uytterhoeven
Quoted 1 line
+#include <
asm-generic/pci_iomap.h>Is this sufficient?
include/asm-generic/pci_iomap.hprovides the dummies ifCONFIG_PCI=nandCONFIG_GENERIC_PCI_IOMAP=y, whilearch/sh/KconfigselectsGENERIC_PCI_IOMAPonly if PCI is enabled. Hence it's not set in the failing config (sh/allyesconfig).
Ah, possibly not - IIRC I minimized the config when testing but I could've got the GENERIC_PCI_IOMAP=y.
Quoted 2 lines
Probably SH should select
GENERIC_PCI_IOMAPunconditionally, like most other architectures do (alpha and powerpc select it conditionally, though)?
I'd be surprised if it had a strong reason not to.