From cf155fd55226f3ff052c5367c225f69d184b908d Mon Sep 17 00:00:00 2001 From: Jeremy Fitzhardinge Date: Mon, 12 Jul 2010 11:49:59 -0700 Subject: [PATCH] --- yaml --- r: 204773 b: refs/heads/master c: 8a22b9996b001c88f2bfb54c6de6a05fc39e177a h: refs/heads/master i: 204771: a880453de8a2393834c72afc8e2b436a942fa89a v: v3 --- [refs] | 2 +- trunk/arch/x86/xen/enlighten.c | 2 +- trunk/arch/x86/xen/time.c | 39 ---------------------------------- 3 files changed, 2 insertions(+), 41 deletions(-) diff --git a/[refs] b/[refs] index 96a135b67842..6cf920ab7f7d 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 31de189f7d02da163f77d46a86d9e655a2d83124 +refs/heads/master: 8a22b9996b001c88f2bfb54c6de6a05fc39e177a diff --git a/trunk/arch/x86/xen/enlighten.c b/trunk/arch/x86/xen/enlighten.c index 399bed2de881..fef034a04c24 100644 --- a/trunk/arch/x86/xen/enlighten.c +++ b/trunk/arch/x86/xen/enlighten.c @@ -926,7 +926,7 @@ static const struct pv_init_ops xen_init_ops __initdata = { }; static const struct pv_time_ops xen_time_ops __initdata = { - .sched_clock = xen_sched_clock, + .sched_clock = xen_clocksource_read, }; static const struct pv_cpu_ops xen_cpu_ops __initdata = { diff --git a/trunk/arch/x86/xen/time.c b/trunk/arch/x86/xen/time.c index 32764b8880b5..e90360ff4a08 100644 --- a/trunk/arch/x86/xen/time.c +++ b/trunk/arch/x86/xen/time.c @@ -155,45 +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) {