Skip to content

Commit df195d9

Browse files
d3athjest3rhdeller
authored andcommitted
parisc: Remove memcpy_toio and memset_io
Recently new functions for IO memcpy and IO memset were added in libs/iomem_copy.c. So, remove the arch specific implementations, to fall back to the generic ones which do exactly the same. Keep memcpy_fromio for now, because it's slight more optimized by doing 'u16' accesses if the buffer is aligned this way. Signed-off-by: Julian Vetter <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Signed-off-by: Helge Deller <[email protected]>
1 parent adc2186 commit df195d9

File tree

3 files changed

+0
-53
lines changed

3 files changed

+0
-53
lines changed

arch/parisc/include/asm/io.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,12 +135,8 @@ static inline void gsc_writeq(unsigned long long val, unsigned long addr)
135135

136136
#define pci_iounmap pci_iounmap
137137

138-
void memset_io(volatile void __iomem *addr, unsigned char val, int count);
139138
void memcpy_fromio(void *dst, const volatile void __iomem *src, int count);
140-
void memcpy_toio(volatile void __iomem *dst, const void *src, int count);
141-
#define memset_io memset_io
142139
#define memcpy_fromio memcpy_fromio
143-
#define memcpy_toio memcpy_toio
144140

145141
/* Port-space IO */
146142

arch/parisc/kernel/parisc_ksyms.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,7 @@ EXPORT_SYMBOL($global$);
4343
#endif
4444

4545
#include <asm/io.h>
46-
EXPORT_SYMBOL(memcpy_toio);
4746
EXPORT_SYMBOL(memcpy_fromio);
48-
EXPORT_SYMBOL(memset_io);
4947

5048
extern void $$divI(void);
5149
extern void $$divU(void);

arch/parisc/lib/io.c

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -12,32 +12,6 @@
1212
#include <linux/module.h>
1313
#include <asm/io.h>
1414

15-
/* Copies a block of memory to a device in an efficient manner.
16-
* Assumes the device can cope with 32-bit transfers. If it can't,
17-
* don't use this function.
18-
*/
19-
void memcpy_toio(volatile void __iomem *dst, const void *src, int count)
20-
{
21-
if (((unsigned long)dst & 3) != ((unsigned long)src & 3))
22-
goto bytecopy;
23-
while ((unsigned long)dst & 3) {
24-
writeb(*(char *)src, dst++);
25-
src++;
26-
count--;
27-
}
28-
while (count > 3) {
29-
__raw_writel(*(u32 *)src, dst);
30-
src += 4;
31-
dst += 4;
32-
count -= 4;
33-
}
34-
bytecopy:
35-
while (count--) {
36-
writeb(*(char *)src, dst++);
37-
src++;
38-
}
39-
}
40-
4115
/*
4216
** Copies a block of memory from a device in an efficient manner.
4317
** Assumes the device can cope with 32-bit transfers. If it can't,
@@ -99,27 +73,6 @@ void memcpy_fromio(void *dst, const volatile void __iomem *src, int count)
9973
}
10074
}
10175

102-
/* Sets a block of memory on a device to a given value.
103-
* Assumes the device can cope with 32-bit transfers. If it can't,
104-
* don't use this function.
105-
*/
106-
void memset_io(volatile void __iomem *addr, unsigned char val, int count)
107-
{
108-
u32 val32 = (val << 24) | (val << 16) | (val << 8) | val;
109-
while ((unsigned long)addr & 3) {
110-
writeb(val, addr++);
111-
count--;
112-
}
113-
while (count > 3) {
114-
__raw_writel(val32, addr);
115-
addr += 4;
116-
count -= 4;
117-
}
118-
while (count--) {
119-
writeb(val, addr++);
120-
}
121-
}
122-
12376
/*
12477
* Read COUNT 8-bit bytes from port PORT into memory starting at
12578
* SRC.

0 commit comments

Comments
 (0)