Re: [PATCH v9 26/27] virt: gunyah: Add irqfd interface

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Elliot Berman <quic_eberman@xxxxxxxxxxx> [2023-01-20 14:46:25]:

> +static int gunyah_irqfd_populate(struct gunyah_vm_resource_ticket *ticket,
> +				struct gunyah_resource *ghrsc)
> +{
> +	struct gunyah_irqfd *irqfd = container_of(ticket, struct gunyah_irqfd, ticket);
> +	u64 enable_mask = GH_DBL_NONBLOCK;
> +	u64 ack_mask = ~0;
> +	int ret = 0;
> +
> +	irqfd->ghrsc = ghrsc;
> +	if (irqfd->level) {
> +		ret = gh_hypercall_dbl_set_mask(irqfd->ghrsc->capid, enable_mask, ack_mask);

We probably want this mask set for both level and edge interrupts.

> +		if (ret)
> +			pr_warn("irq %d couldn't be set as level triggered. Might cause IRQ storm if asserted\n",
> +				irqfd->f->fn.irqfd.label);
> +	}
> +	kref_get(&irqfd->kref);

Is this kref_get() really needed?

> +
> +	return 0;
> +}
> +



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux