Lines Matching refs:cpu

388 static void hv_init_clockevent_device(struct clock_event_device *dev, int cpu)  in hv_init_clockevent_device()  argument
392 dev->cpumask = cpumask_of(cpu); in hv_init_clockevent_device()
410 int cpu; in hv_synic_alloc() local
419 for_each_online_cpu(cpu) { in hv_synic_alloc()
420 hv_context.event_dpc[cpu] = kmalloc(size, GFP_ATOMIC); in hv_synic_alloc()
421 if (hv_context.event_dpc[cpu] == NULL) { in hv_synic_alloc()
425 tasklet_init(hv_context.event_dpc[cpu], vmbus_on_event, cpu); in hv_synic_alloc()
427 hv_context.clk_evt[cpu] = kzalloc(ced_size, GFP_ATOMIC); in hv_synic_alloc()
428 if (hv_context.clk_evt[cpu] == NULL) { in hv_synic_alloc()
433 hv_init_clockevent_device(hv_context.clk_evt[cpu], cpu); in hv_synic_alloc()
435 hv_context.synic_message_page[cpu] = in hv_synic_alloc()
438 if (hv_context.synic_message_page[cpu] == NULL) { in hv_synic_alloc()
443 hv_context.synic_event_page[cpu] = in hv_synic_alloc()
446 if (hv_context.synic_event_page[cpu] == NULL) { in hv_synic_alloc()
451 hv_context.post_msg_page[cpu] = in hv_synic_alloc()
454 if (hv_context.post_msg_page[cpu] == NULL) { in hv_synic_alloc()
465 static void hv_synic_free_cpu(int cpu) in hv_synic_free_cpu() argument
467 kfree(hv_context.event_dpc[cpu]); in hv_synic_free_cpu()
468 kfree(hv_context.clk_evt[cpu]); in hv_synic_free_cpu()
469 if (hv_context.synic_event_page[cpu]) in hv_synic_free_cpu()
470 free_page((unsigned long)hv_context.synic_event_page[cpu]); in hv_synic_free_cpu()
471 if (hv_context.synic_message_page[cpu]) in hv_synic_free_cpu()
472 free_page((unsigned long)hv_context.synic_message_page[cpu]); in hv_synic_free_cpu()
473 if (hv_context.post_msg_page[cpu]) in hv_synic_free_cpu()
474 free_page((unsigned long)hv_context.post_msg_page[cpu]); in hv_synic_free_cpu()
479 int cpu; in hv_synic_free() local
482 for_each_online_cpu(cpu) in hv_synic_free()
483 hv_synic_free_cpu(cpu); in hv_synic_free()
502 int cpu = smp_processor_id(); in hv_synic_init() local
513 simp.base_simp_gpa = virt_to_phys(hv_context.synic_message_page[cpu]) in hv_synic_init()
521 siefp.base_siefp_gpa = virt_to_phys(hv_context.synic_event_page[cpu]) in hv_synic_init()
550 hv_context.vp_index[cpu] = (u32)vp_index; in hv_synic_init()
552 INIT_LIST_HEAD(&hv_context.percpu_list[cpu]); in hv_synic_init()
558 clockevents_config_and_register(hv_context.clk_evt[cpu], in hv_synic_init()
570 int cpu; in hv_synic_clockevents_cleanup() local
575 for_each_online_cpu(cpu) in hv_synic_clockevents_cleanup()
576 clockevents_unbind_device(hv_context.clk_evt[cpu], cpu); in hv_synic_clockevents_cleanup()
588 int cpu = smp_processor_id(); in hv_synic_cleanup() local
595 hv_ce_shutdown(hv_context.clk_evt[cpu]); in hv_synic_cleanup()