mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
Bug-fixes:
- On ARM did not have balanced calls to get/put_cpu. - Fix to make tboot + Xen + Linux correctly. - Fix events VCPU binding issues. - Fix a vCPU online race where IPIs are sent to not-yet-online vCPU. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (GNU/Linux) iQEcBAABAgAGBQJSFMaJAAoJEFjIrFwIi8fJ+/0H/32rLj60FpKXcPDCvID+9p8T XDGnFNttsxyhuzEzetOAd0aLKYKGnUaTDZBHfgSNipGCxjMLYgz84phRmHAYEj8u kai1Ag1WjhZilCmImzFvdHFiUwtvKwkeBIL/cZtKr1BetpnuuFsoVnwbH9FVjMpr TCg6sUwFq7xRyD1azo/cTLZFeiUqq0aQLw8J72YaapdS3SztHPeDHXlPpmLUdb6+ hiSYveJMYp2V0SW8g8eLKDJxVr2QdPEfl9WpBzpLlLK8GrNw8BEU6hSOSLzxB7z/ hDATAuZ5iHiIEi1uGfVjOyDws2ngUhmBKUH5x5iVIZd2P5c/ffLh2ePDVWGO5RI= =yMuS -----END PGP SIGNATURE----- Merge tag 'stable/for-linus-3.11-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull Xen bug-fixes from Konrad Rzeszutek Wilk: - On ARM did not have balanced calls to get/put_cpu. - Fix to make tboot + Xen + Linux correctly. - Fix events VCPU binding issues. - Fix a vCPU online race where IPIs are sent to not-yet-online vCPU. * tag 'stable/for-linus-3.11-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen/smp: initialize IPI vectors before marking CPU online xen/events: mask events when changing their VCPU binding xen/events: initialize local per-cpu mask for all possible events x86/xen: do not identity map UNUSABLE regions in the machine E820 xen/arm: missing put_cpu in xen_percpu_init
This commit is contained in:
commit
d936d2d452
4 changed files with 44 additions and 3 deletions
|
|
@ -348,7 +348,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)
|
||||
|
|
@ -1493,8 +1493,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;
|
||||
|
|
@ -1510,6 +1512,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
|
||||
|
|
@ -1518,6 +1526,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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue