patch-2.3.33 linux/drivers/char/agp/agp.h

Next file: linux/drivers/char/agp/agpgart_be.c
Previous file: linux/drivers/block/Config.in
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.32/linux/drivers/char/agp/agp.h linux/drivers/char/agp/agp.h
@@ -134,13 +134,13 @@
 #endif
 };
 
-#define OUTREG32(mmap, addr, val)   *(volatile u32 *)(mmap + (addr)) = (val)
-#define OUTREG16(mmap, addr, val)   *(volatile u16 *)(mmap + (addr)) = (val)
-#define OUTREG8 (mmap, addr, val)   *(volatile u8 *) (mmap + (addr)) = (val)
+#define OUTREG32(mmap, addr, val)   __raw_writel((val), (mmap)+(addr))
+#define OUTREG16(mmap, addr, val)   __raw_writew((val), (mmap)+(addr))
+#define OUTREG8 (mmap, addr, val)   __raw_writeb((val), (mmap)+(addr))
 
-#define INREG32(mmap, addr)         *(volatile u32 *)(mmap + (addr))
-#define INREG16(mmap, addr)         *(volatile u16 *)(mmap + (addr))
-#define INREG8 (mmap, addr)         *(volatile u8 *) (mmap + (addr))
+#define INREG32(mmap, addr)         __raw_readl((mmap)+(addr))
+#define INREG16(mmap, addr)         __raw_readw((mmap)+(addr))
+#define INREG8 (mmap, addr)         __raw_readb((mmap)+(addr))
 
 #define CACHE_FLUSH	agp_bridge.cache_flush
 #define A_SIZE_8(x)	((aper_size_info_8 *) x)

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)