Skip to content

Commit

Permalink
time: Kill off CONFIG_GENERIC_TIME
Browse files Browse the repository at this point in the history
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 <[email protected]>
LKML-Reference: <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
  • Loading branch information
John Stultz authored and KAGA-KOKO committed Jul 27, 2010
1 parent ce3bf7a commit 592913e
Show file tree
Hide file tree
Showing 33 changed files with 19 additions and 159 deletions.
3 changes: 1 addition & 2 deletions Documentation/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ parameter is applicable:
MTD MTD (Memory Technology Device) support is enabled.
NET Appropriate network support is enabled.
NUMA NUMA support is enabled.
GENERIC_TIME The generic timeofday code is enabled.
NFS Appropriate NFS support is enabled.
OSS OSS sound support is enabled.
PV_OPS A paravirtualized kernel is enabled.
Expand Down Expand Up @@ -468,7 +467,7 @@ and is between 256 and 4096 characters. It is defined in the file
clocksource is not available, it defaults to PIT.
Format: { pit | tsc | cyclone | pmtmr }

clocksource= [GENERIC_TIME] Override the default clocksource
clocksource= Override the default clocksource
Format: <string>
Override the default clocksource and use the clocksource
with the name specified.
Expand Down
4 changes: 0 additions & 4 deletions arch/alpha/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,6 @@ config GENERIC_CALIBRATE_DELAY
bool
default y

config GENERIC_TIME
bool
default y

config GENERIC_CMOS_UPDATE
def_bool y

Expand Down
4 changes: 0 additions & 4 deletions arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@ config SYS_SUPPORTS_APM_EMULATION
config GENERIC_GPIO
bool

config GENERIC_TIME
bool
default y

config ARCH_USES_GETTIMEOFFSET
bool
default n
Expand Down
3 changes: 0 additions & 3 deletions arch/avr32/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@ config GENERIC_IRQ_PROBE
config RWSEM_GENERIC_SPINLOCK
def_bool y

config GENERIC_TIME
def_bool y

config GENERIC_CLOCKEVENTS
def_bool y

Expand Down
3 changes: 0 additions & 3 deletions arch/blackfin/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -614,9 +614,6 @@ comment "Kernel Timer/Scheduler"

source kernel/Kconfig.hz

config GENERIC_TIME
def_bool y

config GENERIC_CLOCKEVENTS
bool "Generic clock events"
default y
Expand Down
3 changes: 0 additions & 3 deletions arch/cris/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ config RWSEM_GENERIC_SPINLOCK
config RWSEM_XCHGADD_ALGORITHM
bool

config GENERIC_TIME
def_bool y

config GENERIC_CMOS_UPDATE
def_bool y

Expand Down
4 changes: 0 additions & 4 deletions arch/frv/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ config GENERIC_HARDIRQS_NO__DO_IRQ
bool
default y

config GENERIC_TIME
bool
default y

config TIME_LOW_RES
bool
default y
Expand Down
4 changes: 0 additions & 4 deletions arch/h8300/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,6 @@ config GENERIC_CALIBRATE_DELAY
bool
default y

config GENERIC_TIME
bool
default y

config GENERIC_BUG
bool
depends on BUG
Expand Down
4 changes: 0 additions & 4 deletions arch/ia64/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,6 @@ config GENERIC_CALIBRATE_DELAY
bool
default y

config GENERIC_TIME
bool
default y

config GENERIC_TIME_VSYSCALL
bool
default y
Expand Down
3 changes: 0 additions & 3 deletions arch/m32r/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ config HZ
int
default 100

config GENERIC_TIME
def_bool y

config ARCH_USES_GETTIMEOFFSET
def_bool y

Expand Down
3 changes: 0 additions & 3 deletions arch/m68k/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,6 @@ config HZ
int
default 100

config GENERIC_TIME
def_bool y

config ARCH_USES_GETTIMEOFFSET
def_bool y

Expand Down
4 changes: 0 additions & 4 deletions arch/m68knommu/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,6 @@ config GENERIC_CALIBRATE_DELAY
bool
default y

config GENERIC_TIME
bool
default y

config GENERIC_CMOS_UPDATE
bool
default y
Expand Down
3 changes: 0 additions & 3 deletions arch/microblaze/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ config GENERIC_IRQ_PROBE
config GENERIC_CALIBRATE_DELAY
def_bool y

config GENERIC_TIME
def_bool y

config GENERIC_TIME_VSYSCALL
def_bool n

Expand Down
4 changes: 0 additions & 4 deletions arch/mips/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -733,10 +733,6 @@ config GENERIC_CLOCKEVENTS
bool
default y

config GENERIC_TIME
bool
default y

config GENERIC_CMOS_UPDATE
bool
default y
Expand Down
3 changes: 0 additions & 3 deletions arch/mn10300/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ config GENERIC_FIND_NEXT_BIT
config GENERIC_HWEIGHT
def_bool y

config GENERIC_TIME
def_bool y

config GENERIC_BUG
def_bool y

Expand Down
4 changes: 0 additions & 4 deletions arch/parisc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,6 @@ config GENERIC_CALIBRATE_DELAY
bool
default y

config GENERIC_TIME
bool
default y

config TIME_LOW_RES
bool
depends on SMP
Expand Down
3 changes: 0 additions & 3 deletions arch/powerpc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ config MMU
config GENERIC_CMOS_UPDATE
def_bool y

config GENERIC_TIME
def_bool y

config GENERIC_TIME_VSYSCALL
def_bool y

Expand Down
3 changes: 0 additions & 3 deletions arch/s390/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ config ARCH_HAS_ILOG2_U64
config GENERIC_HWEIGHT
def_bool y

config GENERIC_TIME
def_bool y

config GENERIC_TIME_VSYSCALL
def_bool y

Expand Down
3 changes: 0 additions & 3 deletions arch/score/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,6 @@ config GENERIC_CALIBRATE_DELAY
config GENERIC_CLOCKEVENTS
def_bool y

config GENERIC_TIME
def_bool y

config SCHED_NO_NO_OMIT_FRAME_POINTER
def_bool y

Expand Down
3 changes: 0 additions & 3 deletions arch/sh/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,6 @@ config GENERIC_CALIBRATE_DELAY
config GENERIC_IOMAP
bool

config GENERIC_TIME
def_bool y

config GENERIC_CLOCKEVENTS
def_bool y

Expand Down
3 changes: 0 additions & 3 deletions arch/sparc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,6 @@ config BITS
default 32 if SPARC32
default 64 if SPARC64

config GENERIC_TIME
def_bool y

config ARCH_USES_GETTIMEOFFSET
bool
default y if SPARC32
Expand Down
4 changes: 0 additions & 4 deletions arch/um/Kconfig.common
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,6 @@ config GENERIC_BUG
default y
depends on BUG

config GENERIC_TIME
bool
default y

config GENERIC_CLOCKEVENTS
bool
default y
Expand Down
5 changes: 1 addition & 4 deletions arch/x86/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,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_TIME
def_bool y

config GENERIC_CMOS_UPDATE
def_bool y

Expand Down Expand Up @@ -2046,7 +2043,7 @@ config SCx200

config SCx200HR_TIMER
tristate "NatSemi SCx200 27MHz High-Resolution Timer Support"
depends on SCx200 && GENERIC_TIME
depends on SCx200
default y
---help---
This driver provides a clocksource built upon the on-chip
Expand Down
3 changes: 0 additions & 3 deletions arch/xtensa/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ config HZ
int
default 100

config GENERIC_TIME
def_bool y

source "init/Kconfig"
source "kernel/Kconfig.freezer"

Expand Down
4 changes: 3 additions & 1 deletion drivers/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,9 @@ obj-y += firmware/
obj-$(CONFIG_CRYPTO) += crypto/
obj-$(CONFIG_SUPERH) += sh/
obj-$(CONFIG_ARCH_SHMOBILE) += sh/
obj-$(CONFIG_GENERIC_TIME) += clocksource/
ifndef CONFIG_ARCH_USES_GETTIMEOFFSET
obj-y += clocksource/
endif
obj-$(CONFIG_DMA_ENGINE) += dma/
obj-$(CONFIG_DCA) += dca/
obj-$(CONFIG_HID) += hid/
Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/acpi_pad.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ static void power_saving_mwait_init(void)
power_saving_mwait_eax = (highest_cstate << MWAIT_SUBSTATE_SIZE) |
(highest_subcstate - 1);

#if defined(CONFIG_GENERIC_TIME) && defined(CONFIG_X86)
#if defined(CONFIG_X86)
switch (boot_cpu_data.x86_vendor) {
case X86_VENDOR_AMD:
case X86_VENDOR_INTEL:
Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/processor_idle.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ int acpi_processor_resume(struct acpi_device * device)
return 0;
}

#if defined (CONFIG_GENERIC_TIME) && defined (CONFIG_X86)
#if defined(CONFIG_X86)
static void tsc_check_state(int state)
{
switch (boot_cpu_data.x86_vendor) {
Expand Down
4 changes: 2 additions & 2 deletions drivers/misc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ config ATMEL_TCLIB

config ATMEL_TCB_CLKSRC
bool "TC Block Clocksource"
depends on ATMEL_TCLIB && GENERIC_TIME
depends on ATMEL_TCLIB
default y
help
Select this to get a high precision clocksource based on a
Expand Down Expand Up @@ -240,7 +240,7 @@ config CS5535_MFGPT_DEFAULT_IRQ

config CS5535_CLOCK_EVENT_SRC
tristate "CS5535/CS5536 high-res timer (MFGPT) events"
depends on GENERIC_TIME && GENERIC_CLOCKEVENTS && CS5535_MFGPT
depends on GENERIC_CLOCKEVENTS && CS5535_MFGPT
help
This driver provides a clock event source based on the MFGPT
timer(s) in the CS5535 and CS5536 companion chips.
Expand Down
16 changes: 0 additions & 16 deletions kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -300,22 +300,6 @@ struct timespec timespec_trunc(struct timespec t, unsigned gran)
}
EXPORT_SYMBOL(timespec_trunc);

#ifndef CONFIG_GENERIC_TIME
/*
* Simulate gettimeofday using do_gettimeofday which only allows a timeval
* and therefore only yields usec accuracy
*/
void getnstimeofday(struct timespec *tv)
{
struct timeval x;

do_gettimeofday(&x);
tv->tv_sec = x.tv_sec;
tv->tv_nsec = x.tv_usec * NSEC_PER_USEC;
}
EXPORT_SYMBOL_GPL(getnstimeofday);
#endif

/* Converts Gregorian date to seconds since 1970-01-01 00:00:00.
* Assumes input in normal date format, i.e. 1980-12-31 23:59:59
* => year=1980, mon=12, day=31, hour=23, min=59, sec=59.
Expand Down
4 changes: 2 additions & 2 deletions kernel/time/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ config TICK_ONESHOT

config NO_HZ
bool "Tickless System (Dynamic Ticks)"
depends on GENERIC_TIME && GENERIC_CLOCKEVENTS
depends on !ARCH_USES_GETTIMEOFFSET && GENERIC_CLOCKEVENTS
select TICK_ONESHOT
help
This option enables a tickless system: timer interrupts will
Expand All @@ -15,7 +15,7 @@ config NO_HZ

config HIGH_RES_TIMERS
bool "High Resolution Timer Support"
depends on GENERIC_TIME && GENERIC_CLOCKEVENTS
depends on !ARCH_USES_GETTIMEOFFSET && GENERIC_CLOCKEVENTS
select TICK_ONESHOT
help
This option enables high resolution timer support. If your
Expand Down
4 changes: 2 additions & 2 deletions kernel/time/clocksource.c
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ static u64 clocksource_max_deferment(struct clocksource *cs)
return max_nsecs - (max_nsecs >> 5);
}

#ifdef CONFIG_GENERIC_TIME
#ifndef CONFIG_ARCH_USES_GETTIMEOFFSET

/**
* clocksource_select - Select the best clocksource available
Expand Down Expand Up @@ -577,7 +577,7 @@ static void clocksource_select(void)
}
}

#else /* CONFIG_GENERIC_TIME */
#else /* !CONFIG_ARCH_USES_GETTIMEOFFSET */

static inline void clocksource_select(void) { }

Expand Down
Loading

0 comments on commit 592913e

Please sign in to comment.