From 9b1cef1fd3a1b188f8cffee45566fb64a5597b63 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Wed, 1 Jun 2011 19:04:59 +0100 Subject: [PATCH] --- yaml --- r: 257183 b: refs/heads/master c: 15f304b664c0d0a3e76ed3a9ce3615a86908babe h: refs/heads/master i: 257181: 88897a445b67bc580107e728df1ec76aea94112f 257179: a07bbd9acf087b7a173b469b970476e639a92ba0 257175: 0ef30d2e1a6647b40e51c26fb4410dd4e1727a14 257167: 01721b9fc079962533809be174ce650befe1724d 257151: 713fc05bc54908e20664b8f16458949d9bb5ec83 v: v3 --- [refs] | 2 +- trunk/arch/arm/mach-footbridge/isa-timer.c | 2 -- trunk/arch/mips/kernel/i8253.c | 3 --- trunk/arch/x86/Kconfig | 1 + trunk/arch/x86/kernel/i8253.c | 3 --- trunk/drivers/clocksource/Kconfig | 6 ++++++ trunk/drivers/clocksource/Makefile | 2 +- trunk/drivers/clocksource/i8253.c | 13 ++++++++++++- trunk/init/Kconfig | 1 + 9 files changed, 22 insertions(+), 11 deletions(-) diff --git a/[refs] b/[refs] index c38b40e57127..b5d6d2da2def 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: cb2455aa274b780802c593fecf115240a655d809 +refs/heads/master: 15f304b664c0d0a3e76ed3a9ce3615a86908babe diff --git a/trunk/arch/arm/mach-footbridge/isa-timer.c b/trunk/arch/arm/mach-footbridge/isa-timer.c index 3c7367be5459..71fd96df7f73 100644 --- a/trunk/arch/arm/mach-footbridge/isa-timer.c +++ b/trunk/arch/arm/mach-footbridge/isa-timer.c @@ -19,8 +19,6 @@ #include "common.h" -DEFINE_RAW_SPINLOCK(i8253_lock); - static void pit_set_mode(enum clock_event_mode mode, struct clock_event_device *evt) { diff --git a/trunk/arch/mips/kernel/i8253.c b/trunk/arch/mips/kernel/i8253.c index 82b5a9f037e7..3d2ff57fa69a 100644 --- a/trunk/arch/mips/kernel/i8253.c +++ b/trunk/arch/mips/kernel/i8253.c @@ -16,9 +16,6 @@ #include #include -DEFINE_RAW_SPINLOCK(i8253_lock); -EXPORT_SYMBOL(i8253_lock); - /* * Initialize the PIT timer. * diff --git a/trunk/arch/x86/Kconfig b/trunk/arch/x86/Kconfig index da349723d411..e6060a1c1b58 100644 --- a/trunk/arch/x86/Kconfig +++ b/trunk/arch/x86/Kconfig @@ -70,6 +70,7 @@ config X86 select IRQ_FORCED_THREADING select USE_GENERIC_SMP_HELPERS if SMP select HAVE_BPF_JIT if (X86_64 && NET) + select I8253_LOCK config INSTRUCTION_DECODER def_bool (KPROBES || PERF_EVENTS) diff --git a/trunk/arch/x86/kernel/i8253.c b/trunk/arch/x86/kernel/i8253.c index 323555050f89..9c92b6ff571f 100644 --- a/trunk/arch/x86/kernel/i8253.c +++ b/trunk/arch/x86/kernel/i8253.c @@ -16,9 +16,6 @@ #include #include -DEFINE_RAW_SPINLOCK(i8253_lock); -EXPORT_SYMBOL(i8253_lock); - /* * HPET replaces the PIT, when enabled. So we need to know, which of * the two timers is used diff --git a/trunk/drivers/clocksource/Kconfig b/trunk/drivers/clocksource/Kconfig index 96c921910469..330343bcb67e 100644 --- a/trunk/drivers/clocksource/Kconfig +++ b/trunk/drivers/clocksource/Kconfig @@ -1,5 +1,11 @@ config CLKSRC_I8253 bool +config I8253_LOCK + bool + +config CLKBLD_I8253 + def_bool y if CLKSRC_I8253 || I8253_LOCK + config CLKSRC_MMIO bool diff --git a/trunk/drivers/clocksource/Makefile b/trunk/drivers/clocksource/Makefile index b995942a5060..7922a0cfc99f 100644 --- a/trunk/drivers/clocksource/Makefile +++ b/trunk/drivers/clocksource/Makefile @@ -6,5 +6,5 @@ obj-$(CONFIG_CS5535_CLOCK_EVENT_SRC) += cs5535-clockevt.o obj-$(CONFIG_SH_TIMER_CMT) += sh_cmt.o obj-$(CONFIG_SH_TIMER_MTU2) += sh_mtu2.o obj-$(CONFIG_SH_TIMER_TMU) += sh_tmu.o -obj-$(CONFIG_CLKSRC_I8253) += i8253.o +obj-$(CONFIG_CLKBLD_I8253) += i8253.o obj-$(CONFIG_CLKSRC_MMIO) += mmio.o diff --git a/trunk/drivers/clocksource/i8253.c b/trunk/drivers/clocksource/i8253.c index 33735ebd2dcc..e594f52eb88e 100644 --- a/trunk/drivers/clocksource/i8253.c +++ b/trunk/drivers/clocksource/i8253.c @@ -6,9 +6,19 @@ #include #include #include - +#include #include +/* + * 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); + +#ifdef CONFIG_CLKSRC_I8253 /* * Since the PIT overflows every tick, its not very useful * to just read by itself. So use jiffies to emulate a free @@ -86,3 +96,4 @@ int __init clocksource_i8253_init(void) { return clocksource_register_hz(&i8253_cs, PIT_TICK_RATE); } +#endif diff --git a/trunk/init/Kconfig b/trunk/init/Kconfig index ebafac4231ee..2d2ef447a9ab 100644 --- a/trunk/init/Kconfig +++ b/trunk/init/Kconfig @@ -1002,6 +1002,7 @@ config ELF_CORE config PCSPKR_PLATFORM bool "Enable PC-Speaker support" if EXPERT depends on ALPHA || X86 || MIPS || PPC_PREP || PPC_CHRP || PPC_PSERIES + select I8253_LOCK default y help This option allows to disable the internal PC-Speaker