[parisc-linux-cvs] added: gsc_memset_io(void *s, int c, size_t n)

Helge Deller deller@gmx.de
Fri, 2 Mar 2001 01:17:18 +0100


I added the memset()-variant for the gsc-bus as inlined version.
It would be nice if someone could write me a speed-optimized 
assembler-variant instead :-)

retrieving revision 1.8
diff -u -r1.8 gsc.h
--- gsc.h       2001/01/25 00:03:08     1.8
+++ gsc.h       2001/03/02 00:03:33
@@ -32,6 +32,14 @@
 #define gsc_writel(v,a)        _gsc_writel((v),(void *)(a))
 #define gsc_writeq(v,a)        _gsc_writeq((v),(void *)(a))
 
+static __inline__ void *gsc_memset_io(void *s, int c, size_t n)
+{
+       while (n--) {
+               gsc_writeb(c,s++);
+       }
+       return NULL;
+}
+
 struct gsc_dev {
        struct gsc_bus  *bus;           /* bus this device is on */
        struct gsc_dev  *next;