Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 24 May 2012 20:29:46 +0000 (13:29 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 24 May 2012 20:29:46 +0000 (13:29 -0700)
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
  ...

31 files changed:
arch/alpha/Kconfig
arch/arm/Kconfig
arch/avr32/Kconfig
arch/blackfin/Kconfig
arch/c6x/Kconfig
arch/cris/Kconfig
arch/h8300/Kconfig.cpu
arch/hexagon/Kconfig
arch/ia64/Kconfig
arch/m32r/Kconfig
arch/m68k/Kconfig
arch/microblaze/Kconfig
arch/mips/Kconfig
arch/mn10300/Kconfig
arch/openrisc/Kconfig
arch/powerpc/Kconfig
arch/s390/Kconfig
arch/score/Kconfig
arch/sh/Kconfig
arch/sparc/Kconfig
arch/tile/Kconfig
arch/um/Kconfig.common
arch/um/Kconfig.um
arch/unicore32/Kconfig
arch/x86/Kconfig
arch/x86/kernel/hpet.c
include/linux/time.h
init/Kconfig
kernel/time/Kconfig
kernel/time/ntp.c
kernel/time/timekeeping.c

index 0893f023efb8895ed19b40d501f6977f341f8024..3de74c9f961093ebbb7d87162ed6a6c3c96053d8 100644 (file)
@@ -16,6 +16,7 @@ config ALPHA
        select ARCH_WANT_OPTIONAL_GPIOLIB
        select ARCH_HAVE_NMI_SAFE_CMPXCHG
        select GENERIC_SMP_IDLE_THREAD
+       select GENERIC_CMOS_UPDATE
        help
          The Alpha is a 64-bit general-purpose processor designed and
          marketed by the Digital Equipment Corporation of blessed memory,
@@ -48,9 +49,6 @@ config GENERIC_CALIBRATE_DELAY
        bool
        default y
 
-config GENERIC_CMOS_UPDATE
-        def_bool y
-
 config GENERIC_GPIO
        bool
 
index 4f4c8115d79b21476892e1dc0df5f90ac0f51178..312450941a1a6ed007b00f306b4cf321a2dae1ee 100644 (file)
@@ -40,6 +40,8 @@ config ARM
        select GENERIC_PCI_IOMAP
        select HAVE_BPF_JIT
        select GENERIC_SMP_IDLE_THREAD
+       select KTIME_SCALAR
+       select GENERIC_CLOCKEVENTS_BROADCAST if SMP
        help
          The ARM series is a line of low-power-consumption RISC chip designs
          licensed by ARM Ltd and targeted at embedded applications and
@@ -63,22 +65,6 @@ config SYS_SUPPORTS_APM_EMULATION
 config GENERIC_GPIO
        bool
 
-config ARCH_USES_GETTIMEOFFSET
-       bool
-       default n
-
-config GENERIC_CLOCKEVENTS
-       bool
-
-config GENERIC_CLOCKEVENTS_BROADCAST
-       bool
-       depends on GENERIC_CLOCKEVENTS
-       default y if SMP
-
-config KTIME_SCALAR
-       bool
-       default y
-
 config HAVE_TCM
        bool
        select GENERIC_ALLOCATOR
@@ -1438,8 +1424,6 @@ endmenu
 
 menu "Kernel Features"
 
-source "kernel/time/Kconfig"
-
 config HAVE_SMP
        bool
        help
index 3dea7231f637c5d09e8c545fdee437a550b67c10..f8bc2d27d1488ec18771aa7c49e62035ccf0f82b 100644 (file)
@@ -12,6 +12,7 @@ config AVR32
        select HARDIRQS_SW_RESEND
        select GENERIC_IRQ_SHOW
        select ARCH_HAVE_NMI_SAFE_CMPXCHG
+       select GENERIC_CLOCKEVENTS
        help
          AVR32 is a high-performance 32-bit RISC microprocessor core,
          designed for cost-sensitive embedded applications, with particular
@@ -35,9 +36,6 @@ config TRACE_IRQFLAGS_SUPPORT
 config RWSEM_GENERIC_SPINLOCK
        def_bool y
 
-config GENERIC_CLOCKEVENTS
-       def_bool y
-
 config RWSEM_XCHGADD_ALGORITHM
        def_bool n
 
@@ -63,8 +61,6 @@ source "kernel/Kconfig.freezer"
 
 menu "System Type and features"
 
-source "kernel/time/Kconfig"
-
 config SUBARCH_AVR32B
        bool
 config MMU
index 79cfe2614bcc871f7faff8fd8c0d6f2c02b54fe8..04ec0d8fbbb5bee2814d5ed324e36509476429a5 100644 (file)
@@ -38,6 +38,7 @@ config BLACKFIN
        select IRQ_PER_CPU if SMP
        select HAVE_NMI_WATCHDOG if NMI_WATCHDOG
        select GENERIC_SMP_IDLE_THREAD
+       select ARCH_USES_GETTIMEOFFSET if !GENERIC_CLOCKEVENTS
 
 config GENERIC_CSUM
        def_bool y
@@ -642,9 +643,10 @@ comment "Kernel Timer/Scheduler"
 
 source kernel/Kconfig.hz
 
-config GENERIC_CLOCKEVENTS
+config SET_GENERIC_CLOCKEVENTS
        bool "Generic clock events"
        default y
+       select GENERIC_CLOCKEVENTS
 
 menu "Clock event device"
        depends on GENERIC_CLOCKEVENTS
@@ -678,12 +680,6 @@ config GPTMR0_CLOCKSOURCE
        depends on !TICKSOURCE_GPTMR0
 endmenu
 
-config ARCH_USES_GETTIMEOFFSET
-       depends on !GENERIC_CLOCKEVENTS
-       def_bool y
-
-source kernel/time/Kconfig
-
 comment "Misc"
 
 choice
index 1f15b88b537fb534428470f02fe7ca962261ae58..052f81a762398670188778a0645c8ed9ad1a4982 100644 (file)
@@ -15,6 +15,7 @@ config C6X
        select IRQ_DOMAIN
        select OF
        select OF_EARLY_FLATTREE
+       select GENERIC_CLOCKEVENTS
 
 config MMU
        def_bool n
@@ -31,12 +32,6 @@ config GENERIC_CALIBRATE_DELAY
 config GENERIC_HWEIGHT
        def_bool y
 
-config GENERIC_CLOCKEVENTS
-       def_bool y
-
-config GENERIC_CLOCKEVENTS_BROADCAST
-       bool
-
 config GENERIC_BUG
        def_bool y
 
@@ -125,7 +120,6 @@ source "mm/Kconfig"
 source "kernel/Kconfig.preempt"
 
 source "kernel/Kconfig.hz"
-source "kernel/time/Kconfig"
 
 endmenu
 
index 2995035812eccaf8b80f3d889470626dee7f36e2..22d34d64cc81d014ef39e793f14dc1b28d105655 100644 (file)
@@ -13,12 +13,6 @@ config RWSEM_GENERIC_SPINLOCK
 config RWSEM_XCHGADD_ALGORITHM
        bool
 
-config GENERIC_CMOS_UPDATE
-       def_bool y
-
-config ARCH_USES_GETTIMEOFFSET
-       def_bool n
-
 config ARCH_HAS_ILOG2_U32
        bool
        default n
@@ -50,6 +44,7 @@ config CRIS
        select GENERIC_IRQ_SHOW
        select GENERIC_IOMAP
        select GENERIC_SMP_IDLE_THREAD if ETRAX_ARCH_V32
+       select GENERIC_CMOS_UPDATE
 
 config HZ
        int
index 15c22286ae7951534cf24aa1950de38c26d1bc17..321f3922728b97b035bb44bd27a9d9756bbaba64 100644 (file)
@@ -1,7 +1,5 @@
 menu "Processor type and features"
 
-source "kernel/time/Kconfig"
-
 choice
        prompt "H8/300 platform"
        default H8300H_GENERIC
index bc979f770980ae4a286b8833980ee4be542aa985..b2fdfb700f505d2e7afeb4e8ddc92d88528f7fbb 100644 (file)
@@ -27,6 +27,9 @@ config HEXAGON
        select GENERIC_IOMAP
        select GENERIC_SMP_IDLE_THREAD
        select STACKTRACE_SUPPORT
+       select KTIME_SCALAR
+       select GENERIC_CLOCKEVENTS
+       select GENERIC_CLOCKEVENTS_BROADCAST
        ---help---
          Qualcomm Hexagon is a processor architecture designed for high
          performance and low power across a wide variety of applications.
@@ -55,9 +58,6 @@ config PCI
 config EARLY_PRINTK
        def_bool y
 
-config KTIME_SCALAR
-       def_bool y
-
 config MMU
        def_bool y
 
@@ -88,15 +88,6 @@ config GENERIC_FIND_NEXT_BIT
 config GENERIC_HWEIGHT
        def_bool y
 
-config GENERIC_TIME
-       def_bool y
-
-config GENERIC_CLOCKEVENTS
-       def_bool y
-
-config GENERIC_CLOCKEVENTS_BROADCAST
-       def_bool y
-
 config STACKTRACE_SUPPORT
        def_bool y
        select STACKTRACE
@@ -179,7 +170,6 @@ endchoice
 source "mm/Kconfig"
 
 source "kernel/Kconfig.hz"
-source "kernel/time/Kconfig"
 
 config GENERIC_GPIO
        def_bool n
index ba667b60f32d8bb4f99a78b0cd234c2720f35545..8186ec5ea15168a31a1a876b8a7b52ec7c8f4616 100644 (file)
@@ -37,6 +37,8 @@ config IA64
        select ARCH_INIT_TASK
        select ARCH_TASK_STRUCT_ALLOCATOR
        select ARCH_THREAD_INFO_ALLOCATOR
+       select ARCH_CLOCKSOURCE_DATA
+       select GENERIC_TIME_VSYSCALL
        default y
        help
          The Itanium Processor Family is Intel's 64-bit successor to
@@ -92,10 +94,6 @@ config GENERIC_CALIBRATE_DELAY
        bool
        default y
 
-config GENERIC_TIME_VSYSCALL
-       bool
-       default y
-
 config HAVE_SETUP_PER_CPU_AREA
        def_bool y
 
@@ -110,9 +108,6 @@ config EFI
        bool
        default y
 
-config ARCH_CLOCKSOURCE_DATA
-       def_bool y
-
 config SCHED_OMIT_FRAME_POINTER
        bool
        default y
index ef80a6546ff2d37804f58298c185b5baf3dd6595..b638d5bfa14d0aa34cc546b179a284f9d3a5cbb6 100644 (file)
@@ -11,6 +11,7 @@ config M32R
        select GENERIC_IRQ_PROBE
        select GENERIC_IRQ_SHOW
        select GENERIC_ATOMIC64
+       select ARCH_USES_GETTIMEOFFSET
 
 config SBUS
        bool
@@ -33,9 +34,6 @@ config HZ
        int
        default 100
 
-config ARCH_USES_GETTIMEOFFSET
-       def_bool y
-
 source "init/Kconfig"
 
 source "kernel/Kconfig.freezer"
index d318c606c8883d20c8b7e3230d71852091d8a3c6..cac5b6be572a8b83c8331ba5aa83bf84f3f83159 100644 (file)
@@ -8,6 +8,7 @@ config M68K
        select ARCH_HAVE_NMI_SAFE_CMPXCHG if RMW_INSNS
        select GENERIC_CPU_DEVICES
        select FPU if MMU
+       select ARCH_USES_GETTIMEOFFSET if MMU && !COLDFIRE
 
 config RWSEM_GENERIC_SPINLOCK
        bool
@@ -22,9 +23,6 @@ config ARCH_HAS_ILOG2_U32
 config ARCH_HAS_ILOG2_U64
        bool
 
-config GENERIC_CLOCKEVENTS
-       bool
-
 config GENERIC_GPIO
        bool
 
@@ -43,9 +41,6 @@ config TIME_LOW_RES
        bool
        default y
 
-config ARCH_USES_GETTIMEOFFSET
-       def_bool MMU && !COLDFIRE
-
 config NO_IOPORT
        def_bool y
 
@@ -111,10 +106,6 @@ if COLDFIRE
 source "kernel/Kconfig.preempt"
 endif
 
-if !MMU || COLDFIRE
-source "kernel/time/Kconfig"
-endif
-
 source "mm/Kconfig"
 
 endmenu
index ac22dc7f4cab0ffa882182103fe6c0ccf1ad6963..83460468998d5e56aee700ea5d2c219d9489b28f 100644 (file)
@@ -22,6 +22,7 @@ config MICROBLAZE
        select GENERIC_PCI_IOMAP
        select GENERIC_CPU_DEVICES
        select GENERIC_ATOMIC64
+       select GENERIC_CLOCKEVENTS
 
 config SWAP
        def_bool n
@@ -50,12 +51,6 @@ config GENERIC_HWEIGHT
 config GENERIC_CALIBRATE_DELAY
        def_bool y
 
-config GENERIC_TIME_VSYSCALL
-       def_bool n
-
-config GENERIC_CLOCKEVENTS
-       def_bool y
-
 config GENERIC_GPIO
        def_bool y
 
@@ -79,8 +74,6 @@ source "arch/microblaze/platform/Kconfig.platform"
 
 menu "Processor type and features"
 
-source "kernel/time/Kconfig"
-
 source "kernel/Kconfig.preempt"
 
 source "kernel/Kconfig.hz"
index 85aad0321397fa420529d50bde88501f8f3e664a..3aa826bcbf96afe5b2cef1ac8b87422e487f723c 100644 (file)
@@ -31,6 +31,8 @@ config MIPS
        select ARCH_DISCARD_MEMBLOCK
        select GENERIC_SMP_IDLE_THREAD
        select BUILDTIME_EXTABLE_SORT
+       select GENERIC_CLOCKEVENTS
+       select GENERIC_CMOS_UPDATE
 
 menu "Machine selection"
 
@@ -858,14 +860,6 @@ config GENERIC_CALIBRATE_DELAY
        bool
        default y
 
-config GENERIC_CLOCKEVENTS
-       bool
-       default y
-
-config GENERIC_CMOS_UPDATE
-       bool
-       default y
-
 config SCHED_OMIT_FRAME_POINTER
        bool
        default y
@@ -2052,9 +2046,6 @@ config CPU_HAS_SYNC
        depends on !CPU_R3000
        default y
 
-config GENERIC_CLOCKEVENTS_BROADCAST
-       bool
-
 #
 # CPU non-features
 #
@@ -2216,8 +2207,6 @@ config NR_CPUS
          performance should round up your number of processors to the next
          power of two.
 
-source "kernel/time/Kconfig"
-
 #
 # Timer Interrupt Frequency Configuration
 #
index 3aa3de017159165c322d7e1e05542228ff06b462..687f9b4a2ed6cc5fba93f7eda6288a6d10fc7b57 100644 (file)
@@ -6,6 +6,7 @@ config MN10300
        select HAVE_ARCH_TRACEHOOK
        select HAVE_ARCH_KGDB
        select HAVE_NMI_WATCHDOG if MN10300_WD_TIMER
+       select GENERIC_CLOCKEVENTS
 
 config AM33_2
        def_bool n
@@ -42,15 +43,9 @@ config RWSEM_XCHGADD_ALGORITHM
 config GENERIC_CALIBRATE_DELAY
        def_bool y
 
-config GENERIC_CMOS_UPDATE
-        def_bool n
-
 config GENERIC_HWEIGHT
        def_bool y
 
-config GENERIC_CLOCKEVENTS
-       def_bool y
-
 config GENERIC_BUG
        def_bool y
 
@@ -231,7 +226,6 @@ config MN10300_USING_JTAG
          single-stepping, which are taken over completely by the JTAG unit.
 
 source "kernel/Kconfig.hz"
-source "kernel/time/Kconfig"
 
 config MN10300_RTC
        bool "Using MN10300 RTC"
index 297bd38f7c5d4e9d532ed92a12f4d5f3022b0c59..4932247d078ac3cfde1da41bfa8e759a9b6b8a8e 100644 (file)
@@ -18,6 +18,7 @@ config OPENRISC
        select GENERIC_IOMAP
        select GENERIC_CPU_DEVICES
        select GENERIC_ATOMIC64
+       select GENERIC_CLOCKEVENTS
 
 config MMU
        def_bool y
@@ -47,9 +48,6 @@ config NO_IOPORT
 config GENERIC_GPIO
        def_bool y
 
-config GENERIC_CLOCKEVENTS
-       def_bool y
-
 config TRACE_IRQFLAGS_SUPPORT
         def_bool y
 
@@ -109,7 +107,6 @@ config OPENRISC_HAVE_INST_DIV
 endmenu
 
 
-source "kernel/time/Kconfig"
 source kernel/Kconfig.hz
 source kernel/Kconfig.preempt
 source "mm/Kconfig"
index 0a947bd9c0760a8eff4aa79b1a08066af8e75fc4..00b9874e2240d79a669ab40af6602fb403d7104d 100644 (file)
@@ -27,15 +27,6 @@ config MMU
        bool
        default y
 
-config GENERIC_CMOS_UPDATE
-       def_bool y
-
-config GENERIC_TIME_VSYSCALL
-       def_bool y
-
-config GENERIC_CLOCKEVENTS
-       def_bool y
-
 config HAVE_SETUP_PER_CPU_AREA
        def_bool PPC64
 
@@ -141,6 +132,9 @@ config PPC
        select HAVE_ARCH_JUMP_LABEL
        select ARCH_HAVE_NMI_SAFE_CMPXCHG
        select GENERIC_SMP_IDLE_THREAD
+       select GENERIC_CMOS_UPDATE
+       select GENERIC_TIME_VSYSCALL
+       select GENERIC_CLOCKEVENTS
 
 config EARLY_PRINTK
        bool
@@ -281,7 +275,6 @@ config HIGHMEM
        bool "High memory support"
        depends on PPC32
 
-source kernel/time/Kconfig
 source kernel/Kconfig.hz
 source kernel/Kconfig.preempt
 source "fs/Kconfig.binfmt"
index e16390c0bca80d356a6fdfb7b5aac57a10fc664e..b403c533432c94438260df3b524434efdb6db4ce 100644 (file)
@@ -28,12 +28,6 @@ config ARCH_HAS_ILOG2_U64
 config GENERIC_HWEIGHT
        def_bool y
 
-config GENERIC_TIME_VSYSCALL
-       def_bool y
-
-config GENERIC_CLOCKEVENTS
-       def_bool y
-
 config GENERIC_BUG
        def_bool y if BUG
 
@@ -123,6 +117,9 @@ config S390
        select ARCH_INLINE_WRITE_UNLOCK_IRQ
        select ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE
        select GENERIC_SMP_IDLE_THREAD
+       select GENERIC_TIME_VSYSCALL
+       select GENERIC_CLOCKEVENTS
+       select KTIME_SCALAR if 32BIT
 
 config SCHED_OMIT_FRAME_POINTER
        def_bool y
@@ -135,8 +132,6 @@ menu "Base setup"
 
 comment "Processor type and features"
 
-source "kernel/time/Kconfig"
-
 config 64BIT
        def_bool y
        prompt "64 bit kernel"
@@ -147,9 +142,6 @@ config 64BIT
 config 32BIT
        def_bool y if !64BIT
 
-config KTIME_SCALAR
-       def_bool 32BIT
-
 config SMP
        def_bool y
        prompt "Symmetric multi-processing support"
index 4b285779ac05e34559134072e6de57845abbe2ad..ba0f412920befb05cdd0a26c6a707e2b91289954 100644 (file)
@@ -9,6 +9,7 @@ config SCORE
        select HAVE_MEMBLOCK_NODE_MAP
        select ARCH_DISCARD_MEMBLOCK
        select GENERIC_CPU_DEVICES
+       select GENERIC_CLOCKEVENTS
 
 choice
        prompt "System type"
@@ -51,9 +52,6 @@ config GENERIC_HWEIGHT
 config GENERIC_CALIBRATE_DELAY
        def_bool y
 
-config GENERIC_CLOCKEVENTS
-       def_bool y
-
 menu "Kernel type"
 
 config 32BIT
@@ -68,7 +66,6 @@ config MEMORY_START
        hex
        default 0xa0000000
 
-source "kernel/time/Kconfig"
 source "kernel/Kconfig.hz"
 source "kernel/Kconfig.preempt"
 
index 3e723aaa5e18adfa9588f5b7f642ff973f10dc69..5e05c0b445bb1f89978f866d5c15e20dc9745a83 100644 (file)
@@ -29,6 +29,8 @@ config SUPERH
        select GENERIC_ATOMIC64
        select GENERIC_IRQ_SHOW
        select GENERIC_SMP_IDLE_THREAD
+       select GENERIC_CLOCKEVENTS
+       select GENERIC_CMOS_UPDATE if SH_SH03 || SH_DREAMCAST
        help
          The SuperH is a RISC processor targeted for use in embedded systems
          and consumer electronics; it was also used in the Sega Dreamcast
@@ -87,16 +89,6 @@ config GENERIC_GPIO
 config GENERIC_CALIBRATE_DELAY
        bool
 
-config GENERIC_CLOCKEVENTS
-       def_bool y
-
-config GENERIC_CLOCKEVENTS_BROADCAST
-       bool
-
-config GENERIC_CMOS_UPDATE
-       def_bool y
-       depends on SH_SH03 || SH_DREAMCAST
-
 config GENERIC_LOCKBREAK
        def_bool y
        depends on SMP && PREEMPT
@@ -611,8 +603,6 @@ config SH_CLK_CPG_LEGACY
                      !CPU_SUBTYPE_SH7734 && !CPU_SUBTYPE_SH7264 && \
                      !CPU_SUBTYPE_SH7269
 
-source "kernel/time/Kconfig"
-
 endmenu
 
 menu "CPU Frequency scaling"
index 1ea3fd954756587358b3f16d99f3a2a32aceee65..2d493a3bdfe119f355b75733297d39c2a8c08f8f 100644 (file)
@@ -32,12 +32,15 @@ config SPARC
        select HAVE_NMI_WATCHDOG if SPARC64
        select HAVE_BPF_JIT
        select GENERIC_SMP_IDLE_THREAD
+       select GENERIC_CMOS_UPDATE
+       select GENERIC_CLOCKEVENTS
 
 config SPARC32
        def_bool !64BIT
        select GENERIC_ATOMIC64
        select CLZ_TAB
        select ARCH_THREAD_INFO_ALLOCATOR
+       select ARCH_USES_GETTIMEOFFSET
 
 config SPARC64
        def_bool 64BIT
@@ -77,13 +80,6 @@ config BITS
        default 32 if SPARC32
        default 64 if SPARC64
 
-config GENERIC_CMOS_UPDATE
-       bool
-       default y
-
-config GENERIC_CLOCKEVENTS
-       def_bool y
-
 config IOMMU_HELPER
        bool
        default y if SPARC64
@@ -274,8 +270,6 @@ config HOTPLUG_CPU
          can be controlled through /sys/devices/system/cpu/cpu#.
          Say N if you want to disable CPU hotplug.
 
-source "kernel/time/Kconfig"
-
 if SPARC64
 source "drivers/cpufreq/Kconfig"
 
index 74239dd77e066e6c873ee5781f53304ab5c8b4b7..6ad6219fc47e0bf4a0751ec862dffa2a6a115fd3 100644 (file)
@@ -14,6 +14,7 @@ config TILE
        select HAVE_SYSCALL_WRAPPERS if TILEGX
        select SYS_HYPERVISOR
        select ARCH_HAVE_NMI_SAFE_CMPXCHG
+       select GENERIC_CLOCKEVENTS
 
 # FIXME: investigate whether we need/want these options.
 #      select HAVE_IOREMAP_PROT
@@ -47,9 +48,6 @@ config NEED_PER_CPU_PAGE_FIRST_CHUNK
 config SYS_SUPPORTS_HUGETLBFS
        def_bool y
 
-config GENERIC_CLOCKEVENTS
-       def_bool y
-
 # FIXME: tilegx can implement a more efficient rwsem.
 config RWSEM_GENERIC_SPINLOCK
        def_bool y
@@ -139,8 +137,6 @@ config NR_CPUS
          smaller kernel memory footprint results from using a smaller
          value on chips with fewer tiles.
 
-source "kernel/time/Kconfig"
-
 source "kernel/Kconfig.hz"
 
 config KEXEC
index 43ef890d292c22081907f7983639f620d49c8483..cb837c22392203d0ef258dd9aa614f6b52f42a79 100644 (file)
@@ -10,6 +10,7 @@ config UML
        select GENERIC_IRQ_SHOW
        select GENERIC_CPU_DEVICES
        select GENERIC_IO
+       select GENERIC_CLOCKEVENTS
 
 config MMU
        bool
@@ -52,10 +53,6 @@ config GENERIC_BUG
        default y
        depends on BUG
 
-config GENERIC_CLOCKEVENTS
-       bool
-       default y
-
 config HZ
        int
        default 100
index 70fd690964e4ef0e71b21817dcffc1827ce402dd..bf87f25eb2dee05c45cad3462541a133f5d2fb74 100644 (file)
@@ -10,7 +10,6 @@ config STATIC_LINK
          2.75G) for UML.
 
 source "mm/Kconfig"
-source "kernel/time/Kconfig"
 
 config LD_SCRIPT_STATIC
        bool
index eeb8054c7cd84347d242bba052c44cd64a5da5af..47ad5210606f49cddde762ed6e12a6361158f843 100644 (file)
@@ -25,9 +25,6 @@ config HAVE_PWM
 config GENERIC_GPIO
        def_bool y
 
-config GENERIC_CLOCKEVENTS
-       bool
-
 config GENERIC_CSUM
        def_bool y
 
@@ -146,8 +143,6 @@ endmenu
 
 menu "Kernel Features"
 
-source "kernel/time/Kconfig"
-
 source "kernel/Kconfig.preempt"
 
 source "kernel/Kconfig.hz"
index 0b2d5f24c946e7a0ef96571db2e48c9c666136ac..66cc380bebf007403ccdc72afdab31b2c98f746e 100644 (file)
@@ -85,6 +85,13 @@ config X86
        select GENERIC_SMP_IDLE_THREAD
        select HAVE_ARCH_SECCOMP_FILTER
        select BUILDTIME_EXTABLE_SORT
+       select GENERIC_CMOS_UPDATE
+       select CLOCKSOURCE_WATCHDOG
+       select GENERIC_CLOCKEVENTS
+       select ARCH_CLOCKSOURCE_DATA if X86_64
+       select GENERIC_CLOCKEVENTS_BROADCAST if X86_64 || (X86_32 && X86_LOCAL_APIC)
+       select GENERIC_TIME_VSYSCALL if X86_64
+       select KTIME_SCALAR if X86_32
 
 config INSTRUCTION_DECODER
        def_bool (KPROBES || PERF_EVENTS || UPROBES)
@@ -99,23 +106,6 @@ config ARCH_DEFCONFIG
        default "arch/x86/configs/i386_defconfig" if X86_32
        default "arch/x86/configs/x86_64_defconfig" if X86_64
 
-config GENERIC_CMOS_UPDATE
-       def_bool y
-
-config CLOCKSOURCE_WATCHDOG
-       def_bool y
-
-config GENERIC_CLOCKEVENTS
-       def_bool y
-
-config ARCH_CLOCKSOURCE_DATA
-       def_bool y
-       depends on X86_64
-
-config GENERIC_CLOCKEVENTS_BROADCAST
-       def_bool y
-       depends on X86_64 || (X86_32 && X86_LOCAL_APIC)
-
 config LOCKDEP_SUPPORT
        def_bool y
 
@@ -166,10 +156,6 @@ config RWSEM_XCHGADD_ALGORITHM
 config GENERIC_CALIBRATE_DELAY
        def_bool y
 
-config GENERIC_TIME_VSYSCALL
-       bool
-       default X86_64
-
 config ARCH_HAS_CPU_RELAX
        def_bool y
 
@@ -236,9 +222,6 @@ config ARCH_HWEIGHT_CFLAGS
        default "-fcall-saved-ecx -fcall-saved-edx" if X86_32
        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
 
-config KTIME_SCALAR
-       def_bool X86_32
-
 config ARCH_CPU_PROBE_RELEASE
        def_bool y
        depends on HOTPLUG_CPU
@@ -261,8 +244,6 @@ config ZONE_DMA
 
          If unsure, say Y.
 
-source "kernel/time/Kconfig"
-
 config SMP
        bool "Symmetric multi-processing support"
        ---help---
index ad0de0c2714ecc9a27e12a1cdeb7f0fe1043a5ae..9cc7b4392f7c8b0462ad4d031667e5197eff9373 100644 (file)
@@ -94,13 +94,18 @@ static int hpet_verbose;
 
 static int __init hpet_setup(char *str)
 {
-       if (str) {
+       while (str) {
+               char *next = strchr(str, ',');
+
+               if (next)
+                       *next++ = 0;
                if (!strncmp("disable", str, 7))
                        boot_hpet_disable = 1;
                if (!strncmp("force", str, 5))
                        hpet_force_user = 1;
                if (!strncmp("verbose", str, 7))
                        hpet_verbose = 1;
+               str = next;
        }
        return 1;
 }
@@ -319,8 +324,6 @@ static void hpet_set_mode(enum clock_event_mode mode,
                now = hpet_readl(HPET_COUNTER);
                cmp = now + (unsigned int) delta;
                cfg = hpet_readl(HPET_Tn_CFG(timer));
-               /* Make sure we use edge triggered interrupts */
-               cfg &= ~HPET_TN_LEVEL;
                cfg |= HPET_TN_ENABLE | HPET_TN_PERIODIC |
                       HPET_TN_SETVAL | HPET_TN_32BIT;
                hpet_writel(cfg, HPET_Tn_CFG(timer));
@@ -787,15 +790,16 @@ static int hpet_clocksource_register(void)
        return 0;
 }
 
+static u32 *hpet_boot_cfg;
+
 /**
  * hpet_enable - Try to setup the HPET timer. Returns 1 on success.
  */
 int __init hpet_enable(void)
 {
-       unsigned long hpet_period;
-       unsigned int id;
+       u32 hpet_period, cfg, id;
        u64 freq;
-       int i;
+       unsigned int i, last;
 
        if (!is_hpet_capable())
                return 0;
@@ -847,15 +851,45 @@ int __init hpet_enable(void)
        id = hpet_readl(HPET_ID);
        hpet_print_config();
 
+       last = (id & HPET_ID_NUMBER) >> HPET_ID_NUMBER_SHIFT;
+
 #ifdef CONFIG_HPET_EMULATE_RTC
        /*
         * The legacy routing mode needs at least two channels, tick timer
         * and the rtc emulation channel.
         */
-       if (!(id & HPET_ID_NUMBER))
+       if (!last)
                goto out_nohpet;
 #endif
 
+       cfg = hpet_readl(HPET_CFG);
+       hpet_boot_cfg = kmalloc((last + 2) * sizeof(*hpet_boot_cfg),
+                               GFP_KERNEL);
+       if (hpet_boot_cfg)
+               *hpet_boot_cfg = cfg;
+       else
+               pr_warn("HPET initial state will not be saved\n");
+       cfg &= ~(HPET_CFG_ENABLE | HPET_CFG_LEGACY);
+       hpet_writel(cfg, HPET_Tn_CFG(i));
+       if (cfg)
+               pr_warn("HPET: Unrecognized bits %#x set in global cfg\n",
+                       cfg);
+
+       for (i = 0; i <= last; ++i) {
+               cfg = hpet_readl(HPET_Tn_CFG(i));
+               if (hpet_boot_cfg)
+                       hpet_boot_cfg[i + 1] = cfg;
+               cfg &= ~(HPET_TN_ENABLE | HPET_TN_LEVEL | HPET_TN_FSB);
+               hpet_writel(cfg, HPET_Tn_CFG(i));
+               cfg &= ~(HPET_TN_PERIODIC | HPET_TN_PERIODIC_CAP
+                        | HPET_TN_64BIT_CAP | HPET_TN_32BIT | HPET_TN_ROUTE
+                        | HPET_TN_FSB | HPET_TN_FSB_CAP);
+               if (cfg)
+                       pr_warn("HPET: Unrecognized bits %#x set in cfg#%u\n",
+                               cfg, i);
+       }
+       hpet_print_config();
+
        if (hpet_clocksource_register())
                goto out_nohpet;
 
@@ -923,14 +957,28 @@ fs_initcall(hpet_late_init);
 void hpet_disable(void)
 {
        if (is_hpet_capable() && hpet_virt_address) {
-               unsigned int cfg = hpet_readl(HPET_CFG);
+               unsigned int cfg = hpet_readl(HPET_CFG), id, last;
 
-               if (hpet_legacy_int_enabled) {
+               if (hpet_boot_cfg)
+                       cfg = *hpet_boot_cfg;
+               else if (hpet_legacy_int_enabled) {
                        cfg &= ~HPET_CFG_LEGACY;
                        hpet_legacy_int_enabled = 0;
                }
                cfg &= ~HPET_CFG_ENABLE;
                hpet_writel(cfg, HPET_CFG);
+
+               if (!hpet_boot_cfg)
+                       return;
+
+               id = hpet_readl(HPET_ID);
+               last = ((id & HPET_ID_NUMBER) >> HPET_ID_NUMBER_SHIFT);
+
+               for (id = 0; id <= last; ++id)
+                       hpet_writel(hpet_boot_cfg[id + 1], HPET_Tn_CFG(id));
+
+               if (*hpet_boot_cfg & HPET_CFG_ENABLE)
+                       hpet_writel(*hpet_boot_cfg, HPET_CFG);
        }
 }
 
index 33a92ead4d88163fce7b12d236c56dfd1772d379..179f4d6755fc6f3b9e3c99f67e424b8c1e52bef2 100644 (file)
@@ -167,7 +167,6 @@ extern void get_monotonic_boottime(struct timespec *ts);
 extern struct timespec timespec_trunc(struct timespec t, unsigned gran);
 extern int timekeeping_valid_for_hres(void);
 extern u64 timekeeping_max_deferment(void);
-extern void timekeeping_leap_insert(int leapsecond);
 extern int timekeeping_inject_offset(struct timespec *ts);
 
 struct tms;
index ccb5248474c2222b25f7aa4a017636f1fd78f9b4..81816b82860b51a7cb0a064d939d4702c4daaaed 100644 (file)
@@ -390,6 +390,7 @@ config AUDIT_LOGINUID_IMMUTABLE
          but may not be backwards compatible with older init systems.
 
 source "kernel/irq/Kconfig"
+source "kernel/time/Kconfig"
 
 menu "RCU Subsystem"
 
index a20dc8a3c9499e5631102ec869d67d6148c63ea6..fd42bd452b7528642495e6b619715ccb424b5e2e 100644 (file)
@@ -2,6 +2,55 @@
 # Timer subsystem related configuration options
 #
 
+# Options selectable by arch Kconfig
+
+# Watchdog function for clocksources to detect instabilities
+config CLOCKSOURCE_WATCHDOG
+       bool
+
+# Architecture has extra clocksource data
+config ARCH_CLOCKSOURCE_DATA
+       bool
+
+# Timekeeping vsyscall support
+config GENERIC_TIME_VSYSCALL
+       bool
+
+# ktime_t scalar 64bit nsec representation
+config KTIME_SCALAR
+       bool
+
+# Old style timekeeping
+config ARCH_USES_GETTIMEOFFSET
+       bool
+
+# The generic clock events infrastructure
+config GENERIC_CLOCKEVENTS
+       bool
+
+# Migration helper. Builds, but does not invoke
+config GENERIC_CLOCKEVENTS_BUILD
+       bool
+       default y
+       depends on GENERIC_CLOCKEVENTS
+
+# Clockevents broadcasting infrastructure
+config GENERIC_CLOCKEVENTS_BROADCAST
+       bool
+       depends on GENERIC_CLOCKEVENTS
+
+# Automatically adjust the min. reprogramming time for
+# clock event device
+config GENERIC_CLOCKEVENTS_MIN_ADJUST
+       bool
+
+# Generic update of CMOS clock
+config GENERIC_CMOS_UPDATE
+       bool
+
+if GENERIC_CLOCKEVENTS
+menu "Timers subsystem"
+
 # Core internal switch. Selected by NO_HZ / HIGH_RES_TIMERS. This is
 # only related to the tick functionality. Oneshot clockevent devices
 # are supported independ of this.
@@ -26,10 +75,5 @@ config HIGH_RES_TIMERS
          hardware is not capable then this option only increases
          the size of the kernel image.
 
-config GENERIC_CLOCKEVENTS_BUILD
-       bool
-       default y
-       depends on GENERIC_CLOCKEVENTS
-
-config GENERIC_CLOCKEVENTS_MIN_ADJUST
-       bool
+endmenu
+endif
index f03fd83b170b7176bbfe32c1589ce4fdec5e07bb..70b33abcc7bb0e92762b05af6c6ceaa1be75cd38 100644 (file)
@@ -412,6 +412,7 @@ int second_overflow(unsigned long secs)
                if (secs % 86400 == 0) {
                        leap = -1;
                        time_state = TIME_OOP;
+                       time_tai++;
                        printk(KERN_NOTICE
                                "Clock: inserting leap second 23:59:60 UTC\n");
                }
@@ -426,7 +427,6 @@ int second_overflow(unsigned long secs)
                }
                break;
        case TIME_OOP:
-               time_tai++;
                time_state = TIME_WAIT;
                break;
 
@@ -473,8 +473,6 @@ int second_overflow(unsigned long secs)
                                                         << NTP_SCALE_SHIFT;
        time_adjust = 0;
 
-
-
 out:
        spin_unlock_irqrestore(&ntp_lock, flags);
 
@@ -559,10 +557,10 @@ static inline void process_adj_status(struct timex *txc, struct timespec *ts)
        /* only set allowed bits */
        time_status &= STA_RONLY;
        time_status |= txc->status & ~STA_RONLY;
-
 }
+
 /*
- * Called with the xtime lock held, so we can access and modify
+ * Called with ntp_lock held, so we can access and modify
  * all the global NTP state:
  */
 static inline void process_adjtimex_modes(struct timex *txc, struct timespec *ts)
index d66b21308f7c10639c9da150ee69e3f3dc332e47..6e46cacf5969c8290a7933a548b713a227b2e183 100644 (file)
@@ -240,7 +240,6 @@ void getnstimeofday(struct timespec *ts)
 
        timespec_add_ns(ts, nsecs);
 }
-
 EXPORT_SYMBOL(getnstimeofday);
 
 ktime_t ktime_get(void)
@@ -357,8 +356,8 @@ void do_gettimeofday(struct timeval *tv)
        tv->tv_sec = now.tv_sec;
        tv->tv_usec = now.tv_nsec/1000;
 }
-
 EXPORT_SYMBOL(do_gettimeofday);
+
 /**
  * do_settimeofday - Sets the time of day
  * @tv:                pointer to the timespec variable containing the new time
@@ -392,7 +391,6 @@ int do_settimeofday(const struct timespec *tv)
 
        return 0;
 }
-
 EXPORT_SYMBOL(do_settimeofday);