Lines Matching refs:imsic

59 struct imsic_priv *imsic;  variable
63 return imsic ? &imsic->global : NULL; in imsic_get_global_config()
135 for_each_set_bit(i, lpriv->dirty_bitmap, imsic->global.nr_ids + 1) { in __imsic_local_sync()
155 mlocal = per_cpu_ptr(imsic->global.local, mvec->cpu); in __imsic_local_sync()
169 struct imsic_local_priv *lpriv = this_cpu_ptr(imsic->lpriv); in imsic_local_sync_all()
173 bitmap_fill(lpriv->dirty_bitmap, imsic->global.nr_ids + 1); in imsic_local_sync_all()
193 struct imsic_local_priv *lpriv = this_cpu_ptr(imsic->lpriv); in imsic_local_timer_callback()
241 lpriv = per_cpu_ptr(imsic->lpriv, vec->cpu); in imsic_vector_mask()
263 lpriv = per_cpu_ptr(imsic->lpriv, vec->cpu); in imsic_vector_unmask()
311 old_lpriv = per_cpu_ptr(imsic->lpriv, old_vec->cpu); in imsic_vector_move()
315 new_lpriv = per_cpu_ptr(imsic->lpriv, new_vec->cpu); in imsic_vector_move()
336 lpriv = per_cpu_ptr(imsic->lpriv, vec->cpu); in imsic_vector_debug_show()
357 irq_matrix_debug_show(m, imsic->matrix, ind); in imsic_vector_debug_show_summary()
363 struct imsic_local_priv *lpriv = per_cpu_ptr(imsic->lpriv, cpu); in imsic_vector_from_local_id()
365 if (!lpriv || imsic->global.nr_ids < local_id) in imsic_vector_from_local_id()
379 raw_spin_lock_irqsave(&imsic->matrix_lock, flags); in imsic_vector_alloc()
380 local_id = irq_matrix_alloc(imsic->matrix, mask, false, &cpu); in imsic_vector_alloc()
381 raw_spin_unlock_irqrestore(&imsic->matrix_lock, flags); in imsic_vector_alloc()
385 lpriv = per_cpu_ptr(imsic->lpriv, cpu); in imsic_vector_alloc()
398 raw_spin_lock_irqsave(&imsic->matrix_lock, flags); in imsic_vector_free()
400 irq_matrix_free(imsic->matrix, vec->cpu, vec->local_id, false); in imsic_vector_free()
401 raw_spin_unlock_irqrestore(&imsic->matrix_lock, flags); in imsic_vector_free()
410 lpriv = per_cpu_ptr(imsic->lpriv, cpu); in imsic_local_cleanup()
416 free_percpu(imsic->lpriv); in imsic_local_cleanup()
421 struct imsic_global_config *global = &imsic->global; in imsic_local_init()
427 imsic->lpriv = alloc_percpu(typeof(*imsic->lpriv)); in imsic_local_init()
428 if (!imsic->lpriv) in imsic_local_init()
433 lpriv = per_cpu_ptr(imsic->lpriv, cpu); in imsic_local_init()
473 raw_spin_lock_irqsave(&imsic->matrix_lock, flags); in imsic_state_online()
474 irq_matrix_online(imsic->matrix); in imsic_state_online()
475 raw_spin_unlock_irqrestore(&imsic->matrix_lock, flags); in imsic_state_online()
482 raw_spin_lock_irqsave(&imsic->matrix_lock, flags); in imsic_state_offline()
483 irq_matrix_offline(imsic->matrix); in imsic_state_offline()
484 raw_spin_unlock_irqrestore(&imsic->matrix_lock, flags); in imsic_state_offline()
487 struct imsic_local_priv *lpriv = this_cpu_ptr(imsic->lpriv); in imsic_state_offline()
497 struct imsic_global_config *global = &imsic->global; in imsic_matrix_init()
499 raw_spin_lock_init(&imsic->matrix_lock); in imsic_matrix_init()
500 imsic->matrix = irq_alloc_matrix(global->nr_ids + 1, in imsic_matrix_init()
502 if (!imsic->matrix) in imsic_matrix_init()
506 irq_matrix_assign_system(imsic->matrix, 0, false); in imsic_matrix_init()
509 irq_matrix_assign_system(imsic->matrix, IMSIC_IPI_ID, false); in imsic_matrix_init()
572 struct acpi_madt_imsic *imsic = (struct acpi_madt_imsic *)opaque; in imsic_populate_global_acpi() local
574 global->guest_index_bits = imsic->guest_index_bits; in imsic_populate_global_acpi()
575 global->hart_index_bits = imsic->hart_index_bits; in imsic_populate_global_acpi()
576 global->group_index_bits = imsic->group_index_bits; in imsic_populate_global_acpi()
577 global->group_index_shift = imsic->group_index_shift; in imsic_populate_global_acpi()
578 global->nr_ids = imsic->num_ids; in imsic_populate_global_acpi()
579 global->nr_guest_ids = imsic->num_guest_ids; in imsic_populate_global_acpi()
735 if (imsic) { in imsic_setup_state()
745 imsic = kzalloc(sizeof(*imsic), GFP_KERNEL); in imsic_setup_state()
746 if (!imsic) in imsic_setup_state()
748 imsic->fwnode = fwnode; in imsic_setup_state()
749 global = &imsic->global; in imsic_setup_state()
886 free_percpu(imsic->global.local); in imsic_setup_state()
888 kfree(imsic); in imsic_setup_state()
889 imsic = NULL; in imsic_setup_state()