[patch 03/14] i8253: Consolidate all kernel definitions of i8253_lock in lib/i8253-lock.c.
From: ralf
Date: Wed Jun 01 2011 - 15:52:28 EST
Signed-off-by: Ralf Baechle <ralf@xxxxxxxxxxxxxx>
To: linux-kernel@xxxxxxxxxxxxxxx
lib/Kconfig | 6 ++++++
lib/Makefile | 1 +
lib/i8253-lock.c | 11 +++++++++++
3 files changed, 18 insertions(+)
Index: linux-i8253/lib/i8253-lock.c
===================================================================
--- /dev/null
+++ linux-i8253/lib/i8253-lock.c
@@ -0,0 +1,11 @@
+#include <linux/spinlock.h>
+#include <linux/module.h>
+
+/*
+ * Protects access to I/O ports
+ *
+ * 0040-0043 : timer0, i8253 / i8254
+ * 0061-0061 : NMI Control Register which contains two speaker control bits.
+ */
+DEFINE_RAW_SPINLOCK(i8253_lock);
+EXPORT_SYMBOL(i8253_lock);
Index: linux-i8253/lib/Makefile
===================================================================
--- linux-i8253.orig/lib/Makefile
+++ linux-i8253/lib/Makefile
@@ -37,6 +37,7 @@ obj-$(CONFIG_HAS_IOMEM) += iomap_copy.o
obj-$(CONFIG_CHECK_SIGNATURE) += check_signature.o
obj-$(CONFIG_DEBUG_LOCKING_API_SELFTESTS) += locking-selftest.o
obj-$(CONFIG_DEBUG_SPINLOCK) += spinlock_debug.o
+obj-$(CONFIG_I8253_LOCK) += i8253-lock.o
lib-$(CONFIG_RWSEM_GENERIC_SPINLOCK) += rwsem-spinlock.o
lib-$(CONFIG_RWSEM_XCHGADD_ALGORITHM) += rwsem.o
Index: linux-i8253/lib/Kconfig
===================================================================
--- linux-i8253.orig/lib/Kconfig
+++ linux-i8253/lib/Kconfig
@@ -237,6 +237,12 @@ config CPU_RMAP
bool
depends on SMP
+config I8253_LOCK
+ bool
+ help
+ Enable the shared lock for the i8253 PIT. Any system that uses
+ the i8253 should select this.
+
#
# Netlink attribute parsing support is select'ed if needed
#
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/