Lines Matching refs:cpu

309 static void hv_init_clockevent_device(struct clock_event_device *dev, int cpu)  in hv_init_clockevent_device()  argument
313 dev->cpumask = cpumask_of(cpu); in hv_init_clockevent_device()
330 int cpu; in hv_synic_alloc() local
332 for_each_online_cpu(cpu) { in hv_synic_alloc()
333 hv_context.event_dpc[cpu] = kmalloc(size, GFP_ATOMIC); in hv_synic_alloc()
334 if (hv_context.event_dpc[cpu] == NULL) { in hv_synic_alloc()
338 tasklet_init(hv_context.event_dpc[cpu], vmbus_on_event, cpu); in hv_synic_alloc()
340 hv_context.clk_evt[cpu] = kzalloc(ced_size, GFP_ATOMIC); in hv_synic_alloc()
341 if (hv_context.clk_evt[cpu] == NULL) { in hv_synic_alloc()
345 hv_init_clockevent_device(hv_context.clk_evt[cpu], cpu); in hv_synic_alloc()
347 hv_context.synic_message_page[cpu] = in hv_synic_alloc()
350 if (hv_context.synic_message_page[cpu] == NULL) { in hv_synic_alloc()
355 hv_context.synic_event_page[cpu] = in hv_synic_alloc()
358 if (hv_context.synic_event_page[cpu] == NULL) { in hv_synic_alloc()
363 hv_context.post_msg_page[cpu] = in hv_synic_alloc()
366 if (hv_context.post_msg_page[cpu] == NULL) { in hv_synic_alloc()
377 static void hv_synic_free_cpu(int cpu) in hv_synic_free_cpu() argument
379 kfree(hv_context.event_dpc[cpu]); in hv_synic_free_cpu()
380 kfree(hv_context.clk_evt[cpu]); in hv_synic_free_cpu()
381 if (hv_context.synic_event_page[cpu]) in hv_synic_free_cpu()
382 free_page((unsigned long)hv_context.synic_event_page[cpu]); in hv_synic_free_cpu()
383 if (hv_context.synic_message_page[cpu]) in hv_synic_free_cpu()
384 free_page((unsigned long)hv_context.synic_message_page[cpu]); in hv_synic_free_cpu()
385 if (hv_context.post_msg_page[cpu]) in hv_synic_free_cpu()
386 free_page((unsigned long)hv_context.post_msg_page[cpu]); in hv_synic_free_cpu()
391 int cpu; in hv_synic_free() local
393 for_each_online_cpu(cpu) in hv_synic_free()
394 hv_synic_free_cpu(cpu); in hv_synic_free()
413 int cpu = smp_processor_id(); in hv_synic_init() local
424 simp.base_simp_gpa = virt_to_phys(hv_context.synic_message_page[cpu]) in hv_synic_init()
432 siefp.base_siefp_gpa = virt_to_phys(hv_context.synic_event_page[cpu]) in hv_synic_init()
461 hv_context.vp_index[cpu] = (u32)vp_index; in hv_synic_init()
463 INIT_LIST_HEAD(&hv_context.percpu_list[cpu]); in hv_synic_init()
469 clockevents_config_and_register(hv_context.clk_evt[cpu], in hv_synic_init()
481 int cpu; in hv_synic_clockevents_cleanup() local
486 for_each_online_cpu(cpu) in hv_synic_clockevents_cleanup()
487 clockevents_unbind_device(hv_context.clk_evt[cpu], cpu); in hv_synic_clockevents_cleanup()
499 int cpu = smp_processor_id(); in hv_synic_cleanup() local
507 hv_context.clk_evt[cpu]); in hv_synic_cleanup()
534 hv_synic_free_cpu(cpu); in hv_synic_cleanup()