1 --- a/include/asm-mips/hazards.h
2 +++ b/include/asm-mips/hazards.h
6 ASMMACRO(back_to_back_c0_hazard,
8 + _ssnop; _ssnop; _ssnop; _ehb
11 * gcc has a tradition of misscompiling the previous construct using the
12 --- a/arch/mips/kernel/cevt-r4k.c
13 +++ b/arch/mips/kernel/cevt-r4k.c
16 if (c0_compare_int_pending()) {
17 write_c0_compare(read_c0_count());
18 - irq_disable_hazard();
19 + back_to_back_c0_hazard();
20 if (c0_compare_int_pending())
24 cnt = read_c0_count();
26 write_c0_compare(cnt);
27 - irq_disable_hazard();
28 + back_to_back_c0_hazard();
29 if ((int)(read_c0_count() - cnt) < 0)
31 /* increase delta if the timer was already expired */
33 while ((int)(read_c0_count() - cnt) <= 0)
34 ; /* Wait for expiry */
36 + back_to_back_c0_hazard();
37 if (!c0_compare_int_pending())
40 write_c0_compare(read_c0_count());
41 - irq_disable_hazard();
42 + back_to_back_c0_hazard();
43 if (c0_compare_int_pending())