aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-05-24 16:29:46 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-05-24 16:29:46 -0400
commitc7523a7c88db637d66841018532cb4b3ab6ab0a8 (patch)
treecec08263a493831d43e17d4daa633e2a6b09480e
parent2f78d8e249973f1eeb88315e6444e616c60177ae (diff)
parentb80fe1015be4e3c926d8eb4cc6a340fdd22a43e1 (diff)
Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull timer updates from Thomas Gleixner. Various trivial conflict fixups in arch Kconfig due to addition of unrelated entries nearby. And one slightly more subtle one for sparc32 (new user of GENERIC_CLOCKEVENTS), fixed up as per Thomas. * 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (31 commits) timekeeping: Fix a few minor newline issues. time: remove obsolete declaration ntp: Fix a stale comment and a few stray newlines. ntp: Correct TAI offset during leap second timers: Fixup the Kconfig consolidation fallout x86: Use generic time config unicore32: Use generic time config um: Use generic time config tile: Use generic time config sparc: Use: generic time config sh: Use generic time config score: Use generic time config s390: Use generic time config openrisc: Use generic time config powerpc: Use generic time config mn10300: Use generic time config mips: Use generic time config microblaze: Use generic time config m68k: Use generic time config m32r: Use generic time config ...
-rw-r--r--arch/alpha/Kconfig4
-rw-r--r--arch/arm/Kconfig20
-rw-r--r--arch/avr32/Kconfig6
-rw-r--r--arch/blackfin/Kconfig10
-rw-r--r--arch/c6x/Kconfig8
-rw-r--r--arch/cris/Kconfig7
-rw-r--r--arch/h8300/Kconfig.cpu2
-rw-r--r--arch/hexagon/Kconfig16
-rw-r--r--arch/ia64/Kconfig9
-rw-r--r--arch/m32r/Kconfig4
-rw-r--r--arch/m68k/Kconfig11
-rw-r--r--arch/microblaze/Kconfig9
-rw-r--r--arch/mips/Kconfig15
-rw-r--r--arch/mn10300/Kconfig8
-rw-r--r--arch/openrisc/Kconfig5
-rw-r--r--arch/powerpc/Kconfig13
-rw-r--r--arch/s390/Kconfig14
-rw-r--r--arch/score/Kconfig5
-rw-r--r--arch/sh/Kconfig14
-rw-r--r--arch/sparc/Kconfig12
-rw-r--r--arch/tile/Kconfig6
-rw-r--r--arch/um/Kconfig.common5
-rw-r--r--arch/um/Kconfig.um1
-rw-r--r--arch/unicore32/Kconfig5
-rw-r--r--arch/x86/Kconfig33
-rw-r--r--arch/x86/kernel/hpet.c66
-rw-r--r--include/linux/time.h1
-rw-r--r--init/Kconfig1
-rw-r--r--kernel/time/Kconfig58
-rw-r--r--kernel/time/ntp.c8
-rw-r--r--kernel/time/timekeeping.c4
31 files changed, 155 insertions, 225 deletions
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
index 0893f023efb8..3de74c9f9610 100644
--- a/arch/alpha/Kconfig
+++ b/arch/alpha/Kconfig
@@ -16,6 +16,7 @@ config ALPHA
16 select ARCH_WANT_OPTIONAL_GPIOLIB 16 select ARCH_WANT_OPTIONAL_GPIOLIB
17 select ARCH_HAVE_NMI_SAFE_CMPXCHG 17 select ARCH_HAVE_NMI_SAFE_CMPXCHG
18 select GENERIC_SMP_IDLE_THREAD 18 select GENERIC_SMP_IDLE_THREAD
19 select GENERIC_CMOS_UPDATE
19 help 20 help
20 The Alpha is a 64-bit general-purpose processor designed and 21 The Alpha is a 64-bit general-purpose processor designed and
21 marketed by the Digital Equipment Corporation of blessed memory, 22 marketed by the Digital Equipment Corporation of blessed memory,
@@ -48,9 +49,6 @@ config GENERIC_CALIBRATE_DELAY
48 bool 49 bool
49 default y 50 default y
50 51
51config GENERIC_CMOS_UPDATE
52 def_bool y
53
54config GENERIC_GPIO 52config GENERIC_GPIO
55 bool 53 bool
56 54
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 4f4c8115d79b..312450941a1a 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -40,6 +40,8 @@ config ARM
40 select GENERIC_PCI_IOMAP 40 select GENERIC_PCI_IOMAP
41 select HAVE_BPF_JIT 41 select HAVE_BPF_JIT
42 select GENERIC_SMP_IDLE_THREAD 42 select GENERIC_SMP_IDLE_THREAD
43 select KTIME_SCALAR
44 select GENERIC_CLOCKEVENTS_BROADCAST if SMP
43 help 45 help
44 The ARM series is a line of low-power-consumption RISC chip designs 46 The ARM series is a line of low-power-consumption RISC chip designs
45 licensed by ARM Ltd and targeted at embedded applications and 47 licensed by ARM Ltd and targeted at embedded applications and
@@ -63,22 +65,6 @@ config SYS_SUPPORTS_APM_EMULATION
63config GENERIC_GPIO 65config GENERIC_GPIO
64 bool 66 bool
65 67
66config ARCH_USES_GETTIMEOFFSET
67 bool
68 default n
69
70config GENERIC_CLOCKEVENTS
71 bool
72
73config GENERIC_CLOCKEVENTS_BROADCAST
74 bool
75 depends on GENERIC_CLOCKEVENTS
76 default y if SMP
77
78config KTIME_SCALAR
79 bool
80 default y
81
82config HAVE_TCM 68config HAVE_TCM
83 bool 69 bool
84 select GENERIC_ALLOCATOR 70 select GENERIC_ALLOCATOR
@@ -1438,8 +1424,6 @@ endmenu
1438 1424
1439menu "Kernel Features" 1425menu "Kernel Features"
1440 1426
1441source "kernel/time/Kconfig"
1442
1443config HAVE_SMP 1427config HAVE_SMP
1444 bool 1428 bool
1445 help 1429 help
diff --git a/arch/avr32/Kconfig b/arch/avr32/Kconfig
index 3dea7231f637..f8bc2d27d148 100644
--- a/arch/avr32/Kconfig
+++ b/arch/avr32/Kconfig
@@ -12,6 +12,7 @@ config AVR32
12 select HARDIRQS_SW_RESEND 12 select HARDIRQS_SW_RESEND
13 select GENERIC_IRQ_SHOW 13 select GENERIC_IRQ_SHOW
14 select ARCH_HAVE_NMI_SAFE_CMPXCHG 14 select ARCH_HAVE_NMI_SAFE_CMPXCHG
15 select GENERIC_CLOCKEVENTS
15 help 16 help
16 AVR32 is a high-performance 32-bit RISC microprocessor core, 17 AVR32 is a high-performance 32-bit RISC microprocessor core,
17 designed for cost-sensitive embedded applications, with particular 18 designed for cost-sensitive embedded applications, with particular
@@ -35,9 +36,6 @@ config TRACE_IRQFLAGS_SUPPORT
35config RWSEM_GENERIC_SPINLOCK 36config RWSEM_GENERIC_SPINLOCK
36 def_bool y 37 def_bool y
37 38
38config GENERIC_CLOCKEVENTS
39 def_bool y
40
41config RWSEM_XCHGADD_ALGORITHM 39config RWSEM_XCHGADD_ALGORITHM
42 def_bool n 40 def_bool n
43 41
@@ -63,8 +61,6 @@ source "kernel/Kconfig.freezer"
63 61
64menu "System Type and features" 62menu "System Type and features"
65 63
66source "kernel/time/Kconfig"
67
68config SUBARCH_AVR32B 64config SUBARCH_AVR32B
69 bool 65 bool
70config MMU 66config MMU
diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig
index 79cfe2614bcc..04ec0d8fbbb5 100644
--- a/arch/blackfin/Kconfig
+++ b/arch/blackfin/Kconfig
@@ -38,6 +38,7 @@ config BLACKFIN
38 select IRQ_PER_CPU if SMP 38 select IRQ_PER_CPU if SMP
39 select HAVE_NMI_WATCHDOG if NMI_WATCHDOG 39 select HAVE_NMI_WATCHDOG if NMI_WATCHDOG
40 select GENERIC_SMP_IDLE_THREAD 40 select GENERIC_SMP_IDLE_THREAD
41 select ARCH_USES_GETTIMEOFFSET if !GENERIC_CLOCKEVENTS
41 42
42config GENERIC_CSUM 43config GENERIC_CSUM
43 def_bool y 44 def_bool y
@@ -642,9 +643,10 @@ comment "Kernel Timer/Scheduler"
642 643
643source kernel/Kconfig.hz 644source kernel/Kconfig.hz
644 645
645config GENERIC_CLOCKEVENTS 646config SET_GENERIC_CLOCKEVENTS
646 bool "Generic clock events" 647 bool "Generic clock events"
647 default y 648 default y
649 select GENERIC_CLOCKEVENTS
648 650
649menu "Clock event device" 651menu "Clock event device"
650 depends on GENERIC_CLOCKEVENTS 652 depends on GENERIC_CLOCKEVENTS
@@ -678,12 +680,6 @@ config GPTMR0_CLOCKSOURCE
678 depends on !TICKSOURCE_GPTMR0 680 depends on !TICKSOURCE_GPTMR0
679endmenu 681endmenu
680 682
681config ARCH_USES_GETTIMEOFFSET
682 depends on !GENERIC_CLOCKEVENTS
683 def_bool y
684
685source kernel/time/Kconfig
686
687comment "Misc" 683comment "Misc"
688 684
689choice 685choice
diff --git a/arch/c6x/Kconfig b/arch/c6x/Kconfig
index 1f15b88b537f..052f81a76239 100644
--- a/arch/c6x/Kconfig
+++ b/arch/c6x/Kconfig
@@ -15,6 +15,7 @@ config C6X
15 select IRQ_DOMAIN 15 select IRQ_DOMAIN
16 select OF 16 select OF
17 select OF_EARLY_FLATTREE 17 select OF_EARLY_FLATTREE
18 select GENERIC_CLOCKEVENTS
18 19
19config MMU 20config MMU
20 def_bool n 21 def_bool n
@@ -31,12 +32,6 @@ config GENERIC_CALIBRATE_DELAY
31config GENERIC_HWEIGHT 32config GENERIC_HWEIGHT
32 def_bool y 33 def_bool y
33 34
34config GENERIC_CLOCKEVENTS
35 def_bool y
36
37config GENERIC_CLOCKEVENTS_BROADCAST
38 bool
39
40config GENERIC_BUG 35config GENERIC_BUG
41 def_bool y 36 def_bool y
42 37
@@ -125,7 +120,6 @@ source "mm/Kconfig"
125source "kernel/Kconfig.preempt" 120source "kernel/Kconfig.preempt"
126 121
127source "kernel/Kconfig.hz" 122source "kernel/Kconfig.hz"
128source "kernel/time/Kconfig"
129 123
130endmenu 124endmenu
131 125
diff --git a/arch/cris/Kconfig b/arch/cris/Kconfig
index 2995035812ec..22d34d64cc81 100644
--- a/arch/cris/Kconfig
+++ b/arch/cris/Kconfig
@@ -13,12 +13,6 @@ config RWSEM_GENERIC_SPINLOCK
13config RWSEM_XCHGADD_ALGORITHM 13config RWSEM_XCHGADD_ALGORITHM
14 bool 14 bool
15 15
16config GENERIC_CMOS_UPDATE
17 def_bool y
18
19config ARCH_USES_GETTIMEOFFSET
20 def_bool n
21
22config ARCH_HAS_ILOG2_U32 16config ARCH_HAS_ILOG2_U32
23 bool 17 bool
24 default n 18 default n
@@ -50,6 +44,7 @@ config CRIS
50 select GENERIC_IRQ_SHOW 44 select GENERIC_IRQ_SHOW
51 select GENERIC_IOMAP 45 select GENERIC_IOMAP
52 select GENERIC_SMP_IDLE_THREAD if ETRAX_ARCH_V32 46 select GENERIC_SMP_IDLE_THREAD if ETRAX_ARCH_V32
47 select GENERIC_CMOS_UPDATE
53 48
54config HZ 49config HZ
55 int 50 int
diff --git a/arch/h8300/Kconfig.cpu b/arch/h8300/Kconfig.cpu
index 15c22286ae79..321f3922728b 100644
--- a/arch/h8300/Kconfig.cpu
+++ b/arch/h8300/Kconfig.cpu
@@ -1,7 +1,5 @@
1menu "Processor type and features" 1menu "Processor type and features"
2 2
3source "kernel/time/Kconfig"
4
5choice 3choice
6 prompt "H8/300 platform" 4 prompt "H8/300 platform"
7 default H8300H_GENERIC 5 default H8300H_GENERIC
diff --git a/arch/hexagon/Kconfig b/arch/hexagon/Kconfig
index bc979f770980..b2fdfb700f50 100644
--- a/arch/hexagon/Kconfig
+++ b/arch/hexagon/Kconfig
@@ -27,6 +27,9 @@ config HEXAGON
27 select GENERIC_IOMAP 27 select GENERIC_IOMAP
28 select GENERIC_SMP_IDLE_THREAD 28 select GENERIC_SMP_IDLE_THREAD
29 select STACKTRACE_SUPPORT 29 select STACKTRACE_SUPPORT
30 select KTIME_SCALAR
31 select GENERIC_CLOCKEVENTS
32 select GENERIC_CLOCKEVENTS_BROADCAST
30 ---help--- 33 ---help---
31 Qualcomm Hexagon is a processor architecture designed for high 34 Qualcomm Hexagon is a processor architecture designed for high
32 performance and low power across a wide variety of applications. 35 performance and low power across a wide variety of applications.
@@ -55,9 +58,6 @@ config PCI
55config EARLY_PRINTK 58config EARLY_PRINTK
56 def_bool y 59 def_bool y
57 60
58config KTIME_SCALAR
59 def_bool y
60
61config MMU 61config MMU
62 def_bool y 62 def_bool y
63 63
@@ -88,15 +88,6 @@ config GENERIC_FIND_NEXT_BIT
88config GENERIC_HWEIGHT 88config GENERIC_HWEIGHT
89 def_bool y 89 def_bool y
90 90
91config GENERIC_TIME
92 def_bool y
93
94config GENERIC_CLOCKEVENTS
95 def_bool y
96
97config GENERIC_CLOCKEVENTS_BROADCAST
98 def_bool y
99
100config STACKTRACE_SUPPORT 91config STACKTRACE_SUPPORT
101 def_bool y 92 def_bool y
102 select STACKTRACE 93 select STACKTRACE
@@ -179,7 +170,6 @@ endchoice
179source "mm/Kconfig" 170source "mm/Kconfig"
180 171
181source "kernel/Kconfig.hz" 172source "kernel/Kconfig.hz"
182source "kernel/time/Kconfig"
183 173
184config GENERIC_GPIO 174config GENERIC_GPIO
185 def_bool n 175 def_bool n
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index ba667b60f32d..8186ec5ea151 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
@@ -37,6 +37,8 @@ config IA64
37 select ARCH_INIT_TASK 37 select ARCH_INIT_TASK
38 select ARCH_TASK_STRUCT_ALLOCATOR 38 select ARCH_TASK_STRUCT_ALLOCATOR
39 select ARCH_THREAD_INFO_ALLOCATOR 39 select ARCH_THREAD_INFO_ALLOCATOR
40 select ARCH_CLOCKSOURCE_DATA
41 select GENERIC_TIME_VSYSCALL
40 default y 42 default y
41 help 43 help
42 The Itanium Processor Family is Intel's 64-bit successor to 44 The Itanium Processor Family is Intel's 64-bit successor to
@@ -92,10 +94,6 @@ config GENERIC_CALIBRATE_DELAY
92 bool 94 bool
93 default y 95 default y
94 96
95config GENERIC_TIME_VSYSCALL
96 bool
97 default y
98
99config HAVE_SETUP_PER_CPU_AREA 97config HAVE_SETUP_PER_CPU_AREA
100 def_bool y 98 def_bool y
101 99
@@ -110,9 +108,6 @@ config EFI
110 bool 108 bool
111 default y 109 default y
112 110
113config ARCH_CLOCKSOURCE_DATA
114 def_bool y
115
116config SCHED_OMIT_FRAME_POINTER 111config SCHED_OMIT_FRAME_POINTER
117 bool 112 bool
118 default y 113 default y
diff --git a/arch/m32r/Kconfig b/arch/m32r/Kconfig
index ef80a6546ff2..b638d5bfa14d 100644
--- a/arch/m32r/Kconfig
+++ b/arch/m32r/Kconfig
@@ -11,6 +11,7 @@ config M32R
11 select GENERIC_IRQ_PROBE 11 select GENERIC_IRQ_PROBE
12 select GENERIC_IRQ_SHOW 12 select GENERIC_IRQ_SHOW
13 select GENERIC_ATOMIC64 13 select GENERIC_ATOMIC64
14 select ARCH_USES_GETTIMEOFFSET
14 15
15config SBUS 16config SBUS
16 bool 17 bool
@@ -33,9 +34,6 @@ config HZ
33 int 34 int
34 default 100 35 default 100
35 36
36config ARCH_USES_GETTIMEOFFSET
37 def_bool y
38
39source "init/Kconfig" 37source "init/Kconfig"
40 38
41source "kernel/Kconfig.freezer" 39source "kernel/Kconfig.freezer"
diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig
index d318c606c888..cac5b6be572a 100644
--- a/arch/m68k/Kconfig
+++ b/arch/m68k/Kconfig
@@ -8,6 +8,7 @@ config M68K
8 select ARCH_HAVE_NMI_SAFE_CMPXCHG if RMW_INSNS 8 select ARCH_HAVE_NMI_SAFE_CMPXCHG if RMW_INSNS
9 select GENERIC_CPU_DEVICES 9 select GENERIC_CPU_DEVICES
10 select FPU if MMU 10 select FPU if MMU
11 select ARCH_USES_GETTIMEOFFSET if MMU && !COLDFIRE
11 12
12config RWSEM_GENERIC_SPINLOCK 13config RWSEM_GENERIC_SPINLOCK
13 bool 14 bool
@@ -22,9 +23,6 @@ config ARCH_HAS_ILOG2_U32
22config ARCH_HAS_ILOG2_U64 23config ARCH_HAS_ILOG2_U64
23 bool 24 bool
24 25
25config GENERIC_CLOCKEVENTS
26 bool
27
28config GENERIC_GPIO 26config GENERIC_GPIO
29 bool 27 bool
30 28
@@ -43,9 +41,6 @@ config TIME_LOW_RES
43 bool 41 bool
44 default y 42 default y
45 43
46config ARCH_USES_GETTIMEOFFSET
47 def_bool MMU && !COLDFIRE
48
49config NO_IOPORT 44config NO_IOPORT
50 def_bool y 45 def_bool y
51 46
@@ -111,10 +106,6 @@ if COLDFIRE
111source "kernel/Kconfig.preempt" 106source "kernel/Kconfig.preempt"
112endif 107endif
113 108
114if !MMU || COLDFIRE
115source "kernel/time/Kconfig"
116endif
117
118source "mm/Kconfig" 109source "mm/Kconfig"
119 110
120endmenu 111endmenu
diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig
index ac22dc7f4cab..83460468998d 100644
--- a/arch/microblaze/Kconfig
+++ b/arch/microblaze/Kconfig
@@ -22,6 +22,7 @@ config MICROBLAZE
22 select GENERIC_PCI_IOMAP 22 select GENERIC_PCI_IOMAP
23 select GENERIC_CPU_DEVICES 23 select GENERIC_CPU_DEVICES
24 select GENERIC_ATOMIC64 24 select GENERIC_ATOMIC64
25 select GENERIC_CLOCKEVENTS
25 26
26config SWAP 27config SWAP
27 def_bool n 28 def_bool n
@@ -50,12 +51,6 @@ config GENERIC_HWEIGHT
50config GENERIC_CALIBRATE_DELAY 51config GENERIC_CALIBRATE_DELAY
51 def_bool y 52 def_bool y
52 53
53config GENERIC_TIME_VSYSCALL
54 def_bool n
55
56config GENERIC_CLOCKEVENTS
57 def_bool y
58
59config GENERIC_GPIO 54config GENERIC_GPIO
60 def_bool y 55 def_bool y
61 56
@@ -79,8 +74,6 @@ source "arch/microblaze/platform/Kconfig.platform"
79 74
80menu "Processor type and features" 75menu "Processor type and features"
81 76
82source "kernel/time/Kconfig"
83
84source "kernel/Kconfig.preempt" 77source "kernel/Kconfig.preempt"
85 78
86source "kernel/Kconfig.hz" 79source "kernel/Kconfig.hz"
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 85aad0321397..3aa826bcbf96 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -31,6 +31,8 @@ config MIPS
31 select ARCH_DISCARD_MEMBLOCK 31 select ARCH_DISCARD_MEMBLOCK
32 select GENERIC_SMP_IDLE_THREAD 32 select GENERIC_SMP_IDLE_THREAD
33 select BUILDTIME_EXTABLE_SORT 33 select BUILDTIME_EXTABLE_SORT
34 select GENERIC_CLOCKEVENTS
35 select GENERIC_CMOS_UPDATE
34 36
35menu "Machine selection" 37menu "Machine selection"
36 38
@@ -858,14 +860,6 @@ config GENERIC_CALIBRATE_DELAY
858 bool 860 bool
859 default y 861 default y
860 862
861config GENERIC_CLOCKEVENTS
862 bool
863 default y
864
865config GENERIC_CMOS_UPDATE
866 bool
867 default y
868
869config SCHED_OMIT_FRAME_POINTER 863config SCHED_OMIT_FRAME_POINTER
870 bool 864 bool
871 default y 865 default y
@@ -2052,9 +2046,6 @@ config CPU_HAS_SYNC
2052 depends on !CPU_R3000 2046 depends on !CPU_R3000
2053 default y 2047 default y
2054 2048
2055config GENERIC_CLOCKEVENTS_BROADCAST
2056 bool
2057
2058# 2049#
2059# CPU non-features 2050# CPU non-features
2060# 2051#
@@ -2216,8 +2207,6 @@ config NR_CPUS
2216 performance should round up your number of processors to the next 2207 performance should round up your number of processors to the next
2217 power of two. 2208 power of two.
2218 2209
2219source "kernel/time/Kconfig"
2220
2221# 2210#
2222# Timer Interrupt Frequency Configuration 2211# Timer Interrupt Frequency Configuration
2223# 2212#
diff --git a/arch/mn10300/Kconfig b/arch/mn10300/Kconfig
index 3aa3de017159..687f9b4a2ed6 100644
--- a/arch/mn10300/Kconfig
+++ b/arch/mn10300/Kconfig
@@ -6,6 +6,7 @@ config MN10300
6 select HAVE_ARCH_TRACEHOOK 6 select HAVE_ARCH_TRACEHOOK
7 select HAVE_ARCH_KGDB 7 select HAVE_ARCH_KGDB
8 select HAVE_NMI_WATCHDOG if MN10300_WD_TIMER 8 select HAVE_NMI_WATCHDOG if MN10300_WD_TIMER
9 select GENERIC_CLOCKEVENTS
9 10
10config AM33_2 11config AM33_2
11 def_bool n 12 def_bool n
@@ -42,15 +43,9 @@ config RWSEM_XCHGADD_ALGORITHM
42config GENERIC_CALIBRATE_DELAY 43config GENERIC_CALIBRATE_DELAY
43 def_bool y 44 def_bool y
44 45
45config GENERIC_CMOS_UPDATE
46 def_bool n
47
48config GENERIC_HWEIGHT 46config GENERIC_HWEIGHT
49 def_bool y 47 def_bool y
50 48
51config GENERIC_CLOCKEVENTS
52 def_bool y
53
54config GENERIC_BUG 49config GENERIC_BUG
55 def_bool y 50 def_bool y
56 51
@@ -231,7 +226,6 @@ config MN10300_USING_JTAG
231 single-stepping, which are taken over completely by the JTAG unit. 226 single-stepping, which are taken over completely by the JTAG unit.
232 227
233source "kernel/Kconfig.hz" 228source "kernel/Kconfig.hz"
234source "kernel/time/Kconfig"
235 229
236config MN10300_RTC 230config MN10300_RTC
237 bool "Using MN10300 RTC" 231 bool "Using MN10300 RTC"
diff --git a/arch/openrisc/Kconfig b/arch/openrisc/Kconfig
index 297bd38f7c5d..4932247d078a 100644
--- a/arch/openrisc/Kconfig
+++ b/arch/openrisc/Kconfig
@@ -18,6 +18,7 @@ config OPENRISC
18 select GENERIC_IOMAP 18 select GENERIC_IOMAP
19 select GENERIC_CPU_DEVICES 19 select GENERIC_CPU_DEVICES
20 select GENERIC_ATOMIC64 20 select GENERIC_ATOMIC64
21 select GENERIC_CLOCKEVENTS
21 22
22config MMU 23config MMU
23 def_bool y 24 def_bool y
@@ -47,9 +48,6 @@ config NO_IOPORT
47config GENERIC_GPIO 48config GENERIC_GPIO
48 def_bool y 49 def_bool y
49 50
50config GENERIC_CLOCKEVENTS
51 def_bool y
52
53config TRACE_IRQFLAGS_SUPPORT 51config TRACE_IRQFLAGS_SUPPORT
54 def_bool y 52 def_bool y
55 53
@@ -109,7 +107,6 @@ config OPENRISC_HAVE_INST_DIV
109endmenu 107endmenu
110 108
111 109
112source "kernel/time/Kconfig"
113source kernel/Kconfig.hz 110source kernel/Kconfig.hz
114source kernel/Kconfig.preempt 111source kernel/Kconfig.preempt
115source "mm/Kconfig" 112source "mm/Kconfig"
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 0a947bd9c076..00b9874e2240 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -27,15 +27,6 @@ config MMU
27 bool 27 bool
28 default y 28 default y
29 29
30config GENERIC_CMOS_UPDATE
31 def_bool y
32
33config GENERIC_TIME_VSYSCALL
34 def_bool y
35
36config GENERIC_CLOCKEVENTS
37 def_bool y
38
39config HAVE_SETUP_PER_CPU_AREA 30config HAVE_SETUP_PER_CPU_AREA
40 def_bool PPC64 31 def_bool PPC64
41 32
@@ -141,6 +132,9 @@ config PPC
141 select HAVE_ARCH_JUMP_LABEL 132 select HAVE_ARCH_JUMP_LABEL
142 select ARCH_HAVE_NMI_SAFE_CMPXCHG 133 select ARCH_HAVE_NMI_SAFE_CMPXCHG
143 select GENERIC_SMP_IDLE_THREAD 134 select GENERIC_SMP_IDLE_THREAD
135 select GENERIC_CMOS_UPDATE
136 select GENERIC_TIME_VSYSCALL
137 select GENERIC_CLOCKEVENTS
144 138
145config EARLY_PRINTK 139config EARLY_PRINTK
146 bool 140 bool
@@ -281,7 +275,6 @@ config HIGHMEM
281 bool "High memory support" 275 bool "High memory support"
282 depends on PPC32 276 depends on PPC32
283 277
284source kernel/time/Kconfig
285source kernel/Kconfig.hz 278source kernel/Kconfig.hz
286source kernel/Kconfig.preempt 279source kernel/Kconfig.preempt
287source "fs/Kconfig.binfmt" 280source "fs/Kconfig.binfmt"
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index e16390c0bca8..b403c533432c 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -28,12 +28,6 @@ config ARCH_HAS_ILOG2_U64
28config GENERIC_HWEIGHT 28config GENERIC_HWEIGHT
29 def_bool y 29 def_bool y
30 30
31config GENERIC_TIME_VSYSCALL
32 def_bool y
33
34config GENERIC_CLOCKEVENTS
35 def_bool y
36
37config GENERIC_BUG 31config GENERIC_BUG
38 def_bool y if BUG 32 def_bool y if BUG
39 33
@@ -123,6 +117,9 @@ config S390
123 select ARCH_INLINE_WRITE_UNLOCK_IRQ 117 select ARCH_INLINE_WRITE_UNLOCK_IRQ
124 select ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE 118 select ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE
125 select GENERIC_SMP_IDLE_THREAD 119 select GENERIC_SMP_IDLE_THREAD
120 select GENERIC_TIME_VSYSCALL
121 select GENERIC_CLOCKEVENTS
122 select KTIME_SCALAR if 32BIT
126 123
127config SCHED_OMIT_FRAME_POINTER 124config SCHED_OMIT_FRAME_POINTER
128 def_bool y 125 def_bool y
@@ -135,8 +132,6 @@ menu "Base setup"
135 132
136comment "Processor type and features" 133comment "Processor type and features"
137 134
138source "kernel/time/Kconfig"
139
140config 64BIT 135config 64BIT
141 def_bool y 136 def_bool y
142 prompt "64 bit kernel" 137 prompt "64 bit kernel"
@@ -147,9 +142,6 @@ config 64BIT
147config 32BIT 142config 32BIT
148 def_bool y if !64BIT 143 def_bool y if !64BIT
149 144
150config KTIME_SCALAR
151 def_bool 32BIT
152
153config SMP 145config SMP
154 def_bool y 146 def_bool y
155 prompt "Symmetric multi-processing support" 147 prompt "Symmetric multi-processing support"
diff --git a/arch/score/Kconfig b/arch/score/Kconfig
index 4b285779ac05..ba0f412920be 100644
--- a/arch/score/Kconfig
+++ b/arch/score/Kconfig
@@ -9,6 +9,7 @@ config SCORE
9 select HAVE_MEMBLOCK_NODE_MAP 9 select HAVE_MEMBLOCK_NODE_MAP
10 select ARCH_DISCARD_MEMBLOCK 10 select ARCH_DISCARD_MEMBLOCK
11 select GENERIC_CPU_DEVICES 11 select GENERIC_CPU_DEVICES
12 select GENERIC_CLOCKEVENTS
12 13
13choice 14choice
14 prompt "System type" 15 prompt "System type"
@@ -51,9 +52,6 @@ config GENERIC_HWEIGHT
51config GENERIC_CALIBRATE_DELAY 52config GENERIC_CALIBRATE_DELAY
52 def_bool y 53 def_bool y
53 54
54config GENERIC_CLOCKEVENTS
55 def_bool y
56
57menu "Kernel type" 55menu "Kernel type"
58 56
59config 32BIT 57config 32BIT
@@ -68,7 +66,6 @@ config MEMORY_START
68 hex 66 hex
69 default 0xa0000000 67 default 0xa0000000
70 68
71source "kernel/time/Kconfig"
72source "kernel/Kconfig.hz" 69source "kernel/Kconfig.hz"
73source "kernel/Kconfig.preempt" 70source "kernel/Kconfig.preempt"
74 71
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index 3e723aaa5e18..5e05c0b445bb 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -29,6 +29,8 @@ config SUPERH
29 select GENERIC_ATOMIC64 29 select GENERIC_ATOMIC64
30 select GENERIC_IRQ_SHOW 30 select GENERIC_IRQ_SHOW
31 select GENERIC_SMP_IDLE_THREAD 31 select GENERIC_SMP_IDLE_THREAD
32 select GENERIC_CLOCKEVENTS
33 select GENERIC_CMOS_UPDATE if SH_SH03 || SH_DREAMCAST
32 help 34 help
33 The SuperH is a RISC processor targeted for use in embedded systems 35 The SuperH is a RISC processor targeted for use in embedded systems
34 and consumer electronics; it was also used in the Sega Dreamcast 36 and consumer electronics; it was also used in the Sega Dreamcast
@@ -87,16 +89,6 @@ config GENERIC_GPIO
87config GENERIC_CALIBRATE_DELAY 89config GENERIC_CALIBRATE_DELAY
88 bool 90 bool
89 91
90config GENERIC_CLOCKEVENTS
91 def_bool y
92
93config GENERIC_CLOCKEVENTS_BROADCAST
94 bool
95
96config GENERIC_CMOS_UPDATE
97 def_bool y
98 depends on SH_SH03 || SH_DREAMCAST
99
100config GENERIC_LOCKBREAK 92config GENERIC_LOCKBREAK
101 def_bool y 93 def_bool y
102 depends on SMP && PREEMPT 94 depends on SMP && PREEMPT
@@ -611,8 +603,6 @@ config SH_CLK_CPG_LEGACY
611 !CPU_SUBTYPE_SH7734 && !CPU_SUBTYPE_SH7264 && \ 603 !CPU_SUBTYPE_SH7734 && !CPU_SUBTYPE_SH7264 && \
612 !CPU_SUBTYPE_SH7269 604 !CPU_SUBTYPE_SH7269
613 605
614source "kernel/time/Kconfig"
615
616endmenu 606endmenu
617 607
618menu "CPU Frequency scaling" 608menu "CPU Frequency scaling"
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig
index 1ea3fd954756..2d493a3bdfe1 100644
--- a/arch/sparc/Kconfig
+++ b/arch/sparc/Kconfig
@@ -32,12 +32,15 @@ config SPARC
32 select HAVE_NMI_WATCHDOG if SPARC64 32 select HAVE_NMI_WATCHDOG if SPARC64
33 select HAVE_BPF_JIT 33 select HAVE_BPF_JIT
34 select GENERIC_SMP_IDLE_THREAD 34 select GENERIC_SMP_IDLE_THREAD
35 select GENERIC_CMOS_UPDATE
36 select GENERIC_CLOCKEVENTS
35 37
36config SPARC32 38config SPARC32
37 def_bool !64BIT 39 def_bool !64BIT
38 select GENERIC_ATOMIC64 40 select GENERIC_ATOMIC64
39 select CLZ_TAB 41 select CLZ_TAB
40 select ARCH_THREAD_INFO_ALLOCATOR 42 select ARCH_THREAD_INFO_ALLOCATOR
43 select ARCH_USES_GETTIMEOFFSET
41 44
42config SPARC64 45config SPARC64
43 def_bool 64BIT 46 def_bool 64BIT
@@ -77,13 +80,6 @@ config BITS
77 default 32 if SPARC32 80 default 32 if SPARC32
78 default 64 if SPARC64 81 default 64 if SPARC64
79 82
80config GENERIC_CMOS_UPDATE
81 bool
82 default y
83
84config GENERIC_CLOCKEVENTS
85 def_bool y
86
87config IOMMU_HELPER 83config IOMMU_HELPER
88 bool 84 bool
89 default y if SPARC64 85 default y if SPARC64
@@ -274,8 +270,6 @@ config HOTPLUG_CPU
274 can be controlled through /sys/devices/system/cpu/cpu#. 270 can be controlled through /sys/devices/system/cpu/cpu#.
275 Say N if you want to disable CPU hotplug. 271 Say N if you want to disable CPU hotplug.
276 272
277source "kernel/time/Kconfig"
278
279if SPARC64 273if SPARC64
280source "drivers/cpufreq/Kconfig" 274source "drivers/cpufreq/Kconfig"
281 275
diff --git a/arch/tile/Kconfig b/arch/tile/Kconfig
index 74239dd77e06..6ad6219fc47e 100644
--- a/arch/tile/Kconfig
+++ b/arch/tile/Kconfig
@@ -14,6 +14,7 @@ config TILE
14 select HAVE_SYSCALL_WRAPPERS if TILEGX 14 select HAVE_SYSCALL_WRAPPERS if TILEGX
15 select SYS_HYPERVISOR 15 select SYS_HYPERVISOR
16 select ARCH_HAVE_NMI_SAFE_CMPXCHG 16 select ARCH_HAVE_NMI_SAFE_CMPXCHG
17 select GENERIC_CLOCKEVENTS
17 18
18# FIXME: investigate whether we need/want these options. 19# FIXME: investigate whether we need/want these options.
19# select HAVE_IOREMAP_PROT 20# select HAVE_IOREMAP_PROT
@@ -47,9 +48,6 @@ config NEED_PER_CPU_PAGE_FIRST_CHUNK
47config SYS_SUPPORTS_HUGETLBFS 48config SYS_SUPPORTS_HUGETLBFS
48 def_bool y 49 def_bool y
49 50
50config GENERIC_CLOCKEVENTS
51 def_bool y
52
53# FIXME: tilegx can implement a more efficient rwsem. 51# FIXME: tilegx can implement a more efficient rwsem.
54config RWSEM_GENERIC_SPINLOCK 52config RWSEM_GENERIC_SPINLOCK
55 def_bool y 53 def_bool y
@@ -139,8 +137,6 @@ config NR_CPUS
139 smaller kernel memory footprint results from using a smaller 137 smaller kernel memory footprint results from using a smaller
140 value on chips with fewer tiles. 138 value on chips with fewer tiles.
141 139
142source "kernel/time/Kconfig"
143
144source "kernel/Kconfig.hz" 140source "kernel/Kconfig.hz"
145 141
146config KEXEC 142config KEXEC
diff --git a/arch/um/Kconfig.common b/arch/um/Kconfig.common
index 43ef890d292c..cb837c223922 100644
--- a/arch/um/Kconfig.common
+++ b/arch/um/Kconfig.common
@@ -10,6 +10,7 @@ config UML
10 select GENERIC_IRQ_SHOW 10 select GENERIC_IRQ_SHOW
11 select GENERIC_CPU_DEVICES 11 select GENERIC_CPU_DEVICES
12 select GENERIC_IO 12 select GENERIC_IO
13 select GENERIC_CLOCKEVENTS
13 14
14config MMU 15config MMU
15 bool 16 bool
@@ -52,10 +53,6 @@ config GENERIC_BUG
52 default y 53 default y
53 depends on BUG 54 depends on BUG
54 55
55config GENERIC_CLOCKEVENTS
56 bool
57 default y
58
59config HZ 56config HZ
60 int 57 int
61 default 100 58 default 100
diff --git a/arch/um/Kconfig.um b/arch/um/Kconfig.um
index 70fd690964e4..bf87f25eb2de 100644
--- a/arch/um/Kconfig.um
+++ b/arch/um/Kconfig.um
@@ -10,7 +10,6 @@ config STATIC_LINK
10 2.75G) for UML. 10 2.75G) for UML.
11 11
12source "mm/Kconfig" 12source "mm/Kconfig"
13source "kernel/time/Kconfig"
14 13
15config LD_SCRIPT_STATIC 14config LD_SCRIPT_STATIC
16 bool 15 bool
diff --git a/arch/unicore32/Kconfig b/arch/unicore32/Kconfig
index eeb8054c7cd8..47ad5210606f 100644
--- a/arch/unicore32/Kconfig
+++ b/arch/unicore32/Kconfig
@@ -25,9 +25,6 @@ config HAVE_PWM
25config GENERIC_GPIO 25config GENERIC_GPIO
26 def_bool y 26 def_bool y
27 27
28config GENERIC_CLOCKEVENTS
29 bool
30
31config GENERIC_CSUM 28config GENERIC_CSUM
32 def_bool y 29 def_bool y
33 30
@@ -146,8 +143,6 @@ endmenu
146 143
147menu "Kernel Features" 144menu "Kernel Features"
148 145
149source "kernel/time/Kconfig"
150
151source "kernel/Kconfig.preempt" 146source "kernel/Kconfig.preempt"
152 147
153source "kernel/Kconfig.hz" 148source "kernel/Kconfig.hz"
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 0b2d5f24c946..66cc380bebf0 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -85,6 +85,13 @@ config X86
85 select GENERIC_SMP_IDLE_THREAD 85 select GENERIC_SMP_IDLE_THREAD
86 select HAVE_ARCH_SECCOMP_FILTER 86 select HAVE_ARCH_SECCOMP_FILTER
87 select BUILDTIME_EXTABLE_SORT 87 select BUILDTIME_EXTABLE_SORT
88 select GENERIC_CMOS_UPDATE
89 select CLOCKSOURCE_WATCHDOG
90 select GENERIC_CLOCKEVENTS
91 select ARCH_CLOCKSOURCE_DATA if X86_64
92 select GENERIC_CLOCKEVENTS_BROADCAST if X86_64 || (X86_32 && X86_LOCAL_APIC)
93 select GENERIC_TIME_VSYSCALL if X86_64
94 select KTIME_SCALAR if X86_32
88 95
89config INSTRUCTION_DECODER 96config INSTRUCTION_DECODER
90 def_bool (KPROBES || PERF_EVENTS || UPROBES) 97 def_bool (KPROBES || PERF_EVENTS || UPROBES)
@@ -99,23 +106,6 @@ config ARCH_DEFCONFIG
99 default "arch/x86/configs/i386_defconfig" if X86_32 106 default "arch/x86/configs/i386_defconfig" if X86_32
100 default "arch/x86/configs/x86_64_defconfig" if X86_64 107 default "arch/x86/configs/x86_64_defconfig" if X86_64
101 108
102config GENERIC_CMOS_UPDATE
103 def_bool y
104
105config CLOCKSOURCE_WATCHDOG
106 def_bool y
107
108config GENERIC_CLOCKEVENTS
109 def_bool y
110
111config ARCH_CLOCKSOURCE_DATA
112 def_bool y
113 depends on X86_64
114
115config GENERIC_CLOCKEVENTS_BROADCAST
116 def_bool y
117 depends on X86_64 || (X86_32 && X86_LOCAL_APIC)
118
119config LOCKDEP_SUPPORT 109config LOCKDEP_SUPPORT
120 def_bool y 110 def_bool y
121 111
@@ -166,10 +156,6 @@ config RWSEM_XCHGADD_ALGORITHM
166config GENERIC_CALIBRATE_DELAY 156config GENERIC_CALIBRATE_DELAY
167 def_bool y 157 def_bool y
168 158
169config GENERIC_TIME_VSYSCALL
170 bool
171 default X86_64
172
173config ARCH_HAS_CPU_RELAX 159config ARCH_HAS_CPU_RELAX
174 def_bool y 160 def_bool y
175 161
@@ -236,9 +222,6 @@ config ARCH_HWEIGHT_CFLAGS
236 default "-fcall-saved-ecx -fcall-saved-edx" if X86_32 222 default "-fcall-saved-ecx -fcall-saved-edx" if X86_32
237 default "-fcall-saved-rdi -fcall-saved-rsi -fcall-saved-rdx -fcall-saved-rcx -fcall-saved-r8 -fcall-saved-r9 -fcall-saved-r10 -fcall-saved-r11" if X86_64 223 default "-fcall-saved-rdi -fcall-saved-rsi -fcall-saved-rdx -fcall-saved-rcx -fcall-saved-r8 -fcall-saved-r9 -fcall-saved-r10 -fcall-saved-r11" if X86_64
238 224
239config KTIME_SCALAR
240 def_bool X86_32
241
242config ARCH_CPU_PROBE_RELEASE 225config ARCH_CPU_PROBE_RELEASE
243 def_bool y 226 def_bool y
244 depends on HOTPLUG_CPU 227 depends on HOTPLUG_CPU
@@ -261,8 +244,6 @@ config ZONE_DMA
261 244
262 If unsure, say Y. 245 If unsure, say Y.
263 246
264source "kernel/time/Kconfig"
265
266config SMP 247config SMP
267 bool "Symmetric multi-processing support" 248 bool "Symmetric multi-processing support"
268 ---help--- 249 ---help---
diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c
index ad0de0c2714e..9cc7b4392f7c 100644
--- a/arch/x86/kernel/hpet.c
+++ b/arch/x86/kernel/hpet.c
@@ -94,13 +94,18 @@ static int hpet_verbose;
94 94
95static int __init hpet_setup(char *str) 95static int __init hpet_setup(char *str)
96{ 96{
97 if (str) { 97 while (str) {
98 char *next = strchr(str, ',');
99
100 if (next)
101 *next++ = 0;
98 if (!strncmp("disable", str, 7)) 102 if (!strncmp("disable", str, 7))
99 boot_hpet_disable = 1; 103 boot_hpet_disable = 1;
100 if (!strncmp("force", str, 5)) 104 if (!strncmp("force", str, 5))
101 hpet_force_user = 1; 105 hpet_force_user = 1;
102 if (!strncmp("verbose", str, 7)) 106 if (!strncmp("verbose", str, 7))
103 hpet_verbose = 1; 107 hpet_verbose = 1;
108 str = next;
104 } 109 }
105 return 1; 110 return 1;
106} 111}
@@ -319,8 +324,6 @@ static void hpet_set_mode(enum clock_event_mode mode,
319 now = hpet_readl(HPET_COUNTER); 324 now = hpet_readl(HPET_COUNTER);
320 cmp = now + (unsigned int) delta; 325 cmp = now + (unsigned int) delta;
321 cfg = hpet_readl(HPET_Tn_CFG(timer)); 326 cfg = hpet_readl(HPET_Tn_CFG(timer));
322 /* Make sure we use edge triggered interrupts */
323 cfg &= ~HPET_TN_LEVEL;
324 cfg |= HPET_TN_ENABLE | HPET_TN_PERIODIC | 327 cfg |= HPET_TN_ENABLE | HPET_TN_PERIODIC |
325 HPET_TN_SETVAL | HPET_TN_32BIT; 328 HPET_TN_SETVAL | HPET_TN_32BIT;
326 hpet_writel(cfg, HPET_Tn_CFG(timer)); 329 hpet_writel(cfg, HPET_Tn_CFG(timer));
@@ -787,15 +790,16 @@ static int hpet_clocksource_register(void)
787 return 0; 790 return 0;
788} 791}
789 792
793static u32 *hpet_boot_cfg;
794
790/** 795/**
791 * hpet_enable - Try to setup the HPET timer. Returns 1 on success. 796 * hpet_enable - Try to setup the HPET timer. Returns 1 on success.
792 */ 797 */
793int __init hpet_enable(void) 798int __init hpet_enable(void)
794{ 799{
795 unsigned long hpet_period; 800 u32 hpet_period, cfg, id;
796 unsigned int id;
797 u64 freq; 801 u64 freq;
798 int i; 802 unsigned int i, last;
799 803
800 if (!is_hpet_capable()) 804 if (!is_hpet_capable())
801 return 0; 805 return 0;
@@ -847,15 +851,45 @@ int __init hpet_enable(void)
847 id = hpet_readl(HPET_ID); 851 id = hpet_readl(HPET_ID);
848 hpet_print_config(); 852 hpet_print_config();
849 853
854 last = (id & HPET_ID_NUMBER) >> HPET_ID_NUMBER_SHIFT;
855
850#ifdef CONFIG_HPET_EMULATE_RTC 856#ifdef CONFIG_HPET_EMULATE_RTC
851 /* 857 /*
852 * The legacy routing mode needs at least two channels, tick timer 858 * The legacy routing mode needs at least two channels, tick timer
853 * and the rtc emulation channel. 859 * and the rtc emulation channel.
854 */ 860 */
855 if (!(id & HPET_ID_NUMBER)) 861 if (!last)
856 goto out_nohpet; 862 goto out_nohpet;
857#endif 863#endif
858 864
865 cfg = hpet_readl(HPET_CFG);
866 hpet_boot_cfg = kmalloc((last + 2) * sizeof(*hpet_boot_cfg),
867 GFP_KERNEL);
868 if (hpet_boot_cfg)
869 *hpet_boot_cfg = cfg;
870 else
871 pr_warn("HPET initial state will not be saved\n");
872 cfg &= ~(HPET_CFG_ENABLE | HPET_CFG_LEGACY);
873 hpet_writel(cfg, HPET_Tn_CFG(i));
874 if (cfg)
875 pr_warn("HPET: Unrecognized bits %#x set in global cfg\n",
876 cfg);
877
878 for (i = 0; i <= last; ++i) {
879 cfg = hpet_readl(HPET_Tn_CFG(i));
880 if (hpet_boot_cfg)
881 hpet_boot_cfg[i + 1] = cfg;
882 cfg &= ~(HPET_TN_ENABLE | HPET_TN_LEVEL | HPET_TN_FSB);
883 hpet_writel(cfg, HPET_Tn_CFG(i));
884 cfg &= ~(HPET_TN_PERIODIC | HPET_TN_PERIODIC_CAP
885 | HPET_TN_64BIT_CAP | HPET_TN_32BIT | HPET_TN_ROUTE
886 | HPET_TN_FSB | HPET_TN_FSB_CAP);
887 if (cfg)
888 pr_warn("HPET: Unrecognized bits %#x set in cfg#%u\n",
889 cfg, i);
890 }
891 hpet_print_config();
892
859 if (hpet_clocksource_register()) 893 if (hpet_clocksource_register())
860 goto out_nohpet; 894 goto out_nohpet;
861 895
@@ -923,14 +957,28 @@ fs_initcall(hpet_late_init);
923void hpet_disable(void) 957void hpet_disable(void)
924{ 958{
925 if (is_hpet_capable() && hpet_virt_address) { 959 if (is_hpet_capable() && hpet_virt_address) {
926 unsigned int cfg = hpet_readl(HPET_CFG); 960 unsigned int cfg = hpet_readl(HPET_CFG), id, last;
927 961
928 if (hpet_legacy_int_enabled) { 962 if (hpet_boot_cfg)
963 cfg = *hpet_boot_cfg;
964 else if (hpet_legacy_int_enabled) {
929 cfg &= ~HPET_CFG_LEGACY; 965 cfg &= ~HPET_CFG_LEGACY;
930 hpet_legacy_int_enabled = 0; 966 hpet_legacy_int_enabled = 0;
931 } 967 }
932 cfg &= ~HPET_CFG_ENABLE; 968 cfg &= ~HPET_CFG_ENABLE;
933 hpet_writel(cfg, HPET_CFG); 969 hpet_writel(cfg, HPET_CFG);
970
971 if (!hpet_boot_cfg)
972 return;
973
974 id = hpet_readl(HPET_ID);
975 last = ((id & HPET_ID_NUMBER) >> HPET_ID_NUMBER_SHIFT);
976
977 for (id = 0; id <= last; ++id)
978 hpet_writel(hpet_boot_cfg[id + 1], HPET_Tn_CFG(id));
979
980 if (*hpet_boot_cfg & HPET_CFG_ENABLE)
981 hpet_writel(*hpet_boot_cfg, HPET_CFG);
934 } 982 }
935} 983}
936 984
diff --git a/include/linux/time.h b/include/linux/time.h
index 33a92ead4d88..179f4d6755fc 100644
--- a/include/linux/time.h
+++ b/include/linux/time.h
@@ -167,7 +167,6 @@ extern void get_monotonic_boottime(struct timespec *ts);
167extern struct timespec timespec_trunc(struct timespec t, unsigned gran); 167extern struct timespec timespec_trunc(struct timespec t, unsigned gran);
168extern int timekeeping_valid_for_hres(void); 168extern int timekeeping_valid_for_hres(void);
169extern u64 timekeeping_max_deferment(void); 169extern u64 timekeeping_max_deferment(void);
170extern void timekeeping_leap_insert(int leapsecond);
171extern int timekeeping_inject_offset(struct timespec *ts); 170extern int timekeeping_inject_offset(struct timespec *ts);
172 171
173struct tms; 172struct tms;
diff --git a/init/Kconfig b/init/Kconfig
index ccb5248474c2..81816b82860b 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -390,6 +390,7 @@ config AUDIT_LOGINUID_IMMUTABLE
390 but may not be backwards compatible with older init systems. 390 but may not be backwards compatible with older init systems.
391 391
392source "kernel/irq/Kconfig" 392source "kernel/irq/Kconfig"
393source "kernel/time/Kconfig"
393 394
394menu "RCU Subsystem" 395menu "RCU Subsystem"
395 396
diff --git a/kernel/time/Kconfig b/kernel/time/Kconfig
index a20dc8a3c949..fd42bd452b75 100644
--- a/kernel/time/Kconfig
+++ b/kernel/time/Kconfig
@@ -2,6 +2,55 @@
2# Timer subsystem related configuration options 2# Timer subsystem related configuration options
3# 3#
4 4
5# Options selectable by arch Kconfig
6
7# Watchdog function for clocksources to detect instabilities
8config CLOCKSOURCE_WATCHDOG
9 bool
10
11# Architecture has extra clocksource data
12config ARCH_CLOCKSOURCE_DATA
13 bool
14
15# Timekeeping vsyscall support
16config GENERIC_TIME_VSYSCALL
17 bool
18
19# ktime_t scalar 64bit nsec representation
20config KTIME_SCALAR
21 bool
22
23# Old style timekeeping
24config ARCH_USES_GETTIMEOFFSET
25 bool
26
27# The generic clock events infrastructure
28config GENERIC_CLOCKEVENTS
29 bool
30
31# Migration helper. Builds, but does not invoke
32config GENERIC_CLOCKEVENTS_BUILD
33 bool
34 default y
35 depends on GENERIC_CLOCKEVENTS
36
37# Clockevents broadcasting infrastructure
38config GENERIC_CLOCKEVENTS_BROADCAST
39 bool
40 depends on GENERIC_CLOCKEVENTS
41
42# Automatically adjust the min. reprogramming time for
43# clock event device
44config GENERIC_CLOCKEVENTS_MIN_ADJUST
45 bool
46
47# Generic update of CMOS clock
48config GENERIC_CMOS_UPDATE
49 bool
50
51if GENERIC_CLOCKEVENTS
52menu "Timers subsystem"
53
5# Core internal switch. Selected by NO_HZ / HIGH_RES_TIMERS. This is 54# Core internal switch. Selected by NO_HZ / HIGH_RES_TIMERS. This is
6# only related to the tick functionality. Oneshot clockevent devices 55# only related to the tick functionality. Oneshot clockevent devices
7# are supported independ of this. 56# are supported independ of this.
@@ -26,10 +75,5 @@ config HIGH_RES_TIMERS
26 hardware is not capable then this option only increases 75 hardware is not capable then this option only increases
27 the size of the kernel image. 76 the size of the kernel image.
28 77
29config GENERIC_CLOCKEVENTS_BUILD 78endmenu
30 bool 79endif
31 default y
32 depends on GENERIC_CLOCKEVENTS
33
34config GENERIC_CLOCKEVENTS_MIN_ADJUST
35 bool
diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c
index f03fd83b170b..70b33abcc7bb 100644
--- a/kernel/time/ntp.c
+++ b/kernel/time/ntp.c
@@ -412,6 +412,7 @@ int second_overflow(unsigned long secs)
412 if (secs % 86400 == 0) { 412 if (secs % 86400 == 0) {
413 leap = -1; 413 leap = -1;
414 time_state = TIME_OOP; 414 time_state = TIME_OOP;
415 time_tai++;
415 printk(KERN_NOTICE 416 printk(KERN_NOTICE
416 "Clock: inserting leap second 23:59:60 UTC\n"); 417 "Clock: inserting leap second 23:59:60 UTC\n");
417 } 418 }
@@ -426,7 +427,6 @@ int second_overflow(unsigned long secs)
426 } 427 }
427 break; 428 break;
428 case TIME_OOP: 429 case TIME_OOP:
429 time_tai++;
430 time_state = TIME_WAIT; 430 time_state = TIME_WAIT;
431 break; 431 break;
432 432
@@ -473,8 +473,6 @@ int second_overflow(unsigned long secs)
473 << NTP_SCALE_SHIFT; 473 << NTP_SCALE_SHIFT;
474 time_adjust = 0; 474 time_adjust = 0;
475 475
476
477
478out: 476out:
479 spin_unlock_irqrestore(&ntp_lock, flags); 477 spin_unlock_irqrestore(&ntp_lock, flags);
480 478
@@ -559,10 +557,10 @@ static inline void process_adj_status(struct timex *txc, struct timespec *ts)
559 /* only set allowed bits */ 557 /* only set allowed bits */
560 time_status &= STA_RONLY; 558 time_status &= STA_RONLY;
561 time_status |= txc->status & ~STA_RONLY; 559 time_status |= txc->status & ~STA_RONLY;
562
563} 560}
561
564/* 562/*
565 * Called with the xtime lock held, so we can access and modify 563 * Called with ntp_lock held, so we can access and modify
566 * all the global NTP state: 564 * all the global NTP state:
567 */ 565 */
568static inline void process_adjtimex_modes(struct timex *txc, struct timespec *ts) 566static inline void process_adjtimex_modes(struct timex *txc, struct timespec *ts)
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
index d66b21308f7c..6e46cacf5969 100644
--- a/kernel/time/timekeeping.c
+++ b/kernel/time/timekeeping.c
@@ -240,7 +240,6 @@ void getnstimeofday(struct timespec *ts)
240 240
241 timespec_add_ns(ts, nsecs); 241 timespec_add_ns(ts, nsecs);
242} 242}
243
244EXPORT_SYMBOL(getnstimeofday); 243EXPORT_SYMBOL(getnstimeofday);
245 244
246ktime_t ktime_get(void) 245ktime_t ktime_get(void)
@@ -357,8 +356,8 @@ void do_gettimeofday(struct timeval *tv)
357 tv->tv_sec = now.tv_sec; 356 tv->tv_sec = now.tv_sec;
358 tv->tv_usec = now.tv_nsec/1000; 357 tv->tv_usec = now.tv_nsec/1000;
359} 358}
360
361EXPORT_SYMBOL(do_gettimeofday); 359EXPORT_SYMBOL(do_gettimeofday);
360
362/** 361/**
363 * do_settimeofday - Sets the time of day 362 * do_settimeofday - Sets the time of day
364 * @tv: pointer to the timespec variable containing the new time 363 * @tv: pointer to the timespec variable containing the new time
@@ -392,7 +391,6 @@ int do_settimeofday(const struct timespec *tv)
392 391
393 return 0; 392 return 0;
394} 393}
395
396EXPORT_SYMBOL(do_settimeofday); 394EXPORT_SYMBOL(do_settimeofday);
397 395
398 396