Home
last modified time | relevance | path

Searched full:intid (Results 1 – 25 of 47) sorted by relevance

12

/linux-6.12.1/tools/testing/selftests/kvm/lib/aarch64/
Dgic.c62 void gic_irq_enable(unsigned int intid) in gic_irq_enable() argument
65 gic_common_ops->gic_irq_enable(intid); in gic_irq_enable()
68 void gic_irq_disable(unsigned int intid) in gic_irq_disable() argument
71 gic_common_ops->gic_irq_disable(intid); in gic_irq_disable()
77 unsigned int intid; in gic_get_and_ack_irq() local
82 intid = irqstat & GENMASK(23, 0); in gic_get_and_ack_irq()
84 return intid; in gic_get_and_ack_irq()
87 void gic_set_eoi(unsigned int intid) in gic_set_eoi() argument
90 gic_common_ops->gic_write_eoir(intid); in gic_set_eoi()
93 void gic_set_dir(unsigned int intid) in gic_set_dir() argument
[all …]
Dgic_v3.c77 static enum gicv3_intid_range get_intid_range(unsigned int intid) in get_intid_range() argument
79 switch (intid) { in get_intid_range()
168 static void gicv3_access_reg(uint32_t intid, uint64_t offset, in gicv3_access_reg() argument
173 enum gicv3_intid_range intid_range = get_intid_range(intid); in gicv3_access_reg()
186 index = intid % fields_per_reg; in gicv3_access_reg()
190 /* Set offset to the actual register holding intid's config. */ in gicv3_access_reg()
191 offset += (intid / fields_per_reg) * (reg_bits / 8); in gicv3_access_reg()
200 static void gicv3_write_reg(uint32_t intid, uint64_t offset, in gicv3_write_reg() argument
203 gicv3_access_reg(intid, offset, reg_bits, in gicv3_write_reg()
207 static uint32_t gicv3_read_reg(uint32_t intid, uint64_t offset, in gicv3_read_reg() argument
[all …]
Dvgic.c83 int _kvm_irq_set_level_info(int gic_fd, uint32_t intid, int level) in _kvm_irq_set_level_info() argument
85 uint64_t attr = 32 * (intid / 32); in _kvm_irq_set_level_info()
86 uint64_t index = intid % 32; in _kvm_irq_set_level_info()
101 void kvm_irq_set_level_info(int gic_fd, uint32_t intid, int level) in kvm_irq_set_level_info() argument
103 int ret = _kvm_irq_set_level_info(gic_fd, intid, level); in kvm_irq_set_level_info()
108 int _kvm_arm_irq_line(struct kvm_vm *vm, uint32_t intid, int level) in _kvm_arm_irq_line() argument
110 uint32_t irq = intid & KVM_ARM_IRQ_NUM_MASK; in _kvm_arm_irq_line()
112 TEST_ASSERT(!INTID_IS_SGI(intid), "KVM_IRQ_LINE's interface itself " in _kvm_arm_irq_line()
115 if (INTID_IS_PPI(intid)) in _kvm_arm_irq_line()
123 void kvm_arm_irq_line(struct kvm_vm *vm, uint32_t intid, int level) in kvm_arm_irq_line() argument
[all …]
Dgic_private.h13 void (*gic_irq_enable)(unsigned int intid);
14 void (*gic_irq_disable)(unsigned int intid);
20 void (*gic_set_priority)(uint32_t intid, uint32_t prio);
21 void (*gic_irq_set_active)(uint32_t intid);
22 void (*gic_irq_clear_active)(uint32_t intid);
23 bool (*gic_irq_get_active)(uint32_t intid);
24 void (*gic_irq_set_pending)(uint32_t intid);
25 void (*gic_irq_clear_pending)(uint32_t intid);
26 bool (*gic_irq_get_pending)(uint32_t intid);
27 void (*gic_irq_set_config)(uint32_t intid, bool is_edge);
/linux-6.12.1/tools/testing/selftests/kvm/aarch64/
Dvgic_irq.c7 * host to inject a specific intid via a GUEST_SYNC call, and then checks that
80 #define _KVM_INJECT_MULTI(cmd, intid, num, expect_failure) \ argument
81 kvm_inject_call(cmd, intid, num, -1 /* not used */, expect_failure)
83 #define KVM_INJECT_MULTI(cmd, intid, num) \ argument
84 _KVM_INJECT_MULTI(cmd, intid, num, false)
86 #define _KVM_INJECT(cmd, intid, expect_failure) \ argument
87 _KVM_INJECT_MULTI(cmd, intid, 1, expect_failure)
89 #define KVM_INJECT(cmd, intid) \ argument
90 _KVM_INJECT_MULTI(cmd, intid, 1, false)
92 #define KVM_ACTIVATE(cmd, intid) \ argument
[all …]
Darch_timer.c55 static void guest_validate_irq(unsigned int intid, in guest_validate_irq() argument
64 if (intid == IAR_SPURIOUS) in guest_validate_irq()
94 GUEST_ASSERT_EQ(intid, timer_irq); in guest_validate_irq()
107 unsigned int intid = gic_get_and_ack_irq(); in guest_irq_handler() local
111 guest_validate_irq(intid, shared_data); in guest_irq_handler()
113 gic_set_eoi(intid); in guest_irq_handler()
Dvgic_lpi_stress.c54 u32 intid = gic_get_and_ack_irq(); in guest_irq_handler() local
56 if (intid == IAR_SPURIOUS) in guest_irq_handler()
59 GUEST_ASSERT(intid >= GIC_LPI_OFFSET); in guest_irq_handler()
60 gic_set_eoi(intid); in guest_irq_handler()
65 u32 coll_id, device_id, event_id, intid = GIC_LPI_OFFSET; in guest_setup_its_mappings() local
83 event_id, coll_id, intid++); in guest_setup_its_mappings()
/linux-6.12.1/tools/testing/selftests/kvm/include/aarch64/
Dgic.h35 #define INTID_IS_SGI(intid) (0 <= (intid) && (intid) < MIN_PPI) argument
36 #define INTID_IS_PPI(intid) (MIN_PPI <= (intid) && (intid) < MIN_SPI) argument
37 #define INTID_IS_SPI(intid) (MIN_SPI <= (intid) && (intid) <= MAX_SPI) argument
40 void gic_irq_enable(unsigned int intid);
41 void gic_irq_disable(unsigned int intid);
43 void gic_set_eoi(unsigned int intid);
44 void gic_set_dir(unsigned int intid);
52 void gic_set_priority(uint32_t intid, uint32_t prio);
53 void gic_irq_set_active(unsigned int intid);
54 void gic_irq_clear_active(unsigned int intid);
[all …]
Dvgic.h23 void kvm_irq_set_level_info(int gic_fd, uint32_t intid, int level);
24 int _kvm_irq_set_level_info(int gic_fd, uint32_t intid, int level);
26 void kvm_arm_irq_line(struct kvm_vm *vm, uint32_t intid, int level);
27 int _kvm_arm_irq_line(struct kvm_vm *vm, uint32_t intid, int level);
30 void kvm_irq_write_ispendr(int gic_fd, uint32_t intid, struct kvm_vcpu *vcpu);
31 void kvm_irq_write_isactiver(int gic_fd, uint32_t intid, struct kvm_vcpu *vcpu);
Dgic_v3_its.h16 u32 collection_id, u32 intid);
/linux-6.12.1/arch/arm64/kvm/vgic/
Dvgic-mmio.c47 u32 intid = VGIC_ADDR_TO_INTID(addr, 1); in vgic_mmio_read_group() local
53 struct vgic_irq *irq = vgic_get_irq(vcpu->kvm, vcpu, intid + i); in vgic_mmio_read_group()
72 u32 intid = VGIC_ADDR_TO_INTID(addr, 1); in vgic_mmio_write_group() local
77 struct vgic_irq *irq = vgic_get_irq(vcpu->kvm, vcpu, intid + i); in vgic_mmio_write_group()
81 if (irq->hw && vgic_irq_is_sgi(irq->intid)) { in vgic_mmio_write_group()
99 u32 intid = VGIC_ADDR_TO_INTID(addr, 1); in vgic_mmio_read_enable() local
105 struct vgic_irq *irq = vgic_get_irq(vcpu->kvm, vcpu, intid + i); in vgic_mmio_read_enable()
120 u32 intid = VGIC_ADDR_TO_INTID(addr, 1); in vgic_mmio_write_senable() local
125 struct vgic_irq *irq = vgic_get_irq(vcpu->kvm, vcpu, intid + i); in vgic_mmio_write_senable()
128 if (irq->hw && vgic_irq_is_sgi(irq->intid)) { in vgic_mmio_write_senable()
[all …]
Dvgic-debug.c31 unsigned long intid; member
46 * has exhausted the sequentially-allocated INTID space. in iter_next()
48 if (iter->intid >= (iter->nr_spis + VGIC_NR_PRIVATE_IRQS - 1) && in iter_next()
51 xa_find_after(&dist->lpi_xa, &iter->intid, in iter_next()
58 iter->intid++; in iter_next()
59 if (iter->intid == VGIC_NR_PRIVATE_IRQS && in iter_next()
61 iter->intid = 0; in iter_next()
68 unsigned long intid; in iter_mark_lpis() local
71 xa_for_each(&dist->lpi_xa, intid, irq) { in iter_mark_lpis()
75 xa_set_mark(&dist->lpi_xa, intid, LPI_XA_MARK_DEBUG_ITER); in iter_mark_lpis()
[all …]
Dvgic.c66 static struct vgic_irq *vgic_get_lpi(struct kvm *kvm, u32 intid) in vgic_get_lpi() argument
73 irq = xa_load(&dist->lpi_xa, intid); in vgic_get_lpi()
88 u32 intid) in vgic_get_irq() argument
91 if (intid <= VGIC_MAX_PRIVATE) { in vgic_get_irq()
92 intid = array_index_nospec(intid, VGIC_MAX_PRIVATE + 1); in vgic_get_irq()
93 return &vcpu->arch.vgic_cpu.private_irqs[intid]; in vgic_get_irq()
97 if (intid < (kvm->arch.vgic.nr_spis + VGIC_NR_PRIVATE_IRQS)) { in vgic_get_irq()
98 intid = array_index_nospec(intid, kvm->arch.vgic.nr_spis + VGIC_NR_PRIVATE_IRQS); in vgic_get_irq()
99 return &kvm->arch.vgic.spis[intid - VGIC_NR_PRIVATE_IRQS]; in vgic_get_irq()
103 if (intid >= VGIC_MIN_LPI) in vgic_get_irq()
[all …]
Dvgic-mmio-v2.c125 int intid = val & 0xf; in vgic_mmio_write_sgir() local
151 irq = vgic_get_irq(source_vcpu->kvm, vcpu, intid); in vgic_mmio_write_sgir()
165 u32 intid = VGIC_ADDR_TO_INTID(addr, 8); in vgic_mmio_read_target() local
170 struct vgic_irq *irq = vgic_get_irq(vcpu->kvm, vcpu, intid + i); in vgic_mmio_read_target()
184 u32 intid = VGIC_ADDR_TO_INTID(addr, 8); in vgic_mmio_write_target() local
190 if (intid < VGIC_NR_PRIVATE_IRQS) in vgic_mmio_write_target()
194 struct vgic_irq *irq = vgic_get_irq(vcpu->kvm, NULL, intid + i); in vgic_mmio_write_target()
211 u32 intid = addr & 0x0f; in vgic_mmio_read_sgipend() local
216 struct vgic_irq *irq = vgic_get_irq(vcpu->kvm, vcpu, intid + i); in vgic_mmio_read_sgipend()
229 u32 intid = addr & 0x0f; in vgic_mmio_write_sgipendc() local
[all …]
Dvgic-v3.c48 u32 intid, cpuid; in vgic_v3_fold_lr_state() local
57 intid = val & ICH_LR_VIRTUAL_ID_MASK; in vgic_v3_fold_lr_state()
59 intid = val & GICH_LR_VIRTUALID; in vgic_v3_fold_lr_state()
60 is_v2_sgi = vgic_irq_is_sgi(intid); in vgic_v3_fold_lr_state()
64 if (lr_signals_eoi_mi(val) && vgic_valid_spi(vcpu->kvm, intid)) in vgic_v3_fold_lr_state()
66 intid - VGIC_NR_PRIVATE_IRQS); in vgic_v3_fold_lr_state()
68 irq = vgic_get_irq(vcpu->kvm, vcpu, intid); in vgic_v3_fold_lr_state()
110 u64 val = irq->intid; in vgic_v3_populate_lr()
113 is_v2_sgi = (vgic_irq_is_sgi(irq->intid) && in vgic_v3_populate_lr()
155 if (vgic_irq_is_sgi(irq->intid) && in vgic_v3_populate_lr()
[all …]
Dvgic-v2.c61 u32 cpuid, intid = val & GICH_LR_VIRTUALID; in vgic_v2_fold_lr_state() local
71 if (lr_signals_eoi_mi(val) && vgic_valid_spi(vcpu->kvm, intid)) in vgic_v2_fold_lr_state()
73 intid - VGIC_NR_PRIVATE_IRQS); in vgic_v2_fold_lr_state()
75 irq = vgic_get_irq(vcpu->kvm, vcpu, intid); in vgic_v2_fold_lr_state()
83 if (irq->active && vgic_irq_is_sgi(intid)) in vgic_v2_fold_lr_state()
91 if (vgic_irq_is_sgi(intid)) in vgic_v2_fold_lr_state()
124 u32 val = irq->intid; in vgic_v2_populate_lr()
129 if (vgic_irq_is_sgi(irq->intid)) in vgic_v2_populate_lr()
169 if (vgic_irq_is_sgi(irq->intid)) { in vgic_v2_populate_lr()
172 if (WARN_RATELIMIT(!src, "No SGI source for INTID %d\n", in vgic_v2_populate_lr()
[all …]
Dvgic.h22 #define vgic_irq_is_sgi(intid) ((intid) < VGIC_NR_SGIS) argument
125 if (vgic_irq_is_sgi(irq->intid) && irq->source) in vgic_irq_get_lr_count()
183 u32 intid);
227 if (irq->intid < VGIC_MIN_LPI) in vgic_try_get_irq_kref()
271 u32 intid, u32 *val);
Dvgic-v4.c110 vpe->sgi_config[irq->intid].enabled = irq->enabled; in vgic_v4_sync_sgi_config()
111 vpe->sgi_config[irq->intid].group = irq->group; in vgic_v4_sync_sgi_config()
112 vpe->sgi_config[irq->intid].priority = irq->priority; in vgic_v4_sync_sgi_config()
216 int mask = BIT(irq->intid % BITS_PER_BYTE); in vgic_v4_get_vlpi_state()
221 ptr = va + irq->intid / BITS_PER_BYTE; in vgic_v4_get_vlpi_state()
452 .vintid = irq->intid, in kvm_vgic_v4_set_forwarding()
Dvgic-its.c41 static struct vgic_irq *vgic_add_lpi(struct kvm *kvm, u32 intid, in vgic_add_lpi() argument
45 struct vgic_irq *irq = vgic_get_irq(kvm, NULL, intid), *oldirq; in vgic_add_lpi()
57 ret = xa_reserve_irq(&dist->lpi_xa, intid, GFP_KERNEL_ACCOUNT); in vgic_add_lpi()
68 irq->intid = intid; in vgic_add_lpi()
78 oldirq = xa_load(&dist->lpi_xa, intid); in vgic_add_lpi()
87 ret = xa_err(__xa_store(&dist->lpi_xa, intid, irq, 0)); in vgic_add_lpi()
89 xa_release(&dist->lpi_xa, intid); in vgic_add_lpi()
286 ret = kvm_read_guest_lock(kvm, propbase + irq->intid - GIC_LPI_OFFSET, in update_lpi_config()
396 unsigned long intid, flags; in its_sync_lpi_pending_table() local
402 xa_for_each(&dist->lpi_xa, intid, irq) { in its_sync_lpi_pending_table()
[all …]
Dvgic-mmio-v3.c196 int intid = VGIC_ADDR_TO_INTID(addr, 64); in vgic_mmio_read_irouter() local
197 struct vgic_irq *irq = vgic_get_irq(vcpu->kvm, NULL, intid); in vgic_mmio_read_irouter()
215 int intid = VGIC_ADDR_TO_INTID(addr, 64); in vgic_mmio_write_irouter() local
223 irq = vgic_get_irq(vcpu->kvm, NULL, intid); in vgic_mmio_write_irouter()
1129 u32 intid, u32 *val) in vgic_v3_line_level_info_uaccess() argument
1131 if (intid % 32) in vgic_v3_line_level_info_uaccess()
1135 vgic_write_irq_line_level_info(vcpu, intid, *val); in vgic_v3_line_level_info_uaccess()
1137 *val = vgic_read_irq_line_level_info(vcpu, intid); in vgic_v3_line_level_info_uaccess()
Dvgic-mmio.h210 u32 vgic_read_irq_line_level_info(struct kvm_vcpu *vcpu, u32 intid);
212 void vgic_write_irq_line_level_info(struct kvm_vcpu *vcpu, u32 intid,
/linux-6.12.1/include/kvm/
Darm_vgic.h134 u32 intid; /* Guest visible INTID */ member
143 u32 hwintid; /* HW INTID number */
381 unsigned int intid, bool level, void *owner);
423 int kvm_vgic_set_owner(struct kvm_vcpu *vcpu, unsigned int intid, void *owner);
/linux-6.12.1/drivers/net/can/cc770/
Dcc770.c98 static inline int intid2obj(unsigned int intid) in intid2obj() argument
100 if (intid == 2) in intid2obj()
103 return MSGOBJ_LAST + 2 - intid; in intid2obj()
712 u8 intid; in cc770_interrupt() local
724 intid = cc770_read_reg(priv, interrupt); in cc770_interrupt()
725 if (!intid) in cc770_interrupt()
729 if (intid == 1) { in cc770_interrupt()
734 o = intid2obj(intid); in cc770_interrupt()
738 intid); in cc770_interrupt()
/linux-6.12.1/tools/testing/selftests/kvm/riscv/
Darch_timer.c21 unsigned int intid = regs->cause & ~CAUSE_IRQ_FLAG; in guest_irq_handler() local
32 GUEST_ASSERT_EQ(intid, timer_irq); in guest_irq_handler()
/linux-6.12.1/drivers/media/pci/saa7164/
Dsaa7164-core.c610 u32 intid, intstat[INT_SIZE/4]; in saa7164_irq() local
658 intid = (i * 32) + bit; in saa7164_irq()
659 if (intid == dev->intfdesc.bInterruptId) { in saa7164_irq()
662 } else if (intid == porta->hwcfg.interruptid) { in saa7164_irq()
667 } else if (intid == portb->hwcfg.interruptid) { in saa7164_irq()
672 } else if (intid == portc->hwcfg.interruptid) { in saa7164_irq()
677 } else if (intid == portd->hwcfg.interruptid) { in saa7164_irq()
682 } else if (intid == porte->hwcfg.interruptid) { in saa7164_irq()
687 } else if (intid == portf->hwcfg.interruptid) { in saa7164_irq()
695 "%s() unhandled interrupt reg 0x%x bit 0x%x intid = 0x%x\n", in saa7164_irq()
[all …]

12