Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=37250097e1b730c30da1790e354c0da65e617043 Commit: 37250097e1b730c30da1790e354c0da65e617043 Parent: 88ffc3505988196ef5cfdc0278ad89025c2a7b1a Author: Rusty Russell <[EMAIL PROTECTED]> AuthorDate: Thu Aug 9 20:52:35 2007 +1000 Committer: Linus Torvalds <[EMAIL PROTECTED]> CommitDate: Thu Aug 9 08:14:56 2007 -0700
Fix non-TSC guest clocksource lockup lguest uses a host-supplied wallclock-based clocksource when the TSC is not reliable. As this is already in nanoseconds, I naively used a multiplier of 1 and a shift of 0. But update_wall_time() in its infinite wisdom decides to adjust the clock a little (where does it think it's getting a more accurate time from?) It will happily tweak the multiplier... to 0, then -1. So the "fix" is to use a shift of 22 like everyone else, and a multiplier of 1 << 22. Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]> --- drivers/lguest/lguest.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/lguest/lguest.c b/drivers/lguest/lguest.c index 1bc1546..fb17d27 100644 --- a/drivers/lguest/lguest.c +++ b/drivers/lguest/lguest.c @@ -687,7 +687,8 @@ static struct clocksource lguest_clock = { .rating = 400, .read = lguest_clock_read, .mask = CLOCKSOURCE_MASK(64), - .mult = 1, + .mult = 1 << 22, + .shift = 22, }; /* The "scheduler clock" is just our real clock, adjusted to start at zero */ @@ -770,7 +771,6 @@ static void lguest_time_init(void) * way, the "rating" is initialized so high that it's always chosen * over any other clocksource. */ if (lguest_data.tsc_khz) { - lguest_clock.shift = 22; lguest_clock.mult = clocksource_khz2mult(lguest_data.tsc_khz, lguest_clock.shift); lguest_clock.flags = CLOCK_SOURCE_IS_CONTINUOUS; - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html