1/* 2 * This file is subject to the terms and conditions of the GNU General Public 3 * License. See the file "COPYING" in the main directory of this archive 4 * for more details. 5 * 6 * Copyright (C) 2003 Ralf Baechle 7 */ 8#ifndef _ASM_HAZARDS_H 9#define _ASM_HAZARDS_H 10 11#include <linux/config.h> 12 13#ifdef __ASSEMBLY__ 14 15/* 16 * RM9000 hazards. When the JTLB is updated by tlbwi or tlbwr, a subsequent 17 * use of the JTLB for instructions should not occur for 4 cpu cycles and use 18 * for data translations should not occur for 3 cpu cycles. 19 */ 20#ifdef CONFIG_CPU_RM9000 21#define rm9000_tlb_hazard \ 22 .set push; \ 23 .set mips32; \ 24 ssnop; ssnop; ssnop; ssnop; \ 25 .set pop 26#else 27#define rm9000_tlb_hazard 28#endif 29 30#else 31 32/* 33 * RM9000 hazards. When the JTLB is updated by tlbwi or tlbwr, a subsequent 34 * use of the JTLB for instructions should not occur for 4 cpu cycles and use 35 * for data translations should not occur for 3 cpu cycles. 36 */ 37#ifdef CONFIG_CPU_RM9000 38#define rm9000_tlb_hazard() \ 39 __asm__ __volatile__( \ 40 ".set\tmips32\n\t" \ 41 "ssnop; ssnop; ssnop; ssnop\n\t" \ 42 ".set\tmips0") 43#else 44#define rm9000_tlb_hazard() do { } while (0) 45#endif 46 47#endif 48 49#endif /* _ASM_HAZARDS_H */ 50

