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>
This commit is contained in:
@@ -349,7 +349,7 @@ static void init_evtchn_cpu_bindings(void)
|
||||
|
||||
for_each_possible_cpu(i)
|
||||
memset(per_cpu(cpu_evtchn_mask, i),
|
||||
(i == 0) ? ~0 : 0, sizeof(*per_cpu(cpu_evtchn_mask, i)));
|
||||
(i == 0) ? ~0 : 0, NR_EVENT_CHANNELS/8);
|
||||
}
|
||||
|
||||
static inline void clear_evtchn(int port)
|
||||
@@ -1511,8 +1511,10 @@ void rebind_evtchn_irq(int evtchn, int irq)
|
||||
/* Rebind an evtchn so that it gets delivered to a specific cpu */
|
||||
static int rebind_irq_to_cpu(unsigned irq, unsigned tcpu)
|
||||
{
|
||||
struct shared_info *s = HYPERVISOR_shared_info;
|
||||
struct evtchn_bind_vcpu bind_vcpu;
|
||||
int evtchn = evtchn_from_irq(irq);
|
||||
int masked;
|
||||
|
||||
if (!VALID_EVTCHN(evtchn))
|
||||
return -1;
|
||||
@@ -1528,6 +1530,12 @@ static int rebind_irq_to_cpu(unsigned irq, unsigned tcpu)
|
||||
bind_vcpu.port = evtchn;
|
||||
bind_vcpu.vcpu = tcpu;
|
||||
|
||||
/*
|
||||
* Mask the event while changing the VCPU binding to prevent
|
||||
* it being delivered on an unexpected VCPU.
|
||||
*/
|
||||
masked = sync_test_and_set_bit(evtchn, BM(s->evtchn_mask));
|
||||
|
||||
/*
|
||||
* If this fails, it usually just indicates that we're dealing with a
|
||||
* virq or IPI channel, which don't actually need to be rebound. Ignore
|
||||
@@ -1536,6 +1544,9 @@ static int rebind_irq_to_cpu(unsigned irq, unsigned tcpu)
|
||||
if (HYPERVISOR_event_channel_op(EVTCHNOP_bind_vcpu, &bind_vcpu) >= 0)
|
||||
bind_evtchn_to_cpu(evtchn, tcpu);
|
||||
|
||||
if (!masked)
|
||||
unmask_evtchn(evtchn);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user