aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/xen
diff options
context:
space:
mode:
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2013-09-09 12:05:37 -0400
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2013-09-09 12:05:37 -0400
commit65320fcedaa7affd1736cd7aa51f5e70b5c7e7f2 (patch)
tree2fb1bdf8a1139262dd13fa671055c7517cb3fffb /drivers/xen
parentc3f31f6a6f68bcb51689c90733282ec263602a9d (diff)
parentd8dfad3876e4386666b759da3c833d62fb8b2267 (diff)
Merge tag 'v3.11-rc7' into stable/for-linus-3.12
Linux 3.11-rc7 As we need the git commit 28817e9de4f039a1a8c1fe1df2fa2df524626b9e Author: Chuck Anderson <chuck.anderson@oracle.com> Date: Tue Aug 6 15:12:19 2013 -0700 xen/smp: initialize IPI vectors before marking CPU online * tag 'v3.11-rc7': (443 commits) Linux 3.11-rc7 ARC: [lib] strchr breakage in Big-endian configuration VFS: collect_mounts() should return an ERR_PTR bfs: iget_locked() doesn't return an ERR_PTR efs: iget_locked() doesn't return an ERR_PTR() proc: kill the extra proc_readfd_common()->dir_emit_dots() cope with potentially long ->d_dname() output for shmem/hugetlb usb: phy: fix build breakage USB: OHCI: add missing PCI PM callbacks to ohci-pci.c staging: comedi: bug-fix NULL pointer dereference on failed attach lib/lz4: correct the LZ4 license memcg: get rid of swapaccount leftovers nilfs2: fix issue with counting number of bio requests for BIO_EOPNOTSUPP error detection nilfs2: remove double bio_put() in nilfs_end_bio_write() for BIO_EOPNOTSUPP error drivers/platform/olpc/olpc-ec.c: initialise earlier ipv4: expose IPV4_DEVCONF ipv6: handle Redirect ICMP Message with no Redirected Header option be2net: fix disabling TX in be_close() Revert "ACPI / video: Always call acpi_video_init_brightness() on init" Revert "genetlink: fix family dump race" ... Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'drivers/xen')
-rw-r--r--drivers/xen/events.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/xen/events.c b/drivers/xen/events.c
index 090a3b71338d..4035e833ea26 100644
--- a/drivers/xen/events.c
+++ b/drivers/xen/events.c
@@ -349,7 +349,7 @@ static void init_evtchn_cpu_bindings(void)
349 349
350 for_each_possible_cpu(i) 350 for_each_possible_cpu(i)
351 memset(per_cpu(cpu_evtchn_mask, i), 351 memset(per_cpu(cpu_evtchn_mask, i),
352 (i == 0) ? ~0 : 0, sizeof(*per_cpu(cpu_evtchn_mask, i))); 352 (i == 0) ? ~0 : 0, NR_EVENT_CHANNELS/8);
353} 353}
354 354
355static inline void clear_evtchn(int port) 355static inline void clear_evtchn(int port)
@@ -1511,8 +1511,10 @@ void rebind_evtchn_irq(int evtchn, int irq)
1511/* Rebind an evtchn so that it gets delivered to a specific cpu */ 1511/* Rebind an evtchn so that it gets delivered to a specific cpu */
1512static int rebind_irq_to_cpu(unsigned irq, unsigned tcpu) 1512static int rebind_irq_to_cpu(unsigned irq, unsigned tcpu)
1513{ 1513{
1514 struct shared_info *s = HYPERVISOR_shared_info;
1514 struct evtchn_bind_vcpu bind_vcpu; 1515 struct evtchn_bind_vcpu bind_vcpu;
1515 int evtchn = evtchn_from_irq(irq); 1516 int evtchn = evtchn_from_irq(irq);
1517 int masked;
1516 1518
1517 if (!VALID_EVTCHN(evtchn)) 1519 if (!VALID_EVTCHN(evtchn))
1518 return -1; 1520 return -1;
@@ -1529,6 +1531,12 @@ static int rebind_irq_to_cpu(unsigned irq, unsigned tcpu)
1529 bind_vcpu.vcpu = tcpu; 1531 bind_vcpu.vcpu = tcpu;
1530 1532
1531 /* 1533 /*
1534 * Mask the event while changing the VCPU binding to prevent
1535 * it being delivered on an unexpected VCPU.
1536 */
1537 masked = sync_test_and_set_bit(evtchn, BM(s->evtchn_mask));
1538
1539 /*
1532 * If this fails, it usually just indicates that we're dealing with a 1540 * If this fails, it usually just indicates that we're dealing with a
1533 * virq or IPI channel, which don't actually need to be rebound. Ignore 1541 * virq or IPI channel, which don't actually need to be rebound. Ignore
1534 * it, but don't do the xenlinux-level rebind in that case. 1542 * it, but don't do the xenlinux-level rebind in that case.
@@ -1536,6 +1544,9 @@ static int rebind_irq_to_cpu(unsigned irq, unsigned tcpu)
1536 if (HYPERVISOR_event_channel_op(EVTCHNOP_bind_vcpu, &bind_vcpu) >= 0) 1544 if (HYPERVISOR_event_channel_op(EVTCHNOP_bind_vcpu, &bind_vcpu) >= 0)
1537 bind_evtchn_to_cpu(evtchn, tcpu); 1545 bind_evtchn_to_cpu(evtchn, tcpu);
1538 1546
1547 if (!masked)
1548 unmask_evtchn(evtchn);
1549
1539 return 0; 1550 return 0;
1540} 1551}
1541 1552