Enable/disable irq's only if needed.
authorThiemo Seufer <ths@networkno.de>
Mon, 21 Feb 2005 11:44:31 +0000 (11:44 +0000)
committerRalf Baechle <ralf@linux-mips.org>
Sat, 29 Oct 2005 18:30:41 +0000 (19:30 +0100)
Signed-off-by: Thiemo Seufer <ths@networkno.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
include/asm-mips/io.h

index 039845f..1f2fe11 100644 (file)
@@ -319,7 +319,8 @@ static inline type pfx##read##bwlq(volatile void __iomem *mem)              \
        else if (cpu_has_64bits) {                                      \
                unsigned long __flags;                                  \
                                                                        \
-               local_irq_save(__flags);                                \
+               if (irq)                                                \
+                       local_irq_save(__flags);                        \
                __asm__ __volatile__(                                   \
                        ".set   mips3"          "\t\t# __readq" "\n\t"  \
                        "ld     %L0, %1"                        "\n\t"  \
@@ -328,7 +329,8 @@ static inline type pfx##read##bwlq(volatile void __iomem *mem)              \
                        ".set   mips0"                          "\n"    \
                        : "=r" (__val)                                  \
                        : "m" (*__mem));                                \
-               local_irq_restore(__flags);                             \
+               if (irq)                                                \
+                       local_irq_restore(__flags);                     \
        } else {                                                        \
                __val = 0;                                              \
                BUG();                                                  \