Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 279505
b: refs/heads/master
c: 11b8633
h: refs/heads/master
i:
  279503: 6120c04
v: v3
  • Loading branch information
Anton Blanchard authored and Benjamin Herrenschmidt committed Nov 25, 2011
1 parent 0d8c247 commit fa3f61b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 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: d8afc6fd95496204174f19af0cb39eefee0c3e8a
refs/heads/master: 11b8633ada8633991e584951d0027f2741162201
13 changes: 3 additions & 10 deletions trunk/arch/powerpc/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@ static struct clocksource clocksource_rtc = {
.rating = 400,
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
.mask = CLOCKSOURCE_MASK(64),
.shift = 22,
.mult = 0, /* To be filled in */
.read = rtc_read,
};

Expand All @@ -97,8 +95,6 @@ static struct clocksource clocksource_timebase = {
.rating = 400,
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
.mask = CLOCKSOURCE_MASK(64),
.shift = 22,
.mult = 0, /* To be filled in */
.read = timebase_read,
};

Expand Down Expand Up @@ -822,9 +818,8 @@ void update_vsyscall(struct timespec *wall_time, struct timespec *wtm,
++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;
/* 19342813113834067 ~= 2^(20+64) / 1e9 */
new_tb_to_xs = (u64) mult * (19342813113834067ULL >> clock->shift);
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;
Expand Down Expand Up @@ -875,9 +870,7 @@ static void __init clocksource_init(void)
else
clock = &clocksource_timebase;

clock->mult = clocksource_hz2mult(tb_ticks_per_sec, clock->shift);

if (clocksource_register(clock)) {
if (clocksource_register_hz(clock, tb_ticks_per_sec)) {
printk(KERN_ERR "clocksource: %s is already registered\n",
clock->name);
return;
Expand Down

0 comments on commit fa3f61b

Please sign in to comment.