public inbox for linux-pci@vger.kernel.org
 help / color / mirror / Atom feed
From: Niklas Cassel <cassel@kernel.org>
To: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Cc: "Krzysztof Wilczyński" <kw@linux.com>,
	"Kishon Vijay Abraham I" <kishon@kernel.org>,
	"Damien Le Moal" <dlemoal@kernel.org>,
	linux-pci@vger.kernel.org, "Frank Li" <Frank.Li@nxp.com>
Subject: Re: [PATCH v2 1/2] PCI: endpoint: pci-epf-test: Add support for capabilities
Date: Tue, 3 Dec 2024 05:43:10 +0100	[thread overview]
Message-ID: <Z06MXj2K4dcWMZff@x1-carbon> (raw)
In-Reply-To: <20241130081245.2gjrw26d5cbbsde5@thinkpad>

Hello Mani,

On Sat, Nov 30, 2024 at 01:42:45PM +0530, Manivannan Sadhasivam wrote:
> >  
> >  struct pci_epf_test {
> > @@ -74,6 +76,7 @@ struct pci_epf_test_reg {
> >  	u32	irq_type;
> >  	u32	irq_number;
> >  	u32	flags;
> > +	u32	caps;
> 
> Can we rename the 'magic' register? It is not used since the beginning and I
> don't know if we will ever have a usecase for it.

It is actually used!

When doing PCITEST_BAR (pci_endpoint_test_bar()),
and barno == test->test_reg_bar, we are only filling the first 4 bytes,
rather than filling the whole BAR:
https://github.com/torvalds/linux/blob/v6.13-rc1/drivers/misc/pci_endpoint_test.c#L293-L294

These first 4 bytes are stored in the magic register.

I do agree that the magic register name is slightly misleading, but that
seems completely unrelated to this patch.

If you can come up with a better name, send a patch and you shall have
my Reviewed-by tag :)


Kind regards,
Niklas

  reply	other threads:[~2024-12-03  4:43 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-21 15:23 [PATCH v2 0/2] PCI endpoint test: Add support for capabilities Niklas Cassel
2024-11-21 15:23 ` [PATCH v2 1/2] PCI: endpoint: pci-epf-test: " Niklas Cassel
2024-11-21 19:38   ` Frank Li
2024-11-30  8:12   ` Manivannan Sadhasivam
2024-12-03  4:43     ` Niklas Cassel [this message]
2024-12-08 12:42       ` Manivannan Sadhasivam
2024-12-12  8:49         ` Niklas Cassel
2024-11-21 15:23 ` [PATCH v2 2/2] misc: pci_endpoint_test: " Niklas Cassel
2024-11-21 19:43   ` Frank Li
2024-11-25 15:17     ` Niklas Cassel
2024-11-30  8:21   ` Manivannan Sadhasivam
2024-12-03  4:48     ` Niklas Cassel
2024-11-26 13:20 ` [PATCH v2 0/2] PCI endpoint test: " Manivannan Sadhasivam
2024-11-27 11:23   ` Niklas Cassel
2024-11-27 11:32     ` Niklas Cassel
2024-11-27 11:55       ` Niklas Cassel
2024-11-27 11:40     ` Damien Le Moal
2024-11-30  8:05     ` Manivannan Sadhasivam

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=Z06MXj2K4dcWMZff@x1-carbon \
    --to=cassel@kernel.org \
    --cc=Frank.Li@nxp.com \
    --cc=dlemoal@kernel.org \
    --cc=kishon@kernel.org \
    --cc=kw@linux.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=manivannan.sadhasivam@linaro.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