linux-cvs-patches
[Top] [All Lists]

CVS Update@linux-mips.org: linux

To: linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
From: ralf@linux-mips.org
Date: Tue, 01 Mar 2005 18:12:13 +0000
Reply-to: linux-mips@linux-mips.org
Sender: linux-cvs-patches-bounce@linux-mips.org
CVSROOT:        /home/cvs
Module name:    linux
Changes by:     ralf@ftp.linux-mips.org 05/03/01 18:12:06

Modified files:
        include/asm-mips: hazards.h 

Log message:
        New hazard handling function back_to_back_c0_hazard() to handle back to
        back mtc0 / mfc0 pairs from the same coprocessor register.

diff -urN linux/include/asm-mips/hazards.h linux/include/asm-mips/hazards.h
--- linux/include/asm-mips/hazards.h    2004/12/05 13:36:12     1.7
+++ linux/include/asm-mips/hazards.h    2005/03/01 18:12:06     1.8
@@ -124,6 +124,9 @@
                ".set\tmips32\n\t"                                      \
                "_ssnop; _ssnop; _ssnop; _ssnop\n\t"                    \
                ".set\tmips0")
+
+#define back_to_back_c0_hazard()       do { } while (0)
+
 #else
 
 /*
@@ -141,6 +144,12 @@
                "nop; nop; nop; nop; nop; nop;\n\t"                     \
                ".set reorder\n\t")
 
+#define back_to_back_c0_hazard()                                       \
+       __asm__ __volatile__(                                           \
+       "       .set noreorder                          \n"             \
+       "       nop; nop; nop                           \n"             \
+       "       .set reorder                            \n")
+
 #endif
 
 /*
@@ -170,6 +179,10 @@
        __asm__ __volatile__(                                           \
        "_ehb\t\t\t\t# irq_disable_hazard")
 
+#define back_to_back_c0_hazard()                                       \
+       __asm__ __volatile__(                                           \
+       "_ehb\t\t\t\t# back_to_back_c0_hazard")
+
 #elif defined(CONFIG_CPU_R10000) || defined(CONFIG_CPU_RM9000)
 
 /*
@@ -186,6 +199,8 @@
 #define irq_enable_hazard()    do { } while (0)
 #define irq_disable_hazard()   do { } while (0)
 
+#define back_to_back_c0_hazard()       do { } while (0)
+
 #else
 
 /*
@@ -210,6 +225,12 @@
        __asm__ __volatile__(                                           \
        "_ssnop; _ssnop; _ssnop;\t\t# irq_disable_hazard")
 
+#define back_to_back_c0_hazard()                                       \
+       __asm__ __volatile__(                                           \
+       "       .set noreorder                          \n"             \
+       "       nop; nop; nop                           \n"             \
+       "       .set reorder                            \n")
+
 #endif
 
 #endif /* __ASSEMBLY__ */

<Prev in Thread] Current Thread [Next in Thread>