Linux PCI subsystem development
 help / color / mirror / Atom feed
From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
To: Niklas Cassel <cassel@kernel.org>
Cc: bhelgaas@google.com, kw@linux.com, linux-pci@vger.kernel.org,
	Damien Le Moal <dlemoal@kernel.org>,
	Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Subject: Re: [PATCH 7/7] misc: pci_endpoint_test: Add support for PCITEST_IRQ_TYPE_AUTO
Date: Fri, 14 Mar 2025 18:15:48 +0530	[thread overview]
Message-ID: <20250314124548.inffbk3c4kw22rwb@thinkpad> (raw)
In-Reply-To: <20250310111016.859445-16-cassel@kernel.org>

On Mon, Mar 10, 2025 at 12:10:24PM +0100, Niklas Cassel wrote:
> For PCITEST_MSI we really want to set PCITEST_SET_IRQTYPE explicitly
> to PCITEST_IRQ_TYPE_MSI, since we want to test if MSI works.
> 
> For PCITEST_MSIX we really want to set PCITEST_SET_IRQTYPE explicitly
> to PCITEST_IRQ_TYPE_MSIX, since we want to test if MSI works.
> 
> For PCITEST_LEGACY_IRQ we really want to set PCITEST_SET_IRQTYPE explicitly
> to PCITEST_IRQ_TYPE_INTX, since we want to test if INTx works.
> 
> However, for PCITEST_WRITE, PCITEST_READ, PCITEST_COPY, we really don't
> care which IRQ type that is used, we just want to use a IRQ type that is
> supported by the EPC.
> 
> The old behavior was to always use MSI for PCITEST_WRITE, PCITEST_READ,
> PCITEST_COPY, was to always set IRQ type to MSI before doing the actual
> test, however, there are EPC drivers that do not support MSI.
> 
> Add a new PCITEST_IRQ_TYPE_AUTO, that will use the CAPS register to see
> which IRQ types the endpoint supports, and use one of the supported IRQ
> types.
> 

If the intention is to let the test figure out the supported IRQ type, why can't
you move the logic to set the supported IRQ to
pci_endpoint_test_{copy/read/write} functions itself?

PCITEST_IRQ_TYPE_AUTO is not really an IRQ type. So adding it doesn't look right
to me.

- Mani

-- 
மணிவண்ணன் சதாசிவம்

  reply	other threads:[~2025-03-14 12:45 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-10 11:10 [PATCH 0/7] pci_endpoint_test: Add support for PCITEST_IRQ_TYPE_AUTO Niklas Cassel
2025-03-10 11:10 ` [PATCH 1/7] PCI: endpoint: pcitest: Add IRQ_TYPE_* defines to UAPI header Niklas Cassel
2025-03-10 11:10 ` [PATCH 2/7] misc: pci_endpoint_test: Use IRQ_TYPE_* defines from " Niklas Cassel
2025-03-10 11:10 ` [PATCH 3/7] selftests: pci_endpoint: " Niklas Cassel
2025-03-10 11:10 ` [PATCH 4/7] PCI: endpoint: Add intx_capable to epc_features Niklas Cassel
2025-03-21 21:50   ` Bjorn Helgaas
2025-03-21 21:55     ` Niklas Cassel
2025-03-21 22:42       ` Bjorn Helgaas
2025-03-26  6:25         ` Krzysztof Wilczyński
2025-03-10 11:10 ` [PATCH 5/7] PCI: dw-rockchip: EP mode cannot raise INTx interrupts Niklas Cassel
2025-03-10 11:10 ` [PATCH 6/7] PCI: endpoint: pci-epf-test: Expose supported IRQ types in CAPS register Niklas Cassel
2025-03-10 11:10 ` [PATCH 7/7] misc: pci_endpoint_test: Add support for PCITEST_IRQ_TYPE_AUTO Niklas Cassel
2025-03-14 12:45   ` Manivannan Sadhasivam [this message]
2025-03-14 17:25     ` Niklas Cassel
2025-03-18  8:56       ` Manivannan Sadhasivam
2025-03-18  9:45         ` Niklas Cassel
2025-03-18 10:38           ` Niklas Cassel
2025-03-10 13:47 ` [PATCH 0/7] " Krzysztof Wilczyński

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250314124548.inffbk3c4kw22rwb@thinkpad \
    --to=manivannan.sadhasivam@linaro.org \
    --cc=bhelgaas@google.com \
    --cc=cassel@kernel.org \
    --cc=dlemoal@kernel.org \
    --cc=hayashi.kunihiko@socionext.com \
    --cc=kw@linux.com \
    --cc=linux-pci@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox