Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 206155
b: refs/heads/master
c: 47916be
h: refs/heads/master
i:
  206153: affd100
  206151: 4ebb953
v: v3
  • Loading branch information
Thomas Gleixner committed Jul 28, 2010
1 parent c8dd024 commit b8e4ef9
Show file tree
Hide file tree
Showing 46 changed files with 162 additions and 260 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d75d68cfef4936ddf38d2694ae2f7d1f7c45db05
refs/heads/master: 47916be4e28c3d6fdb97dd8fb887d1d9b3145b9d
10 changes: 0 additions & 10 deletions trunk/Documentation/feature-removal-schedule.txt
Original file line number Diff line number Diff line change
Expand Up @@ -549,16 +549,6 @@ Who: Avi Kivity <avi@redhat.com>

----------------------------

What: xtime, wall_to_monotonic
When: 2.6.36+
Files: kernel/time/timekeeping.c include/linux/time.h
Why: Cleaning up timekeeping internal values. Please use
existing timekeeping accessor functions to access
the equivalent functionality.
Who: John Stultz <johnstul@us.ibm.com>

----------------------------

What: KVM kernel-allocated memory slots
When: July 2010
Why: Since 2.6.25, kvm supports user-allocated memory slots, which are
Expand Down
3 changes: 1 addition & 2 deletions trunk/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 trunk/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 trunk/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 trunk/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 trunk/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 trunk/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 trunk/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 trunk/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 trunk/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
7 changes: 4 additions & 3 deletions trunk/arch/ia64/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,8 @@ void update_vsyscall_tz(void)
{
}

void update_vsyscall(struct timespec *wall, struct clocksource *c, u32 mult)
void update_vsyscall(struct timespec *wall, struct timespec *wtm,
struct clocksource *c, u32 mult)
{
unsigned long flags;

Expand All @@ -487,9 +488,9 @@ void update_vsyscall(struct timespec *wall, struct clocksource *c, u32 mult)
/* copy kernel time structures */
fsyscall_gtod_data.wall_time.tv_sec = wall->tv_sec;
fsyscall_gtod_data.wall_time.tv_nsec = wall->tv_nsec;
fsyscall_gtod_data.monotonic_time.tv_sec = wall_to_monotonic.tv_sec
fsyscall_gtod_data.monotonic_time.tv_sec = wtm->tv_sec
+ wall->tv_sec;
fsyscall_gtod_data.monotonic_time.tv_nsec = wall_to_monotonic.tv_nsec
fsyscall_gtod_data.monotonic_time.tv_nsec = wtm->tv_nsec
+ wall->tv_nsec;

/* normalize */
Expand Down
3 changes: 0 additions & 3 deletions trunk/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 trunk/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 trunk/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 trunk/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 trunk/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 trunk/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 trunk/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 trunk/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
60 changes: 27 additions & 33 deletions trunk/arch/powerpc/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -796,10 +796,30 @@ static cycle_t timebase_read(struct clocksource *cs)
return (cycle_t)get_tb();
}

static inline void update_gtod(u64 new_tb_stamp, u64 new_stamp_xsec,
u64 new_tb_to_xs, struct timespec *now,
u32 frac_sec)
void update_vsyscall(struct timespec *wall_time, struct timespec *wtm,
struct clocksource *clock, u32 mult)
{
u64 new_tb_to_xs, new_stamp_xsec;
u32 frac_sec;

if (clock != &clocksource_timebase)
return;

/* Make userspace gettimeofday spin until we're done. */
++vdso_data->tb_update_count;
smp_mb();

/* XXX this assumes clock->shift == 22 */
/* 4611686018 ~= 2^(20+64-22) / 1e9 */
new_tb_to_xs = (u64) mult * 4611686018ULL;
new_stamp_xsec = (u64) wall_time->tv_nsec * XSEC_PER_SEC;
do_div(new_stamp_xsec, 1000000000);
new_stamp_xsec += (u64) wall_time->tv_sec * XSEC_PER_SEC;

BUG_ON(wall_time->tv_nsec >= NSEC_PER_SEC);
/* this is tv_nsec / 1e9 as a 0.32 fraction */
frac_sec = ((u64) wall_time->tv_nsec * 18446744073ULL) >> 32;

/*
* tb_update_count is used to allow the userspace gettimeofday code
* to assure itself that it sees a consistent view of the tb_to_xs and
Expand All @@ -811,43 +831,17 @@ static inline void update_gtod(u64 new_tb_stamp, u64 new_stamp_xsec,
* We expect the caller to have done the first increment of
* vdso_data->tb_update_count already.
*/
vdso_data->tb_orig_stamp = new_tb_stamp;
vdso_data->tb_orig_stamp = clock->cycle_last;
vdso_data->stamp_xsec = new_stamp_xsec;
vdso_data->tb_to_xs = new_tb_to_xs;
vdso_data->wtom_clock_sec = wall_to_monotonic.tv_sec;
vdso_data->wtom_clock_nsec = wall_to_monotonic.tv_nsec;
vdso_data->stamp_xtime = *now;
vdso_data->wtom_clock_sec = wtm->tv_sec;
vdso_data->wtom_clock_nsec = wtm->tv_nsec;
vdso_data->stamp_xtime = *wall_time;
vdso_data->stamp_sec_fraction = frac_sec;
smp_wmb();
++(vdso_data->tb_update_count);
}

void update_vsyscall(struct timespec *wall_time, struct clocksource *clock,
u32 mult)
{
u64 t2x, stamp_xsec;
u32 frac_sec;

if (clock != &clocksource_timebase)
return;

/* Make userspace gettimeofday spin until we're done. */
++vdso_data->tb_update_count;
smp_mb();

/* XXX this assumes clock->shift == 22 */
/* 4611686018 ~= 2^(20+64-22) / 1e9 */
t2x = (u64) mult * 4611686018ULL;
stamp_xsec = (u64) wall_time->tv_nsec * XSEC_PER_SEC;
do_div(stamp_xsec, 1000000000);
stamp_xsec += (u64) wall_time->tv_sec * XSEC_PER_SEC;

BUG_ON(wall_time->tv_nsec >= NSEC_PER_SEC);
/* this is tv_nsec / 1e9 as a 0.32 fraction */
frac_sec = ((u64) wall_time->tv_nsec * 18446744073ULL) >> 32;
update_gtod(clock->cycle_last, stamp_xsec, t2x, wall_time, frac_sec);
}

void update_vsyscall_tz(void)
{
/* Make userspace gettimeofday spin until we're done. */
Expand Down
3 changes: 0 additions & 3 deletions trunk/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
8 changes: 4 additions & 4 deletions trunk/arch/s390/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,8 @@ struct clocksource * __init clocksource_default_clock(void)
return &clocksource_tod;
}

void update_vsyscall(struct timespec *wall_time, struct clocksource *clock,
u32 mult)
void update_vsyscall(struct timespec *wall_time, struct timespec *wtm,
struct clocksource *clock, u32 mult)
{
if (clock != &clocksource_tod)
return;
Expand All @@ -219,8 +219,8 @@ void update_vsyscall(struct timespec *wall_time, struct clocksource *clock,
vdso_data->xtime_tod_stamp = clock->cycle_last;
vdso_data->xtime_clock_sec = wall_time->tv_sec;
vdso_data->xtime_clock_nsec = wall_time->tv_nsec;
vdso_data->wtom_clock_sec = wall_to_monotonic.tv_sec;
vdso_data->wtom_clock_nsec = wall_to_monotonic.tv_nsec;
vdso_data->wtom_clock_sec = wtm->tv_sec;
vdso_data->wtom_clock_nsec = wtm->tv_nsec;
vdso_data->ntp_mult = mult;
smp_wmb();
++vdso_data->tb_update_count;
Expand Down
3 changes: 0 additions & 3 deletions trunk/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 trunk/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 trunk/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 trunk/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
Loading

0 comments on commit b8e4ef9

Please sign in to comment.