aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-footbridge/isa-timer.c2
-rw-r--r--arch/mips/kernel/i8253.c3
-rw-r--r--arch/x86/Kconfig1
-rw-r--r--arch/x86/kernel/i8253.c3
-rw-r--r--drivers/clocksource/Kconfig6
-rw-r--r--drivers/clocksource/Makefile2
-rw-r--r--drivers/clocksource/i8253.c13
-rw-r--r--init/Kconfig1
8 files changed, 21 insertions, 10 deletions
diff --git a/arch/arm/mach-footbridge/isa-timer.c b/arch/arm/mach-footbridge/isa-timer.c
index 3c7367be5459..71fd96df7f73 100644
--- a/arch/arm/mach-footbridge/isa-timer.c
+++ b/arch/arm/mach-footbridge/isa-timer.c
@@ -19,8 +19,6 @@
19 19
20#include "common.h" 20#include "common.h"
21 21
22DEFINE_RAW_SPINLOCK(i8253_lock);
23
24static void pit_set_mode(enum clock_event_mode mode, 22static void pit_set_mode(enum clock_event_mode mode,
25 struct clock_event_device *evt) 23 struct clock_event_device *evt)
26{ 24{
diff --git a/arch/mips/kernel/i8253.c b/arch/mips/kernel/i8253.c
index 82b5a9f037e7..3d2ff57fa69a 100644
--- a/arch/mips/kernel/i8253.c
+++ b/arch/mips/kernel/i8253.c
@@ -16,9 +16,6 @@
16#include <asm/io.h> 16#include <asm/io.h>
17#include <asm/time.h> 17#include <asm/time.h>
18 18
19DEFINE_RAW_SPINLOCK(i8253_lock);
20EXPORT_SYMBOL(i8253_lock);
21
22/* 19/*
23 * Initialize the PIT timer. 20 * Initialize the PIT timer.
24 * 21 *
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index da349723d411..e6060a1c1b58 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -70,6 +70,7 @@ config X86
70 select IRQ_FORCED_THREADING 70 select IRQ_FORCED_THREADING
71 select USE_GENERIC_SMP_HELPERS if SMP 71 select USE_GENERIC_SMP_HELPERS if SMP
72 select HAVE_BPF_JIT if (X86_64 && NET) 72 select HAVE_BPF_JIT if (X86_64 && NET)
73 select I8253_LOCK
73 74
74config INSTRUCTION_DECODER 75config INSTRUCTION_DECODER
75 def_bool (KPROBES || PERF_EVENTS) 76 def_bool (KPROBES || PERF_EVENTS)
diff --git a/arch/x86/kernel/i8253.c b/arch/x86/kernel/i8253.c
index 323555050f89..9c92b6ff571f 100644
--- a/arch/x86/kernel/i8253.c
+++ b/arch/x86/kernel/i8253.c
@@ -16,9 +16,6 @@
16#include <asm/hpet.h> 16#include <asm/hpet.h>
17#include <asm/smp.h> 17#include <asm/smp.h>
18 18
19DEFINE_RAW_SPINLOCK(i8253_lock);
20EXPORT_SYMBOL(i8253_lock);
21
22/* 19/*
23 * HPET replaces the PIT, when enabled. So we need to know, which of 20 * HPET replaces the PIT, when enabled. So we need to know, which of
24 * the two timers is used 21 * the two timers is used
diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
index 96c921910469..330343bcb67e 100644
--- a/drivers/clocksource/Kconfig
+++ b/drivers/clocksource/Kconfig
@@ -1,5 +1,11 @@
1config CLKSRC_I8253 1config CLKSRC_I8253
2 bool 2 bool
3 3
4config I8253_LOCK
5 bool
6
7config CLKBLD_I8253
8 def_bool y if CLKSRC_I8253 || I8253_LOCK
9
4config CLKSRC_MMIO 10config CLKSRC_MMIO
5 bool 11 bool
diff --git a/drivers/clocksource/Makefile b/drivers/clocksource/Makefile
index b995942a5060..7922a0cfc99f 100644
--- a/drivers/clocksource/Makefile
+++ b/drivers/clocksource/Makefile
@@ -6,5 +6,5 @@ obj-$(CONFIG_CS5535_CLOCK_EVENT_SRC) += cs5535-clockevt.o
6obj-$(CONFIG_SH_TIMER_CMT) += sh_cmt.o 6obj-$(CONFIG_SH_TIMER_CMT) += sh_cmt.o
7obj-$(CONFIG_SH_TIMER_MTU2) += sh_mtu2.o 7obj-$(CONFIG_SH_TIMER_MTU2) += sh_mtu2.o
8obj-$(CONFIG_SH_TIMER_TMU) += sh_tmu.o 8obj-$(CONFIG_SH_TIMER_TMU) += sh_tmu.o
9obj-$(CONFIG_CLKSRC_I8253) += i8253.o 9obj-$(CONFIG_CLKBLD_I8253) += i8253.o
10obj-$(CONFIG_CLKSRC_MMIO) += mmio.o 10obj-$(CONFIG_CLKSRC_MMIO) += mmio.o
diff --git a/drivers/clocksource/i8253.c b/drivers/clocksource/i8253.c
index 33735ebd2dcc..e594f52eb88e 100644
--- a/drivers/clocksource/i8253.c
+++ b/drivers/clocksource/i8253.c
@@ -6,10 +6,20 @@
6#include <linux/io.h> 6#include <linux/io.h>
7#include <linux/spinlock.h> 7#include <linux/spinlock.h>
8#include <linux/timex.h> 8#include <linux/timex.h>
9 9#include <linux/module.h>
10#include <linux/i8253.h> 10#include <linux/i8253.h>
11 11
12/* 12/*
13 * Protects access to I/O ports
14 *
15 * 0040-0043 : timer0, i8253 / i8254
16 * 0061-0061 : NMI Control Register which contains two speaker control bits.
17 */
18DEFINE_RAW_SPINLOCK(i8253_lock);
19EXPORT_SYMBOL(i8253_lock);
20
21#ifdef CONFIG_CLKSRC_I8253
22/*
13 * Since the PIT overflows every tick, its not very useful 23 * Since the PIT overflows every tick, its not very useful
14 * to just read by itself. So use jiffies to emulate a free 24 * to just read by itself. So use jiffies to emulate a free
15 * running counter: 25 * running counter:
@@ -86,3 +96,4 @@ int __init clocksource_i8253_init(void)
86{ 96{
87 return clocksource_register_hz(&i8253_cs, PIT_TICK_RATE); 97 return clocksource_register_hz(&i8253_cs, PIT_TICK_RATE);
88} 98}
99#endif
diff --git a/init/Kconfig b/init/Kconfig
index ebafac4231ee..2d2ef447a9ab 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -1002,6 +1002,7 @@ config ELF_CORE
1002config PCSPKR_PLATFORM 1002config PCSPKR_PLATFORM
1003 bool "Enable PC-Speaker support" if EXPERT 1003 bool "Enable PC-Speaker support" if EXPERT
1004 depends on ALPHA || X86 || MIPS || PPC_PREP || PPC_CHRP || PPC_PSERIES 1004 depends on ALPHA || X86 || MIPS || PPC_PREP || PPC_CHRP || PPC_PSERIES
1005 select I8253_LOCK
1005 default y 1006 default y
1006 help 1007 help
1007 This option allows to disable the internal PC-Speaker 1008 This option allows to disable the internal PC-Speaker