From: Jeremy Fitzhardinge Date: Wed, 4 Aug 2010 21:49:05 +0000 (-0700) Subject: Merge branch 'upstream/core' into upstream/xen X-Git-Tag: v2.6.36-rc1~551^2~2 X-Git-Url: http://git.samba.org/samba.git/?p=sfrench%2Fcifs-2.6.git;a=commitdiff_plain;h=a70ce4b6064b64477ed12ef1878980f842819094;hp=-c Merge branch 'upstream/core' into upstream/xen * upstream/core: xen/panic: use xen_reboot and fix smp_send_stop Xen: register panic notifier to take crashes of xen guests on panic xen: support large numbers of CPUs with vcpu info placement xen: drop xen_sched_clock in favour of using plain wallclock time pvops: do not notify callers from register_xenstore_notifier xen: make sure pages are really part of domain before freeing xen: release unused free memory --- a70ce4b6064b64477ed12ef1878980f842819094 diff --combined arch/x86/xen/time.c index b3c6c59ed302,e90360ff4a08..a86df42e46ad --- a/arch/x86/xen/time.c +++ b/arch/x86/xen/time.c @@@ -155,45 -155,6 +155,6 @@@ static void do_stolen_accounting(void account_idle_ticks(ticks); } - /* - * Xen sched_clock implementation. Returns the number of unstolen - * nanoseconds, which is nanoseconds the VCPU spent in RUNNING+BLOCKED - * states. - */ - unsigned long long xen_sched_clock(void) - { - struct vcpu_runstate_info state; - cycle_t now; - u64 ret; - s64 offset; - - /* - * Ideally sched_clock should be called on a per-cpu basis - * anyway, so preempt should already be disabled, but that's - * not current practice at the moment. - */ - preempt_disable(); - - now = xen_clocksource_read(); - - get_runstate_snapshot(&state); - - WARN_ON(state.state != RUNSTATE_running); - - offset = now - state.state_entry_time; - if (offset < 0) - offset = 0; - - ret = state.time[RUNSTATE_blocked] + - state.time[RUNSTATE_running] + - offset; - - preempt_enable(); - - return ret; - } - - /* Get the TSC speed from Xen */ unsigned long xen_tsc_khz(void) { @@@ -476,7 -437,6 +437,7 @@@ void xen_timer_resume(void __init void xen_time_init(void) { int cpu = smp_processor_id(); + struct timespec tp; clocksource_register(&xen_clocksource); @@@ -488,8 -448,9 +449,8 @@@ } /* Set initial system time with full resolution */ - xen_read_wallclock(&xtime); - set_normalized_timespec(&wall_to_monotonic, - -xtime.tv_sec, -xtime.tv_nsec); + xen_read_wallclock(&tp); + do_settimeofday(&tp); setup_force_cpu_cap(X86_FEATURE_TSC);