Re: [PATCH 2/2] cxl/mbox: Wire up irq support
From: Jonathan Cameron
Date: Tue Oct 18 2022 - 05:38:23 EST
On Mon, 17 Oct 2022 20:00:10 -0700
Davidlohr Bueso <dave@xxxxxxxxxxxx> wrote:
> With enough vectors properly allocated, this adds support for
> (the primary) mailbox interrupt, which is needed for background
> completion handling, beyond polling.
>
> Signed-off-by: Davidlohr Bueso <dave@xxxxxxxxxxxx>
Whilst I get the need for an example, I'd rather this didn't
go in until we have that background handler in place.
Unused infrastructure tends to rot or not be quite what is
needed.
Follow up comment below.
Jonathan
> static void cxl_pci_free_irq_vectors(void *data)
> @@ -562,6 +588,7 @@ static int cxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
> return rc;
>
> if (!cxl_pci_alloc_irq_vectors(cxlds)) {
> + cxl_pci_mbox_irqsetup(cxlds);
Ah. That rather wrecks my previous suggestion :)
> cxlds->has_irq = true;
> } else
> cxlds->has_irq = false;