Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/xen/xen - make xen_version globally available, with...
details: https://anonhg.NetBSD.org/src/rev/320b4ae8c3f7
branches: trunk
changeset: 777412:320b4ae8c3f7
user: bouyer <bouyer%NetBSD.org@localhost>
date: Fri Feb 17 19:00:45 2012 +0000
description:
- make xen_version globally available, with macros to access major and
minor xen version.
- In xen_initclocks(), do a VCPUOP_stop_periodic_timer only for Xen 3.1
and later
Should fix PR port-xen/45961
diffstat:
sys/arch/xen/xen/clock.c | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
diffs (35 lines):
diff -r 010d5e6ce4d0 -r 320b4ae8c3f7 sys/arch/xen/xen/clock.c
--- a/sys/arch/xen/xen/clock.c Fri Feb 17 18:58:51 2012 +0000
+++ b/sys/arch/xen/xen/clock.c Fri Feb 17 19:00:45 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: clock.c,v 1.61 2012/02/12 14:38:18 jym Exp $ */
+/* $NetBSD: clock.c,v 1.62 2012/02/17 19:00:45 bouyer Exp $ */
/*
*
@@ -29,7 +29,7 @@
#include "opt_xen.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.61 2012/02/12 14:38:18 jym Exp $");
+__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.62 2012/02/17 19:00:45 bouyer Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -458,10 +458,13 @@
* after a while. Use the one-shot timer every NS_PER_TICK
* and rearm it from the event handler.
*/
- err = HYPERVISOR_vcpu_op(VCPUOP_stop_periodic_timer,
- ci->ci_cpuid,
+ if (XEN_MAJOR(xen_version) > 3 || XEN_MINOR(xen_version) > 0) {
+ /* exists only on Xen 3.1 and later */
+ err = HYPERVISOR_vcpu_op(VCPUOP_stop_periodic_timer,
+ ci->ci_cpuid,
NULL);
- KASSERT(err == 0);
+ KASSERT(err == 0);
+ }
err = HYPERVISOR_set_timer_op(
vcpu_system_time[ci->ci_cpuid] + NS_PER_TICK);
Home |
Main Index |
Thread Index |
Old Index