diff options
author | Jens Axboe <axboe@fb.com> | 2014-04-15 14:02:24 -0600 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2014-04-15 14:02:24 -0600 |
commit | f89e0dd9d1a72fdf6b8958bcadfa6abf84f3cae0 (patch) | |
tree | 6d4ca8c67dc22d1c81053392078588f9ab3804b5 /drivers/xen | |
parent | 21f9fcd81593e201172160853b8647336fb81f4f (diff) | |
parent | c9eaa447e77efe77b7fa4c953bd62de8297fd6c5 (diff) | |
download | linux-f89e0dd9d1a72fdf6b8958bcadfa6abf84f3cae0.tar.gz linux-f89e0dd9d1a72fdf6b8958bcadfa6abf84f3cae0.tar.bz2 linux-f89e0dd9d1a72fdf6b8958bcadfa6abf84f3cae0.zip |
Merge tag 'v3.15-rc1' into for-3.16/core
We don't like this, but things have diverged with the blk-mq fixes
in 3.15-rc1. So merge it in.
Diffstat (limited to 'drivers/xen')
-rw-r--r-- | drivers/xen/balloon.c | 36 | ||||
-rw-r--r-- | drivers/xen/events/events_base.c | 2 |
2 files changed, 25 insertions, 13 deletions
diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c index 61a6ac8fa8fc..b7a506f2bb14 100644 --- a/drivers/xen/balloon.c +++ b/drivers/xen/balloon.c @@ -604,19 +604,29 @@ static void __init balloon_add_region(unsigned long start_pfn, } } +static int alloc_balloon_scratch_page(int cpu) +{ + if (per_cpu(balloon_scratch_page, cpu) != NULL) + return 0; + + per_cpu(balloon_scratch_page, cpu) = alloc_page(GFP_KERNEL); + if (per_cpu(balloon_scratch_page, cpu) == NULL) { + pr_warn("Failed to allocate balloon_scratch_page for cpu %d\n", cpu); + return -ENOMEM; + } + + return 0; +} + + static int balloon_cpu_notify(struct notifier_block *self, unsigned long action, void *hcpu) { int cpu = (long)hcpu; switch (action) { case CPU_UP_PREPARE: - if (per_cpu(balloon_scratch_page, cpu) != NULL) - break; - per_cpu(balloon_scratch_page, cpu) = alloc_page(GFP_KERNEL); - if (per_cpu(balloon_scratch_page, cpu) == NULL) { - pr_warn("Failed to allocate balloon_scratch_page for cpu %d\n", cpu); + if (alloc_balloon_scratch_page(cpu)) return NOTIFY_BAD; - } break; default: break; @@ -636,15 +646,17 @@ static int __init balloon_init(void) return -ENODEV; if (!xen_feature(XENFEAT_auto_translated_physmap)) { - for_each_online_cpu(cpu) - { - per_cpu(balloon_scratch_page, cpu) = alloc_page(GFP_KERNEL); - if (per_cpu(balloon_scratch_page, cpu) == NULL) { - pr_warn("Failed to allocate balloon_scratch_page for cpu %d\n", cpu); + register_cpu_notifier(&balloon_cpu_notifier); + + get_online_cpus(); + for_each_online_cpu(cpu) { + if (alloc_balloon_scratch_page(cpu)) { + put_online_cpus(); + unregister_cpu_notifier(&balloon_cpu_notifier); return -ENOMEM; } } - register_cpu_notifier(&balloon_cpu_notifier); + put_online_cpus(); } pr_info("Initialising balloon driver\n"); diff --git a/drivers/xen/events/events_base.c b/drivers/xen/events/events_base.c index d5a3de88ac59..dfa12a4a0a48 100644 --- a/drivers/xen/events/events_base.c +++ b/drivers/xen/events/events_base.c @@ -1248,8 +1248,8 @@ void xen_evtchn_do_upcall(struct pt_regs *regs) irq_enter(); #ifdef CONFIG_X86 exit_idle(); -#endif inc_irq_stat(irq_hv_callback_count); +#endif __xen_evtchn_do_upcall(); |