From b651cb0c60923dbe162fb47170edf8244568600b Mon Sep 17 00:00:00 2001 From: Ian Abbott Date: Tue, 4 Dec 2007 15:30:39 +0000 Subject: [PATCH] Define mmiowb() macro if necessary. --- include/asm/io.h | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 include/asm/io.h 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 -- 2.26.2