Lines Matching defs:hgctrl

36 	struct aia_hgei_control *hgctrl = get_cpu_ptr(&aia_hgei);
38 raw_spin_lock_irqsave(&hgctrl->lock, flags);
42 if (hgctrl->owners[i] == owner) {
48 raw_spin_unlock_irqrestore(&hgctrl->lock, flags);
397 struct aia_hgei_control *hgctrl = per_cpu_ptr(&aia_hgei, cpu);
399 if (!kvm_riscv_aia_available() || !hgctrl)
402 raw_spin_lock_irqsave(&hgctrl->lock, flags);
404 if (hgctrl->free_bitmap) {
405 ret = __ffs(hgctrl->free_bitmap);
406 hgctrl->free_bitmap &= ~BIT(ret);
407 hgctrl->owners[ret] = owner;
410 raw_spin_unlock_irqrestore(&hgctrl->lock, flags);
424 struct aia_hgei_control *hgctrl = per_cpu_ptr(&aia_hgei, cpu);
426 if (!kvm_riscv_aia_available() || !hgctrl)
429 raw_spin_lock_irqsave(&hgctrl->lock, flags);
432 if (!(hgctrl->free_bitmap & BIT(hgei))) {
433 hgctrl->free_bitmap |= BIT(hgei);
434 hgctrl->owners[hgei] = NULL;
438 raw_spin_unlock_irqrestore(&hgctrl->lock, flags);
461 struct aia_hgei_control *hgctrl = get_cpu_ptr(&aia_hgei);
466 raw_spin_lock_irqsave(&hgctrl->lock, flags);
469 if (hgctrl->owners[i])
470 kvm_vcpu_kick(hgctrl->owners[i]);
473 raw_spin_unlock_irqrestore(&hgctrl->lock, flags);
483 struct aia_hgei_control *hgctrl;
487 hgctrl = per_cpu_ptr(&aia_hgei, cpu);
488 raw_spin_lock_init(&hgctrl->lock);
490 hgctrl->free_bitmap =
492 hgctrl->free_bitmap &= ~BIT(0);
494 hgctrl->free_bitmap = 0;
555 struct aia_hgei_control *hgctrl;
559 hgctrl = get_cpu_ptr(&aia_hgei);
567 raw_spin_lock_irqsave(&hgctrl->lock, flags);
570 vcpu = hgctrl->owners[i];
575 * We release hgctrl->lock before notifying IMSIC
578 raw_spin_unlock_irqrestore(&hgctrl->lock, flags);
592 raw_spin_lock_irqsave(&hgctrl->lock, flags);
595 raw_spin_unlock_irqrestore(&hgctrl->lock, flags);