aboutsummaryrefslogtreecommitdiffstats
path: root/xen
diff options
context:
space:
mode:
authorkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>2003-09-30 15:02:35 +0000
committerkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>2003-09-30 15:02:35 +0000
commitb1deb326aae98cab8637b88f92524397d3b9d84f (patch)
tree6a9aaa4a07470fee02eeb062766c10958fdb8152 /xen
parent763bc56849e6d65586cb0cb2f27506708ed1ec7a (diff)
downloadxen-b1deb326aae98cab8637b88f92524397d3b9d84f.tar.gz
xen-b1deb326aae98cab8637b88f92524397d3b9d84f.tar.bz2
xen-b1deb326aae98cab8637b88f92524397d3b9d84f.zip
bitkeeper revision 1.476 (3f799b0bPFF2z5dlo74mOsJYQ_xmYQ)
Makefile: Version upgrade to 1.1-devel sched.h, e100.h, schedule.c, keyhandler.c: Fake out schedule_timeout in preparation for excising per-domain ring-0 stacks from Xen.
Diffstat (limited to 'xen')
-rw-r--r--xen/Makefile4
-rw-r--r--xen/common/keyhandler.c3
-rw-r--r--xen/common/schedule.c66
-rw-r--r--xen/drivers/net/e100/e100.h4
-rw-r--r--xen/include/xeno/sched.h11
5 files changed, 12 insertions, 76 deletions
diff --git a/xen/Makefile b/xen/Makefile
index bc939340ea..b6ed2ad376 100644
--- a/xen/Makefile
+++ b/xen/Makefile
@@ -2,8 +2,8 @@
# This is the correct place to edit the build version.
# All other places this is stored (eg. compile.h) should be autogenerated.
export XEN_VERSION = 1
-export XEN_SUBVERSION = 0
-export XEN_EXTRAVERSION = ""
+export XEN_SUBVERSION = 1
+export XEN_EXTRAVERSION = "-devel"
export BASEDIR := $(shell pwd)
diff --git a/xen/common/keyhandler.c b/xen/common/keyhandler.c
index 23b0527895..da5becb916 100644
--- a/xen/common/keyhandler.c
+++ b/xen/common/keyhandler.c
@@ -107,11 +107,10 @@ void do_task_queues(u_char key, void *dev_id, struct pt_regs *regs)
s = p->shared_info;
if( !is_idle_task(p) )
{
- net_vif_t *v = find_vif_by_id((p->domain)<<VIF_DOMAIN_SHIFT);
printk("Guest: events = %08lx, events_mask = %08lx\n",
s->events, s->events_mask);
- if ( v != NULL )
+ if ( (v = find_vif_by_id((p->domain)<<VIF_DOMAIN_SHIFT)) != NULL )
{
printk("rx_prod=%d ,rx_cons=%d, tx_prod=%d, tx_cons=%d\n",
v->rx_prod, v->rx_cons, v->tx_prod, v->tx_cons );
diff --git a/xen/common/schedule.c b/xen/common/schedule.c
index c17efab8aa..8041844d00 100644
--- a/xen/common/schedule.c
+++ b/xen/common/schedule.c
@@ -594,78 +594,12 @@ void schedulers_start(void)
}
-/****************************************************************************
- * Functions for legacy support.
- * Schedule timeout is used at a number of places and is a bit meaningless
- * in the context of Xen, as Domains are not able to call these and all
- * there entry points into Xen should be asynchronous. If a domain wishes
- * to block for a while it should use Xen's sched_op/yield entry point.
- ****************************************************************************/
-
static void process_timeout(unsigned long __data)
{
struct task_struct * p = (struct task_struct *) __data;
wake_up(p);
}
-long schedule_timeout(long timeout)
-{
- struct timer_list timer;
- unsigned long expire;
-
- switch (timeout)
- {
- case MAX_SCHEDULE_TIMEOUT:
- /* Sanity! This just wouldn't make sense. */
- if ( is_idle_task(current) )
- panic("Arbitrary sleep in idle task!");
- /*
- * These two special cases are useful to be comfortable in the caller.
- * Nothing more. We could take MAX_SCHEDULE_TIMEOUT from one of the
- * negative value but I' d like to return a valid offset (>=0) to allow
- * the caller to do everything it want with the retval.
- */
- schedule();
- goto out;
-
- default:
- /*
- * Another bit of PARANOID. Note that the retval will be 0 since no
- * piece of kernel is supposed to do a check for a negative retval of
- * schedule_timeout() (since it should never happens anyway). You just
- * have the printk() that will tell you if something is gone wrong and
- * where.
- */
- if (timeout < 0)
- {
- printk(KERN_ERR "schedule_timeout: wrong timeout "
- "value %lx from %p\n", timeout,
- __builtin_return_address(0));
- current->state = TASK_RUNNING;
- goto out;
- }
- }
-
- expire = timeout + jiffies;
-
- init_timer(&timer);
- timer.expires = expire;
- timer.data = (unsigned long) current;
- timer.function = process_timeout;
-
- add_timer(&timer);
- schedule();
- del_timer_sync(&timer);
-
- timeout = expire - jiffies;
-
- out:
- return timeout < 0 ? 0 : timeout;
-}
-
-/****************************************************************************
- * debug function
- ****************************************************************************/
static void dump_rqueue(struct list_head *queue, char *name)
{
diff --git a/xen/drivers/net/e100/e100.h b/xen/drivers/net/e100/e100.h
index 75b73a024d..456d2c7ec8 100644
--- a/xen/drivers/net/e100/e100.h
+++ b/xen/drivers/net/e100/e100.h
@@ -62,10 +62,6 @@
#define yield() ((void)0)
-#define schedule_timeout(_t) \
- set_current_state(TASK_RUNNING); \
- mdelay((_t)*(1000/HZ))
-
#define E100_REGS_LEN 1
/*
* Configure parameters for buffers per controller.
diff --git a/xen/include/xeno/sched.h b/xen/include/xeno/sched.h
index 527ceb5e6a..5d451fa960 100644
--- a/xen/include/xeno/sched.h
+++ b/xen/include/xeno/sched.h
@@ -15,6 +15,7 @@
#include <xeno/list.h>
#include <xeno/time.h>
#include <xeno/ac_timer.h>
+#include <xeno/delay.h>
#define MAX_DOMAIN_NAME 16
@@ -263,7 +264,6 @@ extern unsigned long wait_init_idle;
* Scheduler functions (in schedule.c)
*/
#define set_current_state(_s) do { current->state = (_s); } while (0)
-#define MAX_SCHEDULE_TIMEOUT LONG_MAX
void scheduler_init(void);
void schedulers_start(void);
void sched_add_domain(struct task_struct *p);
@@ -273,11 +273,18 @@ long sched_adjdom(int dom, unsigned long mcu_adv, unsigned long warp,
unsigned long warpl, unsigned long warpu);
void init_idle_task(void);
int wake_up(struct task_struct *p);
-long schedule_timeout(long timeout);
long do_yield(void);
void reschedule(struct task_struct *p);
asmlinkage void schedule(void);
+/* A compatibility hack for Linux drivers. */
+#define MAX_SCHEDULE_TIMEOUT 0UL
+static inline long schedule_timeout(long timeout)
+{
+ set_current_state(TASK_RUNNING);
+ mdelay(timeout*(1000/HZ));
+ return 0;
+}
#define signal_pending(_p) ((_p)->hyp_events || \
(_p)->shared_info->events)