diff options
author | Stefano Stabellini <stefano.stabellini@eu.citrix.com> | 2015-10-22 16:22:46 +0000 |
---|---|---|
committer | David Vrabel <david.vrabel@citrix.com> | 2015-10-23 14:20:48 +0100 |
commit | cb9644bf3b549d20656cca02e8a6332c67cf37d6 (patch) | |
tree | 137fb243e673c8fd71b117a96d6cec43c153abb0 | |
parent | 1c7a62137bb23bc8a2c05d1dad6105afa569b20e (diff) | |
download | linux-cb9644bf3b549d20656cca02e8a6332c67cf37d6.tar.gz linux-cb9644bf3b549d20656cca02e8a6332c67cf37d6.tar.xz |
xen/arm: don't try to re-register vcpu_info on cpu_hotplug.
Call disable_percpu_irq on CPU_DYING and enable_percpu_irq when the cpu
is coming up.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Reviewed-by: Julien Grall <julien.grall@citrix.com>
-rw-r--r-- | arch/arm/xen/enlighten.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/arm/xen/enlighten.c b/arch/arm/xen/enlighten.c index dad4ffb0934c..fc7ea529f462 100644 --- a/arch/arm/xen/enlighten.c +++ b/arch/arm/xen/enlighten.c @@ -86,6 +86,14 @@ static void xen_percpu_init(void) int err; int cpu = get_cpu(); + /* + * VCPUOP_register_vcpu_info cannot be called twice for the same + * vcpu, so if vcpu_info is already registered, just get out. This + * can happen with cpu-hotplug. + */ + if (per_cpu(xen_vcpu, cpu) != NULL) + goto after_register_vcpu_info; + pr_info("Xen: initializing cpu%d\n", cpu); vcpup = per_cpu_ptr(xen_vcpu_info, cpu); @@ -96,6 +104,7 @@ static void xen_percpu_init(void) BUG_ON(err); per_cpu(xen_vcpu, cpu) = vcpup; +after_register_vcpu_info: enable_percpu_irq(xen_events_irq, 0); put_cpu(); } @@ -124,6 +133,9 @@ static int xen_cpu_notification(struct notifier_block *self, case CPU_STARTING: xen_percpu_init(); break; + case CPU_DYING: + disable_percpu_irq(xen_events_irq); + break; default: break; } |