* [PATCH 1/3] sh: remove unused SLOW_DOWN_IO
[not found] <20221014001911.3342485-1-helgaas@kernel.org>
@ 2022-10-14 0:19 ` Bjorn Helgaas
2022-10-18 17:30 ` Bjorn Helgaas
0 siblings, 1 reply; 2+ messages in thread
From: Bjorn Helgaas @ 2022-10-14 0:19 UTC (permalink / raw)
To: linux-kernel; +Cc: Bjorn Helgaas, Yoshinori Sato, Rich Felker, linux-sh
From: Bjorn Helgaas <bhelgaas@google.com>
io.h defines SLOW_DOWN_IO only when CONF_SLOWDOWN_IO is defined, but
CONF_SLOWDOWN_IO is never defined and is in fact explicitly undefined.
Remove SLOW_DOWN_IO and related code.
N.B. 37b7a97884ba ("sh: machvec IO death.") went to some trouble to add
CONF_SLOWDOWN_IO and SLOW_DOWN_IO, for no obvious reason. Maybe there was
some out-of-tree case that used this.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Rich Felker <dalias@libc.org>
Cc: linux-sh@vger.kernel.org
---
arch/sh/include/asm/io.h | 17 ++---------------
1 file changed, 2 insertions(+), 15 deletions(-)
diff --git a/arch/sh/include/asm/io.h b/arch/sh/include/asm/io.h
index fba90e670ed4..8d2df499b2fc 100644
--- a/arch/sh/include/asm/io.h
+++ b/arch/sh/include/asm/io.h
@@ -121,11 +121,6 @@ __BUILD_MEMORY_STRING(__raw_, q, u64)
#ifdef CONFIG_HAS_IOPORT_MAP
-/*
- * Slowdown I/O port space accesses for antique hardware.
- */
-#undef CONF_SLOWDOWN_IO
-
/*
* On SuperH I/O ports are memory mapped, so we access them using normal
* load/store instructions. sh_io_port_base is the virtual address to
@@ -145,13 +140,7 @@ static inline void __set_io_port_base(unsigned long pbase)
extern void __iomem *__ioport_map(unsigned long addr, unsigned int size);
#endif
-#ifdef CONF_SLOWDOWN_IO
-#define SLOW_DOWN_IO __raw_readw(sh_io_port_base)
-#else
-#define SLOW_DOWN_IO
-#endif
-
-#define __BUILD_IOPORT_SINGLE(pfx, bwlq, type, p, slow) \
+#define __BUILD_IOPORT_SINGLE(pfx, bwlq, type, p) \
\
static inline void pfx##out##bwlq##p(type val, unsigned long port) \
{ \
@@ -159,7 +148,6 @@ static inline void pfx##out##bwlq##p(type val, unsigned long port) \
\
__addr = __ioport_map(port, sizeof(type)); \
*__addr = val; \
- slow; \
} \
\
static inline type pfx##in##bwlq##p(unsigned long port) \
@@ -169,14 +157,13 @@ static inline type pfx##in##bwlq##p(unsigned long port) \
\
__addr = __ioport_map(port, sizeof(type)); \
__val = *__addr; \
- slow; \
\
return __val; \
}
#define __BUILD_IOPORT_PFX(bus, bwlq, type) \
__BUILD_IOPORT_SINGLE(bus, bwlq, type, ,) \
- __BUILD_IOPORT_SINGLE(bus, bwlq, type, _p, SLOW_DOWN_IO)
+ __BUILD_IOPORT_SINGLE(bus, bwlq, type, _p,)
#define BUILDIO_IOPORT(bwlq, type) \
__BUILD_IOPORT_PFX(, bwlq, type)
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/3] sh: remove unused SLOW_DOWN_IO
2022-10-14 0:19 ` [PATCH 1/3] sh: remove unused SLOW_DOWN_IO Bjorn Helgaas
@ 2022-10-18 17:30 ` Bjorn Helgaas
0 siblings, 0 replies; 2+ messages in thread
From: Bjorn Helgaas @ 2022-10-18 17:30 UTC (permalink / raw)
To: linux-kernel; +Cc: Bjorn Helgaas, Yoshinori Sato, Rich Felker, linux-sh
On Thu, Oct 13, 2022 at 07:19:09PM -0500, Bjorn Helgaas wrote:
> From: Bjorn Helgaas <bhelgaas@google.com>
>
> io.h defines SLOW_DOWN_IO only when CONF_SLOWDOWN_IO is defined, but
> CONF_SLOWDOWN_IO is never defined and is in fact explicitly undefined.
> Remove SLOW_DOWN_IO and related code.
>
> N.B. 37b7a97884ba ("sh: machvec IO death.") went to some trouble to add
> CONF_SLOWDOWN_IO and SLOW_DOWN_IO, for no obvious reason. Maybe there was
> some out-of-tree case that used this.
>
> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
> Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
> Cc: Rich Felker <dalias@libc.org>
> Cc: linux-sh@vger.kernel.org
Please disregard this patch. I'll post an updated version that fixes
the build error and removes a little more unused/unnecessary stuff.
> ---
> arch/sh/include/asm/io.h | 17 ++---------------
> 1 file changed, 2 insertions(+), 15 deletions(-)
>
> diff --git a/arch/sh/include/asm/io.h b/arch/sh/include/asm/io.h
> index fba90e670ed4..8d2df499b2fc 100644
> --- a/arch/sh/include/asm/io.h
> +++ b/arch/sh/include/asm/io.h
> @@ -121,11 +121,6 @@ __BUILD_MEMORY_STRING(__raw_, q, u64)
>
> #ifdef CONFIG_HAS_IOPORT_MAP
>
> -/*
> - * Slowdown I/O port space accesses for antique hardware.
> - */
> -#undef CONF_SLOWDOWN_IO
> -
> /*
> * On SuperH I/O ports are memory mapped, so we access them using normal
> * load/store instructions. sh_io_port_base is the virtual address to
> @@ -145,13 +140,7 @@ static inline void __set_io_port_base(unsigned long pbase)
> extern void __iomem *__ioport_map(unsigned long addr, unsigned int size);
> #endif
>
> -#ifdef CONF_SLOWDOWN_IO
> -#define SLOW_DOWN_IO __raw_readw(sh_io_port_base)
> -#else
> -#define SLOW_DOWN_IO
> -#endif
> -
> -#define __BUILD_IOPORT_SINGLE(pfx, bwlq, type, p, slow) \
> +#define __BUILD_IOPORT_SINGLE(pfx, bwlq, type, p) \
> \
> static inline void pfx##out##bwlq##p(type val, unsigned long port) \
> { \
> @@ -159,7 +148,6 @@ static inline void pfx##out##bwlq##p(type val, unsigned long port) \
> \
> __addr = __ioport_map(port, sizeof(type)); \
> *__addr = val; \
> - slow; \
> } \
> \
> static inline type pfx##in##bwlq##p(unsigned long port) \
> @@ -169,14 +157,13 @@ static inline type pfx##in##bwlq##p(unsigned long port) \
> \
> __addr = __ioport_map(port, sizeof(type)); \
> __val = *__addr; \
> - slow; \
> \
> return __val; \
> }
>
> #define __BUILD_IOPORT_PFX(bus, bwlq, type) \
> __BUILD_IOPORT_SINGLE(bus, bwlq, type, ,) \
> - __BUILD_IOPORT_SINGLE(bus, bwlq, type, _p, SLOW_DOWN_IO)
> + __BUILD_IOPORT_SINGLE(bus, bwlq, type, _p,)
>
> #define BUILDIO_IOPORT(bwlq, type) \
> __BUILD_IOPORT_PFX(, bwlq, type)
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-10-18 17:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20221014001911.3342485-1-helgaas@kernel.org>
2022-10-14 0:19 ` [PATCH 1/3] sh: remove unused SLOW_DOWN_IO Bjorn Helgaas
2022-10-18 17:30 ` Bjorn Helgaas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).