aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Stultz <johnstul@us.ibm.com>2010-07-13 20:56:20 -0400
committerThomas Gleixner <tglx@linutronix.de>2010-07-27 06:40:54 -0400
commit592913ecb87a9e06f98ddb55b298f1a66bf94c6b (patch)
tree0f63f5535fe517faf418e0f7e69800fcf1e4d8db
parentce3bf7ab22527183634a76512d9854a38615e4d5 (diff)
time: Kill off CONFIG_GENERIC_TIME
Now that all arches have been converted over to use generic time via clocksources or arch_gettimeoffset(), we can remove the GENERIC_TIME config option and simplify the generic code. Signed-off-by: John Stultz <johnstul@us.ibm.com> LKML-Reference: <1279068988-21864-4-git-send-email-johnstul@us.ibm.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r--Documentation/kernel-parameters.txt3
-rw-r--r--arch/alpha/Kconfig4
-rw-r--r--arch/arm/Kconfig4
-rw-r--r--arch/avr32/Kconfig3
-rw-r--r--arch/blackfin/Kconfig3
-rw-r--r--arch/cris/Kconfig3
-rw-r--r--arch/frv/Kconfig4
-rw-r--r--arch/h8300/Kconfig4
-rw-r--r--arch/ia64/Kconfig4
-rw-r--r--arch/m32r/Kconfig3
-rw-r--r--arch/m68k/Kconfig3
-rw-r--r--arch/m68knommu/Kconfig4
-rw-r--r--arch/microblaze/Kconfig3
-rw-r--r--arch/mips/Kconfig4
-rw-r--r--arch/mn10300/Kconfig3
-rw-r--r--arch/parisc/Kconfig4
-rw-r--r--arch/powerpc/Kconfig3
-rw-r--r--arch/s390/Kconfig3
-rw-r--r--arch/score/Kconfig3
-rw-r--r--arch/sh/Kconfig3
-rw-r--r--arch/sparc/Kconfig3
-rw-r--r--arch/um/Kconfig.common4
-rw-r--r--arch/x86/Kconfig5
-rw-r--r--arch/xtensa/Kconfig3
-rw-r--r--drivers/Makefile4
-rw-r--r--drivers/acpi/acpi_pad.c2
-rw-r--r--drivers/acpi/processor_idle.c2
-rw-r--r--drivers/misc/Kconfig4
-rw-r--r--kernel/time.c16
-rw-r--r--kernel/time/Kconfig4
-rw-r--r--kernel/time/clocksource.c4
-rw-r--r--kernel/time/timekeeping.c55
-rw-r--r--kernel/trace/Kconfig4
33 files changed, 19 insertions, 159 deletions
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 2b2407d9a6d0..8abdfd7cb571 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -73,7 +73,6 @@ parameter is applicable:
73 MTD MTD (Memory Technology Device) support is enabled. 73 MTD MTD (Memory Technology Device) support is enabled.
74 NET Appropriate network support is enabled. 74 NET Appropriate network support is enabled.
75 NUMA NUMA support is enabled. 75 NUMA NUMA support is enabled.
76 GENERIC_TIME The generic timeofday code is enabled.
77 NFS Appropriate NFS support is enabled. 76 NFS Appropriate NFS support is enabled.
78 OSS OSS sound support is enabled. 77 OSS OSS sound support is enabled.
79 PV_OPS A paravirtualized kernel is enabled. 78 PV_OPS A paravirtualized kernel is enabled.
@@ -468,7 +467,7 @@ and is between 256 and 4096 characters. It is defined in the file
468 clocksource is not available, it defaults to PIT. 467 clocksource is not available, it defaults to PIT.
469 Format: { pit | tsc | cyclone | pmtmr } 468 Format: { pit | tsc | cyclone | pmtmr }
470 469
471 clocksource= [GENERIC_TIME] Override the default clocksource 470 clocksource= Override the default clocksource
472 Format: <string> 471 Format: <string>
473 Override the default clocksource and use the clocksource 472 Override the default clocksource and use the clocksource
474 with the name specified. 473 with the name specified.
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
index 3e2e540a0f2a..b9647bb66d13 100644
--- a/arch/alpha/Kconfig
+++ b/arch/alpha/Kconfig
@@ -47,10 +47,6 @@ config GENERIC_CALIBRATE_DELAY
47 bool 47 bool
48 default y 48 default y
49 49
50config GENERIC_TIME
51 bool
52 default y
53
54config GENERIC_CMOS_UPDATE 50config GENERIC_CMOS_UPDATE
55 def_bool y 51 def_bool y
56 52
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 98922f7d2d12..655b4ae76314 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -41,10 +41,6 @@ config SYS_SUPPORTS_APM_EMULATION
41config GENERIC_GPIO 41config GENERIC_GPIO
42 bool 42 bool
43 43
44config GENERIC_TIME
45 bool
46 default y
47
48config ARCH_USES_GETTIMEOFFSET 44config ARCH_USES_GETTIMEOFFSET
49 bool 45 bool
50 default n 46 default n
diff --git a/arch/avr32/Kconfig b/arch/avr32/Kconfig
index f2b319333184..f51572772e21 100644
--- a/arch/avr32/Kconfig
+++ b/arch/avr32/Kconfig
@@ -45,9 +45,6 @@ config GENERIC_IRQ_PROBE
45config RWSEM_GENERIC_SPINLOCK 45config RWSEM_GENERIC_SPINLOCK
46 def_bool y 46 def_bool y
47 47
48config GENERIC_TIME
49 def_bool y
50
51config GENERIC_CLOCKEVENTS 48config GENERIC_CLOCKEVENTS
52 def_bool y 49 def_bool y
53 50
diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig
index f66294b4f9d2..c88fd3584122 100644
--- a/arch/blackfin/Kconfig
+++ b/arch/blackfin/Kconfig
@@ -614,9 +614,6 @@ comment "Kernel Timer/Scheduler"
614 614
615source kernel/Kconfig.hz 615source kernel/Kconfig.hz
616 616
617config GENERIC_TIME
618 def_bool y
619
620config GENERIC_CLOCKEVENTS 617config GENERIC_CLOCKEVENTS
621 bool "Generic clock events" 618 bool "Generic clock events"
622 default y 619 default y
diff --git a/arch/cris/Kconfig b/arch/cris/Kconfig
index e25bf4440b51..887ef855be2a 100644
--- a/arch/cris/Kconfig
+++ b/arch/cris/Kconfig
@@ -20,9 +20,6 @@ config RWSEM_GENERIC_SPINLOCK
20config RWSEM_XCHGADD_ALGORITHM 20config RWSEM_XCHGADD_ALGORITHM
21 bool 21 bool
22 22
23config GENERIC_TIME
24 def_bool y
25
26config GENERIC_CMOS_UPDATE 23config GENERIC_CMOS_UPDATE
27 def_bool y 24 def_bool y
28 25
diff --git a/arch/frv/Kconfig b/arch/frv/Kconfig
index 4b5830bcbe2e..16399bd24993 100644
--- a/arch/frv/Kconfig
+++ b/arch/frv/Kconfig
@@ -40,10 +40,6 @@ config GENERIC_HARDIRQS_NO__DO_IRQ
40 bool 40 bool
41 default y 41 default y
42 42
43config GENERIC_TIME
44 bool
45 default y
46
47config TIME_LOW_RES 43config TIME_LOW_RES
48 bool 44 bool
49 default y 45 default y
diff --git a/arch/h8300/Kconfig b/arch/h8300/Kconfig
index 53cc669e6d59..988b6ff34cc4 100644
--- a/arch/h8300/Kconfig
+++ b/arch/h8300/Kconfig
@@ -62,10 +62,6 @@ config GENERIC_CALIBRATE_DELAY
62 bool 62 bool
63 default y 63 default y
64 64
65config GENERIC_TIME
66 bool
67 default y
68
69config GENERIC_BUG 65config GENERIC_BUG
70 bool 66 bool
71 depends on BUG 67 depends on BUG
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index 95610820041e..8711d13cd79f 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
@@ -82,10 +82,6 @@ config GENERIC_CALIBRATE_DELAY
82 bool 82 bool
83 default y 83 default y
84 84
85config GENERIC_TIME
86 bool
87 default y
88
89config GENERIC_TIME_VSYSCALL 85config GENERIC_TIME_VSYSCALL
90 bool 86 bool
91 default y 87 default y
diff --git a/arch/m32r/Kconfig b/arch/m32r/Kconfig
index 3a9319f93e89..836abbbc9c04 100644
--- a/arch/m32r/Kconfig
+++ b/arch/m32r/Kconfig
@@ -44,9 +44,6 @@ config HZ
44 int 44 int
45 default 100 45 default 100
46 46
47config GENERIC_TIME
48 def_bool y
49
50config ARCH_USES_GETTIMEOFFSET 47config ARCH_USES_GETTIMEOFFSET
51 def_bool y 48 def_bool y
52 49
diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig
index 2e3737b92ffc..8030e2481d97 100644
--- a/arch/m68k/Kconfig
+++ b/arch/m68k/Kconfig
@@ -59,9 +59,6 @@ config HZ
59 int 59 int
60 default 100 60 default 100
61 61
62config GENERIC_TIME
63 def_bool y
64
65config ARCH_USES_GETTIMEOFFSET 62config ARCH_USES_GETTIMEOFFSET
66 def_bool y 63 def_bool y
67 64
diff --git a/arch/m68knommu/Kconfig b/arch/m68knommu/Kconfig
index efeb6033fc17..2609c394e1df 100644
--- a/arch/m68knommu/Kconfig
+++ b/arch/m68knommu/Kconfig
@@ -63,10 +63,6 @@ config GENERIC_CALIBRATE_DELAY
63 bool 63 bool
64 default y 64 default y
65 65
66config GENERIC_TIME
67 bool
68 default y
69
70config GENERIC_CMOS_UPDATE 66config GENERIC_CMOS_UPDATE
71 bool 67 bool
72 default y 68 default y
diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig
index 505a08592423..14f03cea94a1 100644
--- a/arch/microblaze/Kconfig
+++ b/arch/microblaze/Kconfig
@@ -48,9 +48,6 @@ config GENERIC_IRQ_PROBE
48config GENERIC_CALIBRATE_DELAY 48config GENERIC_CALIBRATE_DELAY
49 def_bool y 49 def_bool y
50 50
51config GENERIC_TIME
52 def_bool y
53
54config GENERIC_TIME_VSYSCALL 51config GENERIC_TIME_VSYSCALL
55 def_bool n 52 def_bool n
56 53
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index cdaae942623d..01c44cbdf163 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -733,10 +733,6 @@ config GENERIC_CLOCKEVENTS
733 bool 733 bool
734 default y 734 default y
735 735
736config GENERIC_TIME
737 bool
738 default y
739
740config GENERIC_CMOS_UPDATE 736config GENERIC_CMOS_UPDATE
741 bool 737 bool
742 default y 738 default y
diff --git a/arch/mn10300/Kconfig b/arch/mn10300/Kconfig
index 1c4565a9102b..444b9f918fdf 100644
--- a/arch/mn10300/Kconfig
+++ b/arch/mn10300/Kconfig
@@ -46,9 +46,6 @@ config GENERIC_FIND_NEXT_BIT
46config GENERIC_HWEIGHT 46config GENERIC_HWEIGHT
47 def_bool y 47 def_bool y
48 48
49config GENERIC_TIME
50 def_bool y
51
52config GENERIC_BUG 49config GENERIC_BUG
53 def_bool y 50 def_bool y
54 51
diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig
index 05a366a5c4d5..907417d187e1 100644
--- a/arch/parisc/Kconfig
+++ b/arch/parisc/Kconfig
@@ -66,10 +66,6 @@ config GENERIC_CALIBRATE_DELAY
66 bool 66 bool
67 default y 67 default y
68 68
69config GENERIC_TIME
70 bool
71 default y
72
73config TIME_LOW_RES 69config TIME_LOW_RES
74 bool 70 bool
75 depends on SMP 71 depends on SMP
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 2031a2846865..25e6bf457457 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -29,9 +29,6 @@ config MMU
29config GENERIC_CMOS_UPDATE 29config GENERIC_CMOS_UPDATE
30 def_bool y 30 def_bool y
31 31
32config GENERIC_TIME
33 def_bool y
34
35config GENERIC_TIME_VSYSCALL 32config GENERIC_TIME_VSYSCALL
36 def_bool y 33 def_bool y
37 34
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index bee1c0f794cf..f0777a47e3a5 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -40,9 +40,6 @@ config ARCH_HAS_ILOG2_U64
40config GENERIC_HWEIGHT 40config GENERIC_HWEIGHT
41 def_bool y 41 def_bool y
42 42
43config GENERIC_TIME
44 def_bool y
45
46config GENERIC_TIME_VSYSCALL 43config GENERIC_TIME_VSYSCALL
47 def_bool y 44 def_bool y
48 45
diff --git a/arch/score/Kconfig b/arch/score/Kconfig
index 55d413e6dcf2..be4a15584751 100644
--- a/arch/score/Kconfig
+++ b/arch/score/Kconfig
@@ -55,9 +55,6 @@ config GENERIC_CALIBRATE_DELAY
55config GENERIC_CLOCKEVENTS 55config GENERIC_CLOCKEVENTS
56 def_bool y 56 def_bool y
57 57
58config GENERIC_TIME
59 def_bool y
60
61config SCHED_NO_NO_OMIT_FRAME_POINTER 58config SCHED_NO_NO_OMIT_FRAME_POINTER
62 def_bool y 59 def_bool y
63 60
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index 82868fee21fd..33990fa95af0 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -98,9 +98,6 @@ config GENERIC_CALIBRATE_DELAY
98config GENERIC_IOMAP 98config GENERIC_IOMAP
99 bool 99 bool
100 100
101config GENERIC_TIME
102 def_bool y
103
104config GENERIC_CLOCKEVENTS 101config GENERIC_CLOCKEVENTS
105 def_bool y 102 def_bool y
106 103
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig
index c0015db247ba..1cd0d9d3c761 100644
--- a/arch/sparc/Kconfig
+++ b/arch/sparc/Kconfig
@@ -66,9 +66,6 @@ config BITS
66 default 32 if SPARC32 66 default 32 if SPARC32
67 default 64 if SPARC64 67 default 64 if SPARC64
68 68
69config GENERIC_TIME
70 def_bool y
71
72config ARCH_USES_GETTIMEOFFSET 69config ARCH_USES_GETTIMEOFFSET
73 bool 70 bool
74 default y if SPARC32 71 default y if SPARC32
diff --git a/arch/um/Kconfig.common b/arch/um/Kconfig.common
index 0d207e73a758..7c8e277f6d34 100644
--- a/arch/um/Kconfig.common
+++ b/arch/um/Kconfig.common
@@ -55,10 +55,6 @@ config GENERIC_BUG
55 default y 55 default y
56 depends on BUG 56 depends on BUG
57 57
58config GENERIC_TIME
59 bool
60 default y
61
62config GENERIC_CLOCKEVENTS 58config GENERIC_CLOCKEVENTS
63 bool 59 bool
64 default y 60 default y
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index dcb0593b4a66..546b610ad71c 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -72,9 +72,6 @@ config ARCH_DEFCONFIG
72 default "arch/x86/configs/i386_defconfig" if X86_32 72 default "arch/x86/configs/i386_defconfig" if X86_32
73 default "arch/x86/configs/x86_64_defconfig" if X86_64 73 default "arch/x86/configs/x86_64_defconfig" if X86_64
74 74
75config GENERIC_TIME
76 def_bool y
77
78config GENERIC_CMOS_UPDATE 75config GENERIC_CMOS_UPDATE
79 def_bool y 76 def_bool y
80 77
@@ -2046,7 +2043,7 @@ config SCx200
2046 2043
2047config SCx200HR_TIMER 2044config SCx200HR_TIMER
2048 tristate "NatSemi SCx200 27MHz High-Resolution Timer Support" 2045 tristate "NatSemi SCx200 27MHz High-Resolution Timer Support"
2049 depends on SCx200 && GENERIC_TIME 2046 depends on SCx200
2050 default y 2047 default y
2051 ---help--- 2048 ---help---
2052 This driver provides a clocksource built upon the on-chip 2049 This driver provides a clocksource built upon the on-chip
diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig
index ebe228d02b08..0859bfd8ae93 100644
--- a/arch/xtensa/Kconfig
+++ b/arch/xtensa/Kconfig
@@ -48,9 +48,6 @@ config HZ
48 int 48 int
49 default 100 49 default 100
50 50
51config GENERIC_TIME
52 def_bool y
53
54source "init/Kconfig" 51source "init/Kconfig"
55source "kernel/Kconfig.freezer" 52source "kernel/Kconfig.freezer"
56 53
diff --git a/drivers/Makefile b/drivers/Makefile
index 91874e048552..ae473445ad6d 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -101,7 +101,9 @@ obj-y += firmware/
101obj-$(CONFIG_CRYPTO) += crypto/ 101obj-$(CONFIG_CRYPTO) += crypto/
102obj-$(CONFIG_SUPERH) += sh/ 102obj-$(CONFIG_SUPERH) += sh/
103obj-$(CONFIG_ARCH_SHMOBILE) += sh/ 103obj-$(CONFIG_ARCH_SHMOBILE) += sh/
104obj-$(CONFIG_GENERIC_TIME) += clocksource/ 104ifndef CONFIG_ARCH_USES_GETTIMEOFFSET
105obj-y += clocksource/
106endif
105obj-$(CONFIG_DMA_ENGINE) += dma/ 107obj-$(CONFIG_DMA_ENGINE) += dma/
106obj-$(CONFIG_DCA) += dca/ 108obj-$(CONFIG_DCA) += dca/
107obj-$(CONFIG_HID) += hid/ 109obj-$(CONFIG_HID) += hid/
diff --git a/drivers/acpi/acpi_pad.c b/drivers/acpi/acpi_pad.c
index 446aced33aff..b76848c80be3 100644
--- a/drivers/acpi/acpi_pad.c
+++ b/drivers/acpi/acpi_pad.c
@@ -77,7 +77,7 @@ static void power_saving_mwait_init(void)
77 power_saving_mwait_eax = (highest_cstate << MWAIT_SUBSTATE_SIZE) | 77 power_saving_mwait_eax = (highest_cstate << MWAIT_SUBSTATE_SIZE) |
78 (highest_subcstate - 1); 78 (highest_subcstate - 1);
79 79
80#if defined(CONFIG_GENERIC_TIME) && defined(CONFIG_X86) 80#if defined(CONFIG_X86)
81 switch (boot_cpu_data.x86_vendor) { 81 switch (boot_cpu_data.x86_vendor) {
82 case X86_VENDOR_AMD: 82 case X86_VENDOR_AMD:
83 case X86_VENDOR_INTEL: 83 case X86_VENDOR_INTEL:
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index e9a8026d39f0..294e10b5480a 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -264,7 +264,7 @@ int acpi_processor_resume(struct acpi_device * device)
264 return 0; 264 return 0;
265} 265}
266 266
267#if defined (CONFIG_GENERIC_TIME) && defined (CONFIG_X86) 267#if defined(CONFIG_X86)
268static void tsc_check_state(int state) 268static void tsc_check_state(int state)
269{ 269{
270 switch (boot_cpu_data.x86_vendor) { 270 switch (boot_cpu_data.x86_vendor) {
diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
index 26386a92f5aa..5b9ba4834ce1 100644
--- a/drivers/misc/Kconfig
+++ b/drivers/misc/Kconfig
@@ -72,7 +72,7 @@ config ATMEL_TCLIB
72 72
73config ATMEL_TCB_CLKSRC 73config ATMEL_TCB_CLKSRC
74 bool "TC Block Clocksource" 74 bool "TC Block Clocksource"
75 depends on ATMEL_TCLIB && GENERIC_TIME 75 depends on ATMEL_TCLIB
76 default y 76 default y
77 help 77 help
78 Select this to get a high precision clocksource based on a 78 Select this to get a high precision clocksource based on a
@@ -240,7 +240,7 @@ config CS5535_MFGPT_DEFAULT_IRQ
240 240
241config CS5535_CLOCK_EVENT_SRC 241config CS5535_CLOCK_EVENT_SRC
242 tristate "CS5535/CS5536 high-res timer (MFGPT) events" 242 tristate "CS5535/CS5536 high-res timer (MFGPT) events"
243 depends on GENERIC_TIME && GENERIC_CLOCKEVENTS && CS5535_MFGPT 243 depends on GENERIC_CLOCKEVENTS && CS5535_MFGPT
244 help 244 help
245 This driver provides a clock event source based on the MFGPT 245 This driver provides a clock event source based on the MFGPT
246 timer(s) in the CS5535 and CS5536 companion chips. 246 timer(s) in the CS5535 and CS5536 companion chips.
diff --git a/kernel/time.c b/kernel/time.c
index 848b1c2ab09a..ba9b338d1835 100644
--- a/kernel/time.c
+++ b/kernel/time.c
@@ -300,22 +300,6 @@ struct timespec timespec_trunc(struct timespec t, unsigned gran)
300} 300}
301EXPORT_SYMBOL(timespec_trunc); 301EXPORT_SYMBOL(timespec_trunc);
302 302
303#ifndef CONFIG_GENERIC_TIME
304/*
305 * Simulate gettimeofday using do_gettimeofday which only allows a timeval
306 * and therefore only yields usec accuracy
307 */
308void getnstimeofday(struct timespec *tv)
309{
310 struct timeval x;
311
312 do_gettimeofday(&x);
313 tv->tv_sec = x.tv_sec;
314 tv->tv_nsec = x.tv_usec * NSEC_PER_USEC;
315}
316EXPORT_SYMBOL_GPL(getnstimeofday);
317#endif
318
319/* Converts Gregorian date to seconds since 1970-01-01 00:00:00. 303/* Converts Gregorian date to seconds since 1970-01-01 00:00:00.
320 * Assumes input in normal date format, i.e. 1980-12-31 23:59:59 304 * Assumes input in normal date format, i.e. 1980-12-31 23:59:59
321 * => year=1980, mon=12, day=31, hour=23, min=59, sec=59. 305 * => year=1980, mon=12, day=31, hour=23, min=59, sec=59.
diff --git a/kernel/time/Kconfig b/kernel/time/Kconfig
index 95ed42951e0a..f06a8a365648 100644
--- a/kernel/time/Kconfig
+++ b/kernel/time/Kconfig
@@ -6,7 +6,7 @@ config TICK_ONESHOT
6 6
7config NO_HZ 7config NO_HZ
8 bool "Tickless System (Dynamic Ticks)" 8 bool "Tickless System (Dynamic Ticks)"
9 depends on GENERIC_TIME && GENERIC_CLOCKEVENTS 9 depends on !ARCH_USES_GETTIMEOFFSET && GENERIC_CLOCKEVENTS
10 select TICK_ONESHOT 10 select TICK_ONESHOT
11 help 11 help
12 This option enables a tickless system: timer interrupts will 12 This option enables a tickless system: timer interrupts will
@@ -15,7 +15,7 @@ config NO_HZ
15 15
16config HIGH_RES_TIMERS 16config HIGH_RES_TIMERS
17 bool "High Resolution Timer Support" 17 bool "High Resolution Timer Support"
18 depends on GENERIC_TIME && GENERIC_CLOCKEVENTS 18 depends on !ARCH_USES_GETTIMEOFFSET && GENERIC_CLOCKEVENTS
19 select TICK_ONESHOT 19 select TICK_ONESHOT
20 help 20 help
21 This option enables high resolution timer support. If your 21 This option enables high resolution timer support. If your
diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
index f08e99c1d561..c543d21b4e54 100644
--- a/kernel/time/clocksource.c
+++ b/kernel/time/clocksource.c
@@ -531,7 +531,7 @@ static u64 clocksource_max_deferment(struct clocksource *cs)
531 return max_nsecs - (max_nsecs >> 5); 531 return max_nsecs - (max_nsecs >> 5);
532} 532}
533 533
534#ifdef CONFIG_GENERIC_TIME 534#ifndef CONFIG_ARCH_USES_GETTIMEOFFSET
535 535
536/** 536/**
537 * clocksource_select - Select the best clocksource available 537 * clocksource_select - Select the best clocksource available
@@ -577,7 +577,7 @@ static void clocksource_select(void)
577 } 577 }
578} 578}
579 579
580#else /* CONFIG_GENERIC_TIME */ 580#else /* !CONFIG_ARCH_USES_GETTIMEOFFSET */
581 581
582static inline void clocksource_select(void) { } 582static inline void clocksource_select(void) { }
583 583
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
index 623fe3d504dc..73edd4074b50 100644
--- a/kernel/time/timekeeping.c
+++ b/kernel/time/timekeeping.c
@@ -173,8 +173,6 @@ void timekeeping_leap_insert(int leapsecond)
173 update_vsyscall(&xtime, timekeeper.clock, timekeeper.mult); 173 update_vsyscall(&xtime, timekeeper.clock, timekeeper.mult);
174} 174}
175 175
176#ifdef CONFIG_GENERIC_TIME
177
178/** 176/**
179 * timekeeping_forward_now - update clock to the current time 177 * timekeeping_forward_now - update clock to the current time
180 * 178 *
@@ -376,52 +374,6 @@ void timekeeping_notify(struct clocksource *clock)
376 tick_clock_notify(); 374 tick_clock_notify();
377} 375}
378 376
379#else /* GENERIC_TIME */
380
381static inline void timekeeping_forward_now(void) { }
382
383/**
384 * ktime_get - get the monotonic time in ktime_t format
385 *
386 * returns the time in ktime_t format
387 */
388ktime_t ktime_get(void)
389{
390 struct timespec now;
391
392 ktime_get_ts(&now);
393
394 return timespec_to_ktime(now);
395}
396EXPORT_SYMBOL_GPL(ktime_get);
397
398/**
399 * ktime_get_ts - get the monotonic clock in timespec format
400 * @ts: pointer to timespec variable
401 *
402 * The function calculates the monotonic clock from the realtime
403 * clock and the wall_to_monotonic offset and stores the result
404 * in normalized timespec format in the variable pointed to by @ts.
405 */
406void ktime_get_ts(struct timespec *ts)
407{
408 struct timespec tomono;
409 unsigned long seq;
410
411 do {
412 seq = read_seqbegin(&xtime_lock);
413 getnstimeofday(ts);
414 tomono = wall_to_monotonic;
415
416 } while (read_seqretry(&xtime_lock, seq));
417
418 set_normalized_timespec(ts, ts->tv_sec + tomono.tv_sec,
419 ts->tv_nsec + tomono.tv_nsec);
420}
421EXPORT_SYMBOL_GPL(ktime_get_ts);
422
423#endif /* !GENERIC_TIME */
424
425/** 377/**
426 * ktime_get_real - get the real (wall-) time in ktime_t format 378 * ktime_get_real - get the real (wall-) time in ktime_t format
427 * 379 *
@@ -784,10 +736,11 @@ void update_wall_time(void)
784 return; 736 return;
785 737
786 clock = timekeeper.clock; 738 clock = timekeeper.clock;
787#ifdef CONFIG_GENERIC_TIME 739
788 offset = (clock->read(clock) - clock->cycle_last) & clock->mask; 740#ifdef CONFIG_ARCH_USES_GETTIMEOFFSET
789#else
790 offset = timekeeper.cycle_interval; 741 offset = timekeeper.cycle_interval;
742#else
743 offset = (clock->read(clock) - clock->cycle_last) & clock->mask;
791#endif 744#endif
792 timekeeper.xtime_nsec = (s64)xtime.tv_nsec << timekeeper.shift; 745 timekeeper.xtime_nsec = (s64)xtime.tv_nsec << timekeeper.shift;
793 746
diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig
index 8b1797c4545b..7531ddaf3afe 100644
--- a/kernel/trace/Kconfig
+++ b/kernel/trace/Kconfig
@@ -153,7 +153,7 @@ config IRQSOFF_TRACER
153 bool "Interrupts-off Latency Tracer" 153 bool "Interrupts-off Latency Tracer"
154 default n 154 default n
155 depends on TRACE_IRQFLAGS_SUPPORT 155 depends on TRACE_IRQFLAGS_SUPPORT
156 depends on GENERIC_TIME 156 depends on !ARCH_USES_GETTIMEOFFSET
157 select TRACE_IRQFLAGS 157 select TRACE_IRQFLAGS
158 select GENERIC_TRACER 158 select GENERIC_TRACER
159 select TRACER_MAX_TRACE 159 select TRACER_MAX_TRACE
@@ -175,7 +175,7 @@ config IRQSOFF_TRACER
175config PREEMPT_TRACER 175config PREEMPT_TRACER
176 bool "Preemption-off Latency Tracer" 176 bool "Preemption-off Latency Tracer"
177 default n 177 default n
178 depends on GENERIC_TIME 178 depends on !ARCH_USES_GETTIMEOFFSET
179 depends on PREEMPT 179 depends on PREEMPT
180 select GENERIC_TRACER 180 select GENERIC_TRACER
181 select TRACER_MAX_TRACE 181 select TRACER_MAX_TRACE