[PATCHv2 04/14] m68k: rework raw access macros for the non-MMU case

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

 



The primary and fundamental access macros are really the __raw versions.
So make them the actual implementation for access, and not the read/write
access macros. The read/write macros and functions are built on top of
the raw access (with byte swapping or other actions as required).

This in itself causes no functional change right now. But it will make it
easier to fix and resolve problems with PCI bus access in the future.

Signed-off-by: Greg Ungerer <gerg@xxxxxxxxxxxxxx>
Reviewed-by: Angelo Dureghello <angelo@xxxxxxxx>
---
 arch/m68k/include/asm/io_no.h | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

v2: rebase to v4.17-rc1
    fix compilation warnings
    drop read/write iomem() conversions

diff --git a/arch/m68k/include/asm/io_no.h b/arch/m68k/include/asm/io_no.h
index acd0498..5095693 100644
--- a/arch/m68k/include/asm/io_no.h
+++ b/arch/m68k/include/asm/io_no.h
@@ -7,23 +7,23 @@
  * functions have always worked in CPU native endian. We need to define
  * that behavior here first before we include asm-generic/io.h.
  */
-#define readb(addr) \
+#define __raw_readb(addr) \
     ({ unsigned char __v = (*(volatile unsigned char *) (addr)); __v; })
-#define readw(addr) \
+#define __raw_readw(addr) \
     ({ unsigned short __v = (*(volatile unsigned short *) (addr)); __v; })
-#define readl(addr) \
+#define __raw_readl(addr) \
     ({ unsigned int __v = (*(volatile unsigned int *) (addr)); __v; })
 
-#define writeb(b,addr) (void)((*(volatile unsigned char *) (addr)) = (b))
-#define writew(b,addr) (void)((*(volatile unsigned short *) (addr)) = (b))
-#define writel(b,addr) (void)((*(volatile unsigned int *) (addr)) = (b))
+#define __raw_writeb(b, addr) (void)((*(volatile unsigned char *) (addr)) = (b))
+#define __raw_writew(b, addr) (void)((*(volatile unsigned short *) (addr)) = (b))
+#define __raw_writel(b, addr) (void)((*(volatile unsigned int *) (addr)) = (b))
 
-#define __raw_readb readb
-#define __raw_readw readw
-#define __raw_readl readl
-#define __raw_writeb writeb
-#define __raw_writew writew
-#define __raw_writel writel
+#define readb __raw_readb
+#define readw __raw_readw
+#define readl __raw_readl
+#define writeb __raw_writeb
+#define writew __raw_writew
+#define writel __raw_writel
 
 #include <asm/virtconvert.h>
 #include <asm-generic/io.h>
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Video for Linux]     [Yosemite News]     [Linux S/390]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux