fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / arch / i386 / mach-xen / irqflags.c
index c990ca5..9c39512 100644 (file)
@@ -40,7 +40,6 @@ void raw_local_irq_restore(unsigned long flags)
                preempt_enable();
        } else
                preempt_enable_no_resched();
-
 }
 EXPORT_SYMBOL(raw_local_irq_restore);
 
@@ -69,31 +68,36 @@ void raw_local_irq_enable(void)
 }
 EXPORT_SYMBOL(raw_local_irq_enable);
 
-/* Cannot use preempt_enable() here as we would recurse in preempt_sched(). */
-int raw_irqs_disabled(void)
+/*
+ * For spinlocks, etc.:
+ */
+
+unsigned long __raw_local_irq_save(void)
 {
        struct vcpu_info *_vcpu;
-       int disabled;
+       unsigned long flags;
 
        preempt_disable();
        _vcpu = &HYPERVISOR_shared_info->vcpu_info[__vcpu_id];
-       disabled = (_vcpu->evtchn_upcall_mask != 0);
+       flags = _vcpu->evtchn_upcall_mask;
+       _vcpu->evtchn_upcall_mask = 1;
        preempt_enable_no_resched();
-       return disabled;
+
+       return flags;
 }
-EXPORT_SYMBOL(raw_irqs_disabled);
+EXPORT_SYMBOL(__raw_local_irq_save);
 
-unsigned long __raw_local_irq_save(void)
+/* Cannot use preempt_enable() here as we would recurse in preempt_sched(). */
+int raw_irqs_disabled(void)
 {
        struct vcpu_info *_vcpu;
-       unsigned long flags;
+       int disabled;
 
        preempt_disable();
        _vcpu = &HYPERVISOR_shared_info->vcpu_info[__vcpu_id];
-       flags = _vcpu->evtchn_upcall_mask;
-       _vcpu->evtchn_upcall_mask = 1;
+       disabled = (_vcpu->evtchn_upcall_mask != 0);
        preempt_enable_no_resched();
 
-       return flags;
+       return disabled;
 }
-EXPORT_SYMBOL(__raw_local_irq_save);
+EXPORT_SYMBOL(raw_irqs_disabled);