diff options
author | Thiemo Seufer <ths@networkno.de> | 2005-02-21 06:44:31 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2005-10-29 14:30:41 -0400 |
commit | 049b13c358f0187cf3c5003d5fb9848dbcb28bc3 (patch) | |
tree | f37a46c080ae49ca932ca23ba33f44a80aca688a | |
parent | 9f83d839dfd2dbe421224c29f02cef77f5b4b875 (diff) |
Enable/disable irq's only if needed.
Signed-off-by: Thiemo Seufer <ths@networkno.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r-- | include/asm-mips/io.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/asm-mips/io.h b/include/asm-mips/io.h index 039845f2e6b0..1f2fe11f4124 100644 --- a/include/asm-mips/io.h +++ b/include/asm-mips/io.h | |||
@@ -319,7 +319,8 @@ static inline type pfx##read##bwlq(volatile void __iomem *mem) \ | |||
319 | else if (cpu_has_64bits) { \ | 319 | else if (cpu_has_64bits) { \ |
320 | unsigned long __flags; \ | 320 | unsigned long __flags; \ |
321 | \ | 321 | \ |
322 | local_irq_save(__flags); \ | 322 | if (irq) \ |
323 | local_irq_save(__flags); \ | ||
323 | __asm__ __volatile__( \ | 324 | __asm__ __volatile__( \ |
324 | ".set mips3" "\t\t# __readq" "\n\t" \ | 325 | ".set mips3" "\t\t# __readq" "\n\t" \ |
325 | "ld %L0, %1" "\n\t" \ | 326 | "ld %L0, %1" "\n\t" \ |
@@ -328,7 +329,8 @@ static inline type pfx##read##bwlq(volatile void __iomem *mem) \ | |||
328 | ".set mips0" "\n" \ | 329 | ".set mips0" "\n" \ |
329 | : "=r" (__val) \ | 330 | : "=r" (__val) \ |
330 | : "m" (*__mem)); \ | 331 | : "m" (*__mem)); \ |
331 | local_irq_restore(__flags); \ | 332 | if (irq) \ |
333 | local_irq_restore(__flags); \ | ||
332 | } else { \ | 334 | } else { \ |
333 | __val = 0; \ | 335 | __val = 0; \ |
334 | BUG(); \ | 336 | BUG(); \ |