Re: [PATCH] powerpc: drop port I/O helpers for CONFIG_HAS_IOPORT=n

From: Arnd Bergmann
Date: Thu Apr 18 2024 - 03:00:31 EST


On Thu, Apr 18, 2024, at 08:26, Michael Ellerman wrote:
> Arnd Bergmann <arnd@xxxxxxxxxx> writes:

> @@ -692,6 +692,7 @@ static inline void name at
> \
> #define writesw writesw
> #define writesl writesl
>
> +#ifdef CONFIG_HAS_IOPORT
> #define inb inb
> #define inw inw
> #define inl inl
> @@ -704,6 +705,8 @@ static inline void name at
> \
> #define outsb outsb
> #define outsw outsw
> #define outsl outsl
> +#endif // CONFIG_HAS_IOPORT
> +
> #ifdef __powerpc64__
> #define readq readq
> #define writeq writeq

I had included this at first, but then I still ran into
the same warnings because it ends up pulling in the
generic outsb() etc from include/asm-generic/io.h
that relies on setting a non-NULL PCI_IOBASE.

Arnd