|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-unstable] x86: Ensure irq is disabled before taking
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1250871275 -3600
# Node ID 9189afa1f1e6939fcda5525e225843cfd2325c42
# Parent 6e83b0ec2d70dca1538216d967dc5448a580191c
x86: Ensure irq is disabled before taking vector_lock.
Fixed debug lock issue for taking vector lock.
Signed-off-by: Xiantao Zhang <xiantao.zhang@xxxxxxxxx>
---
xen/arch/x86/io_apic.c | 9 ++++++---
xen/arch/x86/irq.c | 1 +
2 files changed, 7 insertions(+), 3 deletions(-)
diff -r 6e83b0ec2d70 -r 9189afa1f1e6 xen/arch/x86/io_apic.c
--- a/xen/arch/x86/io_apic.c Fri Aug 21 17:13:54 2009 +0100
+++ b/xen/arch/x86/io_apic.c Fri Aug 21 17:14:35 2009 +0100
@@ -379,6 +379,7 @@ unsigned int set_desc_affinity(struct ir
struct irq_cfg *cfg;
unsigned int irq;
int ret;
+ unsigned long flags;
cpumask_t dest_mask;
if (!cpus_intersects(mask, cpu_online_map))
@@ -386,11 +387,13 @@ unsigned int set_desc_affinity(struct ir
irq = desc->irq;
cfg = desc->chip_data;
-
- lock_vector_lock();
+
+ local_irq_save(flags);
+ lock_vector_lock();
ret = __assign_irq_vector(irq, cfg, mask);
unlock_vector_lock();
-
+ local_irq_restore(flags);
+
if (ret < 0)
return BAD_APICID;
diff -r 6e83b0ec2d70 -r 9189afa1f1e6 xen/arch/x86/irq.c
--- a/xen/arch/x86/irq.c Fri Aug 21 17:13:54 2009 +0100
+++ b/xen/arch/x86/irq.c Fri Aug 21 17:14:35 2009 +0100
@@ -55,6 +55,7 @@ DEFINE_PER_CPU(vector_irq_t, vector_irq)
DEFINE_PER_CPU(struct cpu_user_regs *, __irq_regs);
+/* Must be called when irq disabled */
void lock_vector_lock(void)
{
/* Used to the online set of cpus does not change
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] [xen-unstable] x86: Ensure irq is disabled before taking vector_lock.,
Xen patchbot-unstable <=
|
|
|
|
|