diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2012-06-23 21:53:39 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2012-06-23 21:53:39 +0000 |
commit | 324f4b04e0878b995b836bdbbb069e524a5b6615 (patch) | |
tree | c1a4b055719c43657f274fd1d554f367d6b49ea1 /sys/arch/mips64/include | |
parent | c9fa7acb2556d034f248b0805d6f06c2a364ccdb (diff) |
Fix ITLBNOPFIX macro definition on RM7000-capable kernels, and use it
in cp0_set_config() for consistency.
Diffstat (limited to 'sys/arch/mips64/include')
-rw-r--r-- | sys/arch/mips64/include/asm.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/arch/mips64/include/asm.h b/sys/arch/mips64/include/asm.h index 65289dcaf37..bc538953caa 100644 --- a/sys/arch/mips64/include/asm.h +++ b/sys/arch/mips64/include/asm.h @@ -1,4 +1,4 @@ -/* $OpenBSD: asm.h,v 1.14 2011/03/23 16:54:36 pirofti Exp $ */ +/* $OpenBSD: asm.h,v 1.15 2012/06/23 21:53:38 miod Exp $ */ /* * Copyright (c) 2001-2002 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -30,8 +30,13 @@ #include <machine/regdef.h> -#ifdef NEED_OLD_RM7KFIX -#define ITLBNOPFIX nop;nop;nop;nop;nop;nop;nop;nop;nop;nop; +/* + * Due to a flaw in RM7000 1.x processors a pipeline 'drain' is + * required after some mtc0 instructions. + * Ten nops in sequence does the trick. + */ +#ifdef CPU_RM7000 +#define ITLBNOPFIX nop;nop;nop;nop;nop;nop;nop;nop;nop;nop #else #define ITLBNOPFIX nop;nop;nop;nop #endif |