aboutsummaryrefslogtreecommitdiffstats
path: root/xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/hypervisor.c
diff options
context:
space:
mode:
authorkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>2003-04-16 12:44:16 +0000
committerkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>2003-04-16 12:44:16 +0000
commitdcc63e79155b1df7793b3fecccf1e395298c8ee7 (patch)
treece727b6d106f393a41f58253575ac4799a6aa4bb /xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/hypervisor.c
parent73f339d4f3aa7023b29e3c4d335b796fd20e2b26 (diff)
downloadxen-dcc63e79155b1df7793b3fecccf1e395298c8ee7.tar.gz
xen-dcc63e79155b1df7793b3fecccf1e395298c8ee7.tar.bz2
xen-dcc63e79155b1df7793b3fecccf1e395298c8ee7.zip
bitkeeper revision 1.172 (3e9d5020hc5RUkx3ArM71EjZ_UUbgw)
Many files: Fixed event masking so that events can be individually masked. Fixed Xenolinux config/build system.
Diffstat (limited to 'xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/hypervisor.c')
-rw-r--r--xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/hypervisor.c25
1 files changed, 16 insertions, 9 deletions
diff --git a/xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/hypervisor.c b/xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/hypervisor.c
index 68670daa8c..3f414e9876 100644
--- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/hypervisor.c
+++ b/xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/hypervisor.c
@@ -27,8 +27,8 @@ void do_hypervisor_callback(struct pt_regs *regs)
do {
/* Specialised local_irq_save(). */
- flags = shared->events_enable;
- shared->events_enable = 0;
+ flags = test_and_clear_bit(EVENTS_MASTER_ENABLE_BIT,
+ &shared->events_mask);
barrier();
events = xchg(&shared->events, 0);
@@ -50,7 +50,7 @@ void do_hypervisor_callback(struct pt_regs *regs)
: "eax", "ecx", "edx", "memory" );
/* Specialised local_irq_restore(). */
- shared->events_enable = flags;
+ if ( flags ) set_bit(EVENTS_MASTER_ENABLE_BIT, &shared->events_mask);
barrier();
}
while ( shared->events );
@@ -62,25 +62,25 @@ void do_hypervisor_callback(struct pt_regs *regs)
* Define interface to generic handling in irq.c
*/
-static unsigned int startup_hypervisor_event(unsigned int irq)
-{
- set_bit(irq, &event_mask);
- return 0;
-}
-
static void shutdown_hypervisor_event(unsigned int irq)
{
clear_bit(irq, &event_mask);
+ clear_bit(irq, &HYPERVISOR_shared_info->events_mask);
}
static void enable_hypervisor_event(unsigned int irq)
{
set_bit(irq, &event_mask);
+ set_bit(irq, &HYPERVISOR_shared_info->events_mask);
+ if ( test_bit(EVENTS_MASTER_ENABLE_BIT,
+ &HYPERVISOR_shared_info->events_mask) )
+ do_hypervisor_callback(NULL);
}
static void disable_hypervisor_event(unsigned int irq)
{
clear_bit(irq, &event_mask);
+ clear_bit(irq, &HYPERVISOR_shared_info->events_mask);
}
static void ack_hypervisor_event(unsigned int irq)
@@ -90,6 +90,13 @@ static void ack_hypervisor_event(unsigned int irq)
printk("Unexpected hypervisor event %d\n", irq);
atomic_inc(&irq_err_count);
}
+ set_bit(irq, &HYPERVISOR_shared_info->events_mask);
+}
+
+static unsigned int startup_hypervisor_event(unsigned int irq)
+{
+ enable_hypervisor_event(irq);
+ return 0;
}
static void end_hypervisor_event(unsigned int irq)