diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2009-07-28 16:28:21 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2009-07-28 16:28:21 +0100 |
commit | 7ee1d0108a85da052767484255d631352b184fca (patch) | |
tree | 18ea83ec4eafb6a09933c5aca970789c27750ed0 /xen/common/softirq.c | |
parent | c88235741e1d230a9dab1be55ee87547b9980f65 (diff) | |
download | xen-7ee1d0108a85da052767484255d631352b184fca.tar.gz xen-7ee1d0108a85da052767484255d631352b184fca.tar.bz2 xen-7ee1d0108a85da052767484255d631352b184fca.zip |
passthrough: use tasklet to deliver interrupts
This patch enables delivery of interrupts even if the VCPU#0 is
halted.
Note: the changes to softirq.{ch} are needed for ia64 build.
Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
Diffstat (limited to 'xen/common/softirq.c')
-rw-r--r-- | xen/common/softirq.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/xen/common/softirq.c b/xen/common/softirq.c index a4ae6a0c62..ecf3379388 100644 --- a/xen/common/softirq.c +++ b/xen/common/softirq.c @@ -53,6 +53,28 @@ void open_softirq(int nr, softirq_handler handler) softirq_handlers[nr] = handler; } +void cpumask_raise_softirq(cpumask_t mask, unsigned int nr) +{ + int cpu; + + for_each_cpu_mask(cpu, mask) + if ( test_and_set_bit(nr, &softirq_pending(cpu)) ) + cpu_clear(cpu, mask); + + smp_send_event_check_mask(&mask); +} + +void cpu_raise_softirq(unsigned int cpu, unsigned int nr) +{ + if ( !test_and_set_bit(nr, &softirq_pending(cpu)) ) + smp_send_event_check_cpu(cpu); +} + +void raise_softirq(unsigned int nr) +{ + set_bit(nr, &softirq_pending(smp_processor_id())); +} + static LIST_HEAD(tasklet_list); static DEFINE_SPINLOCK(tasklet_lock); |