# 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)
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 );
}
-/****************************************************************************
- * 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)
{
#include <xeno/list.h>
#include <xeno/time.h>
#include <xeno/ac_timer.h>
+#include <xeno/delay.h>
#define MAX_DOMAIN_NAME 16
* 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);
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)