[PATCH v5 0/5] Consolidate IO memcpy functions

Julian Vetter posted 5 patches 2 months ago
There is a newer version of this series
arch/arm64/kernel/io.c         |  87 ---------------------------
arch/csky/kernel/Makefile      |   2 +-
arch/csky/kernel/io.c          |  91 ----------------------------
arch/loongarch/kernel/Makefile |   2 +-
arch/loongarch/kernel/io.c     |  94 -----------------------------
include/asm-generic/io.h       |  18 +++++-
lib/iomap_copy.c               | 107 +++++++++++++++++++++++++++++++++
7 files changed, 124 insertions(+), 277 deletions(-)
delete mode 100644 arch/csky/kernel/io.c
delete mode 100644 arch/loongarch/kernel/io.c
[PATCH v5 0/5] Consolidate IO memcpy functions
Posted by Julian Vetter 2 months ago
Sorry for spaming the mailinglist with new patches. But please forget my
previous patchset. It was broken. I didn't fully understand your
previous comments/feedback. Now, I added the new functions to
iomap_copy.c (as you proposed before already). I guard all of them with
an '#ifndef __memcpy_toio', etc. So, if an architecture already has its
own implementation it will use it. If not, it will either call the new
'__memcpy_{to,from}io' and '__memset_io functions' from 'iomap_copy.c'
or directly the 'memcpy_{to,from}io' and 'memset_io' functions from
'asm-generic/io.h' which are just a wrappers around the __xxx functions.

Signed-off-by: Julian Vetter <jvetter@kalrayinc.com>
---
Changes for v5:
- Added functions to iomap_copy.c as proposed by Arndt
- Removed again the new io_copy.c and related objects
- Removed GENERIC_IO_COPY symbol and instead rely on the existing
  HAS_IOMEM symbol
- Added prototypes of __memcpy_{to,from}io and __memset_io functions to
  asm-generic/io.h
---
Julian Vetter (5):
  Consolidate __memcpy_{to,from}io and __memset_io into iomap_copy.c
  Replace generic memcpy and memset by IO memcpy functions
  Use generic io memcpy functions on the arm64 architecture
  Use generic io memcpy functions on the csky architecture
  Use generic io memcpy functions on the loongarch architecture

 arch/arm64/kernel/io.c         |  87 ---------------------------
 arch/csky/kernel/Makefile      |   2 +-
 arch/csky/kernel/io.c          |  91 ----------------------------
 arch/loongarch/kernel/Makefile |   2 +-
 arch/loongarch/kernel/io.c     |  94 -----------------------------
 include/asm-generic/io.h       |  18 +++++-
 lib/iomap_copy.c               | 107 +++++++++++++++++++++++++++++++++
 7 files changed, 124 insertions(+), 277 deletions(-)
 delete mode 100644 arch/csky/kernel/io.c
 delete mode 100644 arch/loongarch/kernel/io.c

-- 
2.34.1