From: Ian Abbott Date: Tue, 4 Dec 2007 15:30:39 +0000 (+0000) Subject: Define mmiowb() macro if necessary. X-Git-Tag: v0_7_76~31 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=b651cb0c60923dbe162fb47170edf8244568600b;p=comedi.git Define mmiowb() macro if necessary. --- diff --git a/include/asm/io.h b/include/asm/io.h new file mode 100644 index 00000000..a3e8b207 --- /dev/null +++ b/include/asm/io.h @@ -0,0 +1,42 @@ +/* + * asm/io.h compatibility header + */ + +#ifndef __COMPAT_ASM_IO_H_ +#define __COMPAT_ASM_IO_H_ + +#include + +#include_next + +#ifndef mmiowb /* Defined in 2.6.10 */ + +#if defined(CONFIG_MIPS) + +/* Depends on MIPS II instruction set */ +#define mmiowb() asm volatile ("sync" ::: "memory") + +#elif defined(CONFIG_IA64) + +/* IA64 */ +#ifdef CONFIG_IA64_SGI_SN2 +#include +#define platform_mmiowb sn_mmiob +#endif + +#ifndef platform_mmiowb +#define platform_mmiowb ia64_mfa +#endif + +#define mmiowb() platform_mmiowb() + +#else + +/* Other architectures */ +#define mmiowb() + +#endif + +#endif /* mmiowb */ + +#endif