]> rtime.felk.cvut.cz Git - lisovros/linux_canprio.git/commitdiff
Use i8253.c lock for PC speaker on MIPS, too.
authorRalf Baechle <ralf@linux-mips.org>
Fri, 2 Nov 2007 17:26:06 +0000 (17:26 +0000)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Sat, 3 Nov 2007 02:39:18 +0000 (19:39 -0700)
The Jazz machines have to use the PIT timer for dyntick and highresolution
kernels.  This may break because currently just like i386 used to do MIPS
uses two separate spinlocks in the actual PIT code and the PC speaker
code.  So switch to do it the same that x86 currently does PIT locking.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/mips/kernel/i8253.c
drivers/input/misc/pcspkr.c
include/asm-mips/i8253.h

index a925abd8d29e2011cb18b4dbee4ac4ae1c23fc31..c2d497ceffdd3249c9275157160daddbf705c45a 100644 (file)
@@ -14,7 +14,7 @@
 #include <asm/io.h>
 #include <asm/time.h>
 
-static DEFINE_SPINLOCK(i8253_lock);
+DEFINE_SPINLOCK(i8253_lock);
 
 /*
  * Initialize the PIT timer.
index 4941a9e61e902967a410404f0b67171bdbdb51d5..43aaa5cebd1224f8a39dcac296546c49f73597f2 100644 (file)
@@ -24,7 +24,7 @@ MODULE_DESCRIPTION("PC Speaker beeper driver");
 MODULE_LICENSE("GPL");
 MODULE_ALIAS("platform:pcspkr");
 
-#ifdef CONFIG_X86
+#if defined(CONFIG_MIPS) || defined(CONFIG_X86)
 /* Use the global PIT lock ! */
 #include <asm/i8253.h>
 #else
index 778b2f0239056c4361abecae0f3fb03dfc0b1cd2..032ca73f181bec27c0f7b741862ada66ec104342 100644 (file)
@@ -5,11 +5,15 @@
 #ifndef __ASM_I8253_H
 #define __ASM_I8253_H
 
+#include <linux/spinlock.h>
+
 /* i8253A PIT registers */
 #define PIT_MODE               0x43
 #define PIT_CH0                        0x40
 #define PIT_CH2                        0x42
 
+extern spinlock_t i8253_lock;
+
 extern void setup_pit_timer(void);
 
 #endif /* __ASM_I8253_H */