ia64/xen-unstable

view tools/libxc/xc_sedf.c @ 9488:0a6f5527ca4b

[IA64] set itv handoff as masked and enable reading irr[0-3]

Set initial vcpu itv handoff state to mask the timer vector.
This seems to match hardware and makes logical sense from a
spurious interrupt perspective. Enable vcpu_get_irr[0-3]
functions as they seem to work and have the proper backing.
This enables the check_sal_cache_flush() in arch/ia64/kernel.sal.c
to work unmodified, allowing us to remove the Xen changes from
the file (and thus the file from the sparse tree).

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
author awilliam@xenbuild.aw
date Tue Apr 04 09:39:45 2006 -0600 (2006-04-04)
parents 602aefe7bd48
children 74ee53209cca
line source
1 /******************************************************************************
2 * xc_sedf.c
3 *
4 * API for manipulating parameters of the Simple EDF scheduler.
5 *
6 * changes by Stephan Diestelhorst
7 * based on code
8 * by Mark Williamson, Copyright (c) 2004 Intel Research Cambridge.
9 */
11 #include "xc_private.h"
13 int xc_sedf_domain_set(int xc_handle,
14 uint32_t domid, uint64_t period, uint64_t slice,uint64_t latency, uint16_t extratime,uint16_t weight)
15 {
16 DECLARE_DOM0_OP;
17 struct sedf_adjdom *p = &op.u.adjustdom.u.sedf;
19 op.cmd = DOM0_ADJUSTDOM;
20 op.u.adjustdom.domain = (domid_t)domid;
21 op.u.adjustdom.sched_id = SCHED_SEDF;
22 op.u.adjustdom.direction = SCHED_INFO_PUT;
24 p->period = period;
25 p->slice = slice;
26 p->latency = latency;
27 p->extratime = extratime;
28 p->weight = weight;
29 return do_dom0_op(xc_handle, &op);
30 }
32 int xc_sedf_domain_get(int xc_handle, uint32_t domid, uint64_t *period, uint64_t *slice, uint64_t* latency, uint16_t* extratime, uint16_t* weight)
33 {
34 DECLARE_DOM0_OP;
35 int ret;
36 struct sedf_adjdom *p = &op.u.adjustdom.u.sedf;
38 op.cmd = DOM0_ADJUSTDOM;
39 op.u.adjustdom.domain = (domid_t)domid;
40 op.u.adjustdom.sched_id = SCHED_SEDF;
41 op.u.adjustdom.direction = SCHED_INFO_GET;
43 ret = do_dom0_op(xc_handle, &op);
45 *period = p->period;
46 *slice = p->slice;
47 *latency = p->latency;
48 *extratime = p->extratime;
49 *weight = p->weight;
50 return ret;
51 }