aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Burton <paul.burton@mips.com>2018-08-29 17:54:01 -0400
committerPaul Burton <paul.burton@mips.com>2018-08-30 12:41:17 -0400
commite966d3084596c62f152bf1dd8028d94792c9c380 (patch)
tree00572bc326381492e73001064b4b9baaa309eee9
parentb962aeb022051915c26dcaba97d3ed0883bef9f5 (diff)
MIPS: Remove SLOW_DOWN_IO
arch/mips appears to have inherited SLOW_DOWN_IO from arch/x86 in antiquity, but we never define CONF_SLOWDOWN_IO so this is unused code. Perhaps it was once useful to keep the MIPS header close to the x86 version to ease comparisons or porting changes, but they've diverged significantly at this point & x86 does this differently now anyway. Delete the dead code. Signed-off-by: Paul Burton <paul.burton@mips.com> Patchwork: https://patchwork.linux-mips.org/patch/20343/ Cc: linux-mips@linux-mips.org
-rw-r--r--arch/mips/include/asm/io.h40
1 files changed, 3 insertions, 37 deletions
diff --git a/arch/mips/include/asm/io.h b/arch/mips/include/asm/io.h
index bbbeede9fea1..44f766b6b5af 100644
--- a/arch/mips/include/asm/io.h
+++ b/arch/mips/include/asm/io.h
@@ -34,11 +34,6 @@
34#include <mangle-port.h> 34#include <mangle-port.h>
35 35
36/* 36/*
37 * Slowdown I/O port space accesses for antique hardware.
38 */
39#undef CONF_SLOWDOWN_IO
40
41/*
42 * Raw operations are never swapped in software. OTOH values that raw 37 * Raw operations are never swapped in software. OTOH values that raw
43 * operations are working on may or may not have been swapped by the bus 38 * operations are working on may or may not have been swapped by the bus
44 * hardware. An example use would be for flash memory that's used for 39 * hardware. An example use would be for flash memory that's used for
@@ -90,33 +85,6 @@ static inline void set_io_port_base(unsigned long base)
90#define PIO_RESERVED 0x0UL 85#define PIO_RESERVED 0x0UL
91 86
92/* 87/*
93 * Thanks to James van Artsdalen for a better timing-fix than
94 * the two short jumps: using outb's to a nonexistent port seems
95 * to guarantee better timings even on fast machines.
96 *
97 * On the other hand, I'd like to be sure of a non-existent port:
98 * I feel a bit unsafe about using 0x80 (should be safe, though)
99 *
100 * Linus
101 *
102 */
103
104#define __SLOW_DOWN_IO \
105 __asm__ __volatile__( \
106 "sb\t$0,0x80(%0)" \
107 : : "r" (mips_io_port_base));
108
109#ifdef CONF_SLOWDOWN_IO
110#ifdef REALLY_SLOW_IO
111#define SLOW_DOWN_IO { __SLOW_DOWN_IO; __SLOW_DOWN_IO; __SLOW_DOWN_IO; __SLOW_DOWN_IO; }
112#else
113#define SLOW_DOWN_IO __SLOW_DOWN_IO
114#endif
115#else
116#define SLOW_DOWN_IO
117#endif
118
119/*
120 * virt_to_phys - map virtual addresses to physical 88 * virt_to_phys - map virtual addresses to physical
121 * @address: address to remap 89 * @address: address to remap
122 * 90 *
@@ -399,7 +367,7 @@ static inline type pfx##read##bwlq(const volatile void __iomem *mem) \
399 return pfx##ioswab##bwlq(__mem, __val); \ 367 return pfx##ioswab##bwlq(__mem, __val); \
400} 368}
401 369
402#define __BUILD_IOPORT_SINGLE(pfx, bwlq, type, p, slow) \ 370#define __BUILD_IOPORT_SINGLE(pfx, bwlq, type, p) \
403 \ 371 \
404static inline void pfx##out##bwlq##p(type val, unsigned long port) \ 372static inline void pfx##out##bwlq##p(type val, unsigned long port) \
405{ \ 373{ \
@@ -416,7 +384,6 @@ static inline void pfx##out##bwlq##p(type val, unsigned long port) \
416 BUILD_BUG_ON(sizeof(type) > sizeof(unsigned long)); \ 384 BUILD_BUG_ON(sizeof(type) > sizeof(unsigned long)); \
417 \ 385 \
418 *__addr = __val; \ 386 *__addr = __val; \
419 slow; \
420} \ 387} \
421 \ 388 \
422static inline type pfx##in##bwlq##p(unsigned long port) \ 389static inline type pfx##in##bwlq##p(unsigned long port) \
@@ -429,7 +396,6 @@ static inline type pfx##in##bwlq##p(unsigned long port) \
429 BUILD_BUG_ON(sizeof(type) > sizeof(unsigned long)); \ 396 BUILD_BUG_ON(sizeof(type) > sizeof(unsigned long)); \
430 \ 397 \
431 __val = *__addr; \ 398 __val = *__addr; \
432 slow; \
433 \ 399 \
434 /* prevent prefetching of coherent DMA data prematurely */ \ 400 /* prevent prefetching of coherent DMA data prematurely */ \
435 rmb(); \ 401 rmb(); \
@@ -452,8 +418,8 @@ BUILDIO_MEM(l, u32)
452BUILDIO_MEM(q, u64) 418BUILDIO_MEM(q, u64)
453 419
454#define __BUILD_IOPORT_PFX(bus, bwlq, type) \ 420#define __BUILD_IOPORT_PFX(bus, bwlq, type) \
455 __BUILD_IOPORT_SINGLE(bus, bwlq, type, ,) \ 421 __BUILD_IOPORT_SINGLE(bus, bwlq, type,) \
456 __BUILD_IOPORT_SINGLE(bus, bwlq, type, _p, SLOW_DOWN_IO) 422 __BUILD_IOPORT_SINGLE(bus, bwlq, type, _p)
457 423
458#define BUILDIO_IOPORT(bwlq, type) \ 424#define BUILDIO_IOPORT(bwlq, type) \
459 __BUILD_IOPORT_PFX(, bwlq, type) \ 425 __BUILD_IOPORT_PFX(, bwlq, type) \