[parisc-linux-cvs] 2.5.54-pa2

Helge Deller deller@gmx.de
Mon, 6 Jan 2003 19:15:35 +0100


--Boundary-00=_HfcG+8F8QFp1RVA
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On Monday 06 January 2003 19:11, Helge Deller wrote:
> CVSROOT:	/var/cvs
> Module name:	linux-2.5
> Changes by:	deller	03/01/06 11:11:19
>
> Modified files:
> 	.              : Makefile
> 	arch/parisc/kernel: parisc_ksyms.c
> 	arch/parisc/lib: io.c
> 	include/asm-parisc: io.h
> 	drivers/video  : sstfb.c stifb.c
>
> Log message:
> 2.5.54-pa2:
> - improve parameter types of memset_XX() and read/writeXX() functions,
> gives a lot less warnings when compiling the kernel
> - use fb_memset() instead of memset_io() in the graphics drivers




--Boundary-00=_HfcG+8F8QFp1RVA
Content-Type: text/plain;
  charset="iso-8859-1";
  name="diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="diff"

Index: Makefile
===================================================================
RCS file: /var/cvs/linux-2.5/Makefile,v
retrieving revision 1.62
diff -u -p -r1.62 Makefile
--- Makefile	6 Jan 2003 15:45:20 -0000	1.62
+++ Makefile	6 Jan 2003 18:05:55 -0000
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 5
 SUBLEVEL = 54
-EXTRAVERSION = -pa1
+EXTRAVERSION = -pa2
 
 # *DOCUMENTATION*
 # To see a list of typical targets execute "make help"
Index: arch/parisc/kernel/parisc_ksyms.c
===================================================================
RCS file: /var/cvs/linux-2.5/arch/parisc/kernel/parisc_ksyms.c,v
retrieving revision 1.12
diff -u -p -r1.12 parisc_ksyms.c
--- arch/parisc/kernel/parisc_ksyms.c	6 Jan 2003 06:00:23 -0000	1.12
+++ arch/parisc/kernel/parisc_ksyms.c	6 Jan 2003 18:05:55 -0000
@@ -86,9 +86,9 @@ EXPORT_SYMBOL(pdc_iodc_read);
 #include <asm/io.h>
 EXPORT_SYMBOL(__ioremap);
 EXPORT_SYMBOL(iounmap);
-EXPORT_SYMBOL(memcpy_toio);
-EXPORT_SYMBOL(memcpy_fromio);
-EXPORT_SYMBOL(memset_io);
+EXPORT_SYMBOL(__memcpy_toio);
+EXPORT_SYMBOL(__memcpy_fromio);
+EXPORT_SYMBOL(__memset_io);
 
 #if defined(CONFIG_PCI) || defined(CONFIG_ISA)
 EXPORT_SYMBOL(inb);
Index: arch/parisc/lib/io.c
===================================================================
RCS file: /var/cvs/linux-2.5/arch/parisc/lib/io.c,v
retrieving revision 1.1
diff -u -p -r1.1 io.c
--- arch/parisc/lib/io.c	20 Jul 2002 16:27:06 -0000	1.1
+++ arch/parisc/lib/io.c	6 Jan 2003 18:05:55 -0000
@@ -14,9 +14,9 @@
  * Assumes the device can cope with 32-bit transfers.  If it can't,
  * don't use this function.
  */
-void memcpy_toio(unsigned long dest, const void *src, int count)
+void __memcpy_toio(unsigned long dest, unsigned long src, int count)
 {
-	if ((dest & 3) != ((unsigned long)src & 3))
+	if ((dest & 3) != (src & 3))
 		goto bytecopy;
 	while (dest & 3) {
 		writeb(*(char *)src, dest++);
@@ -25,7 +25,7 @@ void memcpy_toio(unsigned long dest, con
 	}
 	while (count > 3) {
 		__raw_writel(*(u32 *)src, dest);
-		(unsigned long) src += 4;
+		src += 4;
 		dest += 4;
 		count -= 4;
 	}
@@ -49,13 +49,13 @@ void memcpy_toio(unsigned long dest, con
 **      Minimize total number of transfers at cost of CPU cycles.
 **	TODO: only look at src alignment and adjust the stores to dest.
 */
-void memcpy_fromio(void *dest, unsigned long src, int count)
+void __memcpy_fromio(unsigned long dest, unsigned long src, int count)
 {
 	/* first compare alignment of src/dst */ 
-	if ( (((unsigned long)dest ^ src) & 1) || (count < 2) )
+	if ( ((dest ^ src) & 1) || (count < 2) )
 		goto bytecopy;
 
-	if ( (((unsigned long)dest ^ src) & 2) || (count < 4) )
+	if ( ((dest ^ src) & 2) || (count < 4) )
 		goto shortcopy;
 
 	/* Then check for misaligned start address */
@@ -101,7 +101,7 @@ void memcpy_fromio(void *dest, unsigned 
  * Assumes the device can cope with 32-bit transfers.  If it can't,
  * don't use this function.
  */
-void memset_io(unsigned long dest, char fill, int count)
+void __memset_io(unsigned long dest, char fill, int count)
 {
 	u32 fill32 = (fill << 24) | (fill << 16) | (fill << 8) | fill;
 	while (dest & 3) {
Index: include/asm-parisc/io.h
===================================================================
RCS file: /var/cvs/linux-2.5/include/asm-parisc/io.h,v
retrieving revision 1.5
diff -u -p -r1.5 io.h
--- include/asm-parisc/io.h	1 Nov 2002 01:04:30 -0000	1.5
+++ include/asm-parisc/io.h	6 Jan 2003 18:05:56 -0000
@@ -37,7 +37,7 @@ extern inline void * ioremap(unsigned lo
  * it's useful if some control registers are in such an area and write combining
  * or read caching is not desirable:
  */
-extern inline void * ioremap_nocache (unsigned long offset, unsigned long size)
+extern inline void * ioremap_nocache(unsigned long offset, unsigned long size)
 {
         return __ioremap(offset, size, _PAGE_NO_CACHE /* _PAGE_PCD */);
 }
@@ -49,7 +49,8 @@ extern void iounmap(void *addr);
  * too lazy to ioremap first'.  kind of like isa_, except that there's
  * no additional base address to add on.
  */
-extern __inline__ unsigned char __raw_readb(unsigned long addr)
+#define __raw_readb(a) ___raw_readb((unsigned long)(a))
+extern __inline__ unsigned char ___raw_readb(unsigned long addr)
 {
 	long flags;
 	unsigned char ret;
@@ -63,7 +64,8 @@ extern __inline__ unsigned char __raw_re
 	return ret;
 }
 
-extern __inline__ unsigned short __raw_readw(unsigned long addr)
+#define __raw_readw(a) ___raw_readw((unsigned long)(a))
+extern __inline__ unsigned short ___raw_readw(unsigned long addr)
 {
 	long flags;
 	unsigned short ret;
@@ -77,7 +79,8 @@ extern __inline__ unsigned short __raw_r
 	return ret;
 }
 
-extern __inline__ unsigned int __raw_readl(unsigned long addr)
+#define __raw_readl(a) ___raw_readl((unsigned long)(a))
+extern __inline__ unsigned int ___raw_readl(unsigned long addr)
 {
 	u32 ret;
 
@@ -88,7 +91,8 @@ extern __inline__ unsigned int __raw_rea
 	return ret;
 }
 
-extern __inline__ unsigned long long __raw_readq(unsigned long addr)
+#define __raw_readq(a) ___raw_readq((unsigned long)(a))
+extern __inline__ unsigned long long ___raw_readq(unsigned long addr)
 {
 	unsigned long long ret;
 #ifdef __LP64__
@@ -103,7 +107,8 @@ extern __inline__ unsigned long long __r
 	return ret;
 }
 
-extern __inline__ void __raw_writeb(unsigned char val, unsigned long addr)
+#define __raw_writeb(a,b) ___raw_writeb(a, (unsigned long)(b))
+extern __inline__ void ___raw_writeb(unsigned char val, unsigned long addr)
 {
 	long flags;
 	__asm__ __volatile__(
@@ -113,7 +118,8 @@ extern __inline__ void __raw_writeb(unsi
 	: "=&r" (flags) :  "r" (val), "r" (addr) );
 }
 
-extern __inline__ void __raw_writew(unsigned short val, unsigned long addr)
+#define __raw_writew(a,b) ___raw_writew(a, (unsigned long)(b))
+extern __inline__ void ___raw_writew(unsigned short val, unsigned long addr)
 {
 	long flags;
 	__asm__ __volatile__(
@@ -123,14 +129,16 @@ extern __inline__ void __raw_writew(unsi
 	: "=&r" (flags) :  "r" (val), "r" (addr) );
 }
 
-extern __inline__ void __raw_writel(unsigned int val, unsigned long addr)
+#define __raw_writel(a,b) ___raw_writel(a, (unsigned long)(b))
+extern __inline__ void ___raw_writel(unsigned int val, unsigned long addr)
 {
 	__asm__ __volatile__(
 	"	stwas	%0,0(%1)\n"
 	: :  "r" (val), "r" (addr) );
 }
 
-extern __inline__ void __raw_writeq(unsigned long long val, unsigned long addr)
+#define __raw_writeq(a,b) ___raw_writeq(a, (unsigned long)(b))
+extern __inline__ void ___raw_writeq(unsigned long long val, unsigned long addr)
 {
 #ifdef __LP64__
 	__asm__ __volatile__(
@@ -153,19 +161,23 @@ extern __inline__ void __raw_writeq(unsi
 #define writel(b,addr) (*(volatile unsigned int *) (addr) = (b))
 #define writeq(b,addr) (*(volatile u64 *) (addr) = (b))
 #else /* !USE_HPPA_IOREMAP */
-#define readb(addr) __raw_readb((unsigned long)(addr))
-#define readw(addr) le16_to_cpu(__raw_readw((unsigned long)(addr)))
-#define readl(addr) le32_to_cpu(__raw_readl((unsigned long)(addr)))
-#define readq(addr) le64_to_cpu(__raw_readq((unsigned long)(addr)))
-#define writeb(b,addr) __raw_writeb(b,(unsigned long)(addr))
-#define writew(b,addr) __raw_writew(cpu_to_le16(b),(unsigned long)(addr))
-#define writel(b,addr) __raw_writel(cpu_to_le32(b),(unsigned long)(addr))
-#define writeq(b,addr) __raw_writeq(cpu_to_le64(b),(unsigned long)(addr))
+#define readb(addr) __raw_readb(addr)
+#define readw(addr) le16_to_cpu(__raw_readw(addr))
+#define readl(addr) le32_to_cpu(__raw_readl(addr))
+#define readq(addr) le64_to_cpu(__raw_readq(addr))
+#define writeb(b,addr) __raw_writeb(b,addr)
+#define writew(b,addr) __raw_writew(cpu_to_le16(b),addr)
+#define writel(b,addr) __raw_writel(cpu_to_le32(b),addr)
+#define writeq(b,addr) __raw_writeq(cpu_to_le64(b),addr)
 #endif /* !USE_HPPA_IOREMAP */
 
-extern void memcpy_fromio(void *dest, unsigned long src, int count);
-extern void memcpy_toio(unsigned long dest, const void *src, int count);
-extern void memset_io(unsigned long dest, char fill, int count);
+extern void __memcpy_fromio(unsigned long dest, unsigned long src, int count);
+extern void __memcpy_toio(unsigned long dest, unsigned long src, int count);
+extern void __memset_io(unsigned long dest, char fill, int count);
+
+#define memcpy_fromio(a,b,c) __memcpy_fromio((unsigned long)(a), (unsigned long)(b), (c))
+#define memcpy_toio(a,b,c)   __memcpy_toio((unsigned long)(a), (unsigned long)(b), (c))
+#define memset_io(a,b,c)     __memset_io((unsigned long)(a), (b), (c))
 
 /* Support old drivers which don't ioremap.
  * NB this interface is scheduled to disappear in 2.5
@@ -186,12 +198,12 @@ extern void memset_io(unsigned long dest
  * These functions support PA-RISC drivers which don't yet call ioremap().
  * They will disappear once the last of these drivers is gone.
  */
-#define gsc_readb(x) __raw_readb((unsigned long)x)
-#define gsc_readw(x) __raw_readw((unsigned long)x)
-#define gsc_readl(x) __raw_readl((unsigned long)x)
-#define gsc_writeb(x, y) __raw_writeb(x, (unsigned long)y)
-#define gsc_writew(x, y) __raw_writew(x, (unsigned long)y)
-#define gsc_writel(x, y) __raw_writel(x, (unsigned long)y)
+#define gsc_readb(x) __raw_readb(x)
+#define gsc_readw(x) __raw_readw(x)
+#define gsc_readl(x) __raw_readl(x)
+#define gsc_writeb(x, y) __raw_writeb(x, y)
+#define gsc_writew(x, y) __raw_writew(x, y)
+#define gsc_writel(x, y) __raw_writel(x, y)
 
 
 /*
@@ -275,7 +287,7 @@ extern void outsl (unsigned long port, c
 #define IO_SPACE_LIMIT 0x00ffffff
 
 
-#define dma_cache_inv(_start,_size)		do { flush_kernel_dcache_range(_start,_size); } while(0)
+#define dma_cache_inv(_start,_size)		do { flush_kernel_dcache_range(_start,_size); } while (0)
 #define dma_cache_wback(_start,_size)		do { flush_kernel_dcache_range(_start,_size); } while (0)
 #define dma_cache_wback_inv(_start,_size)	do { flush_kernel_dcache_range(_start,_size); } while (0)
 
Index: drivers/video/sstfb.c
===================================================================
RCS file: /var/cvs/linux-2.5/drivers/video/sstfb.c,v
retrieving revision 1.10
diff -u -p -r1.10 sstfb.c
--- drivers/video/sstfb.c	6 Jan 2003 16:54:18 -0000	1.10
+++ drivers/video/sstfb.c	6 Jan 2003 18:06:01 -0000
@@ -377,7 +377,7 @@ static int sst_calc_pll(const int freq, 
 static void sstfb_clear_screen(struct fb_info *info)
 {
 	/* clear screen */
-	memset_io(info->screen_base, 0, info->fix.smem_len);
+	fb_memset(info->screen_base, 0, info->fix.smem_len);
 }
 
 
Index: drivers/video/stifb.c
===================================================================
RCS file: /var/cvs/linux-2.5/drivers/video/stifb.c,v
retrieving revision 1.7
diff -u -p -r1.7 stifb.c
--- drivers/video/stifb.c	14 Dec 2002 11:12:52 -0000	1.7
+++ drivers/video/stifb.c	6 Jan 2003 18:06:01 -0000
@@ -487,8 +487,7 @@ rattlerSetupPlanes(struct stifb_info *fb
 	SETUP_HW(fb);
 	WRITE_BYTE(1, fb, REG_16b1);
 
-	/* XXX: replace by fb_setmem(), smem_start or screen_base ? */
-	memset_io(fb->info.fix.smem_start, 0xff,
+	fb_memset(fb->info.fix.smem_start, 0xff,
 		fb->info.var.yres*fb->info.fix.line_length);
     
 	CRX24_SET_OVLY_MASK(fb);

--Boundary-00=_HfcG+8F8QFp1RVA--