Re: Removal of ____raw_readq() and ____raw_writeq() from asm-mips/io.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Below the patch which I've just checked in.

  Ralf

Index: include/asm-mips/io.h
===================================================================
RCS file: /home/cvs/linux/include/asm-mips/io.h,v
retrieving revision 1.68
diff -u -r1.68 io.h
--- include/asm-mips/io.h	19 Jan 2004 21:48:21 -0000	1.68
+++ include/asm-mips/io.h	28 Jan 2004 14:55:57 -0000
@@ -248,12 +248,10 @@
 #define __raw_readw(addr)	(*(volatile unsigned short *)(addr))
 #define __raw_readl(addr)	(*(volatile unsigned int *)(addr))
 #ifdef CONFIG_MIPS32
-#define __raw_readq(addr)						\
+#define ____raw_readq(addr)						\
 ({									\
-	unsigned long __flags;						\
 	u64 __res;							\
 									\
-	local_irq_save(__flags);					\
 	__asm__ __volatile__ (						\
 		"	.set	mips3		# ____raw_readq	\n"	\
 		"	ld	%L0, (%1)			\n"	\
@@ -262,12 +260,22 @@
 		"	.set	mips0				\n"	\
 		: "=r" (__res)						\
 		: "r" (addr));						\
+	__res;								\
+})
+#define __raw_readq(addr)						\
+({									\
+	unsigned long __flags;						\
+	u64 __res;							\
+									\
+	local_irq_save(__flags);					\
+	__res = ____raw_readq(addr);					\
 	local_irq_restore(__flags);					\
 	__res;								\
 })
 #endif
 #ifdef CONFIG_MIPS64
-#define __raw_readq(addr)	(*(volatile unsigned long *)(addr))
+#define ____raw_readq(addr)	(*(volatile unsigned long *)(addr))
+#define __raw_readq(addr)	____raw_readq(addr)
 #endif
 
 #define readb(addr)		__ioswab8(__raw_readb(addr))
@@ -279,12 +287,10 @@
 #define __raw_writew(w,addr)	((*(volatile unsigned short *)(addr)) = (w))
 #define __raw_writel(l,addr)	((*(volatile unsigned int *)(addr)) = (l))
 #ifdef CONFIG_MIPS32
-#define __raw_writeq(val,addr)						\
+#define ____raw_writeq(val,addr)						\
 ({									\
-	unsigned long __flags;						\
 	u64 __tmp;							\
 									\
-	local_irq_save(__flags);					\
 	__asm__ __volatile__ (						\
 		"	.set	mips3				\n"	\
 		"	dsll32	%L0, %L0, 0	# ____raw_writeq\n"	\
@@ -295,11 +301,19 @@
 		"	.set	mips0				\n"	\
 		: "=r" (__tmp)						\
 		: "0" ((unsigned long long)val), "r" (addr));		\
+})
+#define __raw_writeq(val,addr)						\
+({									\
+	unsigned long __flags;						\
+									\
+	local_irq_save(__flags);					\
+	____raw_writeq(val, addr);					\
 	local_irq_restore(__flags);					\
 })
 #endif
 #ifdef CONFIG_MIPS64
-#define __raw_writeq(l,addr)	((*(volatile unsigned long *)(addr)) = (l))
+#define ____raw_writeq(q,addr)	((*(volatile unsigned long *)(addr)) = (q))
+#define __raw_writeq(q,addr)	____raw_writeq(q, addr)
 #endif
 
 #define writeb(b,addr)		__raw_writeb(__ioswab8(b),(addr))


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux