Re: [PATCH] genirq/msi: Add the address and data that show MSI/MSIX

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

 



On Fri, Feb 28 2025 at 23:17, Hans Zhang wrote:
> I'm very sorry that I didn't understand what you meant at the
> beginning.

No problem.

>
> +static void msi_domain_debug_show(struct seq_file *m, struct irq_domain *d,
> +                                 struct irq_data *irqd, int ind)
> +{
> +       struct msi_desc *desc;
> +       bool is_msix;
> +
> +       desc = irq_get_msi_desc(irqd->irq);
> +       if (!desc)
> +               return;
> +
> +       is_msix = desc->pci.msi_attrib.is_msix;
> +       seq_printf(m, "%*s%s:", ind, "", is_msix ? "msix" : "msi");
> +       seq_printf(m, "\n%*saddress_hi: 0x%08x", ind + 1, "",
> +                  desc->msg.address_hi);

No need for these line breaks. You have 100 characters available.

> +       seq_printf(m, "\n%*saddress_lo: 0x%08x", ind + 1, "",
> +                  desc->msg.address_lo);
> +       seq_printf(m, "\n%*smsg_data:   0x%08x\n", ind + 1, "",
> +                  desc->msg.data);
> +}
> +
>   static const struct irq_domain_ops msi_domain_ops = {
>          .alloc          = msi_domain_alloc,
>          .free           = msi_domain_free,
>          .activate       = msi_domain_activate,
>          .deactivate     = msi_domain_deactivate,
>          .translate      = msi_domain_translate,
> +       .debug_show     = msi_domain_debug_show,
>   };

Looks about right.

Thanks,

        tglx




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux