From: Jeremy Fitzhardinge Date: Wed, 4 Aug 2010 21:49:16 +0000 (-0700) Subject: Merge branch 'upstream/pvhvm' into upstream/xen X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ca50a5f39041497253c6362f2ba4da1b56d3e6cb;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git Merge branch 'upstream/pvhvm' into upstream/xen * upstream/pvhvm: Introduce CONFIG_XEN_PVHVM compile option blkfront: do not create a PV cdrom device if xen_hvm_guest support multiple .discard.* sections to avoid section type conflicts xen/pvhvm: fix build problem when !CONFIG_XEN xenfs: enable for HVM domains too x86: Call HVMOP_pagetable_dying on exit_mmap. x86: Unplug emulated disks and nics. x86: Use xen_vcpuop_clockevent, xen_clocksource and xen wallclock. xen: Fix find_unbound_irq in presence of ioapic irqs. xen: Add suspend/resume support for PV on HVM guests. xen: Xen PCI platform device driver. x86/xen: event channels delivery on HVM. x86: early PV on HVM features initialization. xen: Add support for HVM hypercalls. Conflicts: arch/x86/xen/enlighten.c arch/x86/xen/time.c --- ca50a5f39041497253c6362f2ba4da1b56d3e6cb diff --cc arch/x86/xen/time.c index a86df42e46ad,2aab4a2b9100..1a5353a753fc --- a/arch/x86/xen/time.c +++ b/arch/x86/xen/time.c @@@ -155,8 -156,47 +156,8 @@@ 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. - */ -static 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) + static unsigned long xen_tsc_khz(void) { struct pvclock_vcpu_time_info *info = &HYPERVISOR_shared_info->vcpu_info[0].time; @@@ -434,7 -474,11 +435,11 @@@ void xen_timer_resume(void } } - __init void xen_time_init(void) + static const struct pv_time_ops xen_time_ops __initdata = { - .sched_clock = xen_sched_clock, ++ .sched_clock = xen_clocksource_read, + }; + + static __init void xen_time_init(void) { int cpu = smp_processor_id(); struct timespec tp;