From: Niklas Cassel <cassel@kernel.org>
To: Manivannan Sadhasivam <mani@kernel.org>
Cc: "Bjorn Helgaas" <helgaas@kernel.org>,
"Manivannan Sadhasivam" <manivannan.sadhasivam@linaro.org>,
"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 v3 1/2] PCI: endpoint: pci-epf-test: Add support for capabilities
Date: Mon, 20 Jan 2025 17:07:32 +0100 [thread overview]
Message-ID: <Z450xJve4u0eqVIY@ryzen> (raw)
In-Reply-To: <20250120154415.6abry7rkuchehfjx@thinkpad>
On Mon, Jan 20, 2025 at 09:14:15PM +0530, Manivannan Sadhasivam wrote:
> On Mon, Jan 20, 2025 at 01:00:15PM +0100, Niklas Cassel wrote:
> > Hello Bjorn,
> >
> > On Sat, Jan 18, 2025 at 02:34:21PM -0600, Bjorn Helgaas wrote:
> > > On Tue, Dec 03, 2024 at 07:38:53AM +0100, Niklas Cassel wrote:
> > > > The test BAR is on the EP side is allocated using pci_epf_alloc_space(),
> > > > which allocates the backing memory using dma_alloc_coherent(), which will
> > > > return zeroed memory regardless of __GFP_ZERO was set or not.
> > >
> > > > +static void pci_epf_test_set_capabilities(struct pci_epf *epf)
> > > > +{
> > > > + struct pci_epf_test *epf_test = epf_get_drvdata(epf);
> > > > + enum pci_barno test_reg_bar = epf_test->test_reg_bar;
> > > > + struct pci_epf_test_reg *reg = epf_test->reg[test_reg_bar];
> > > > + struct pci_epc *epc = epf->epc;
> > > > + u32 caps = 0;
> > > > +
> > > > + if (epc->ops->align_addr)
> > > > + caps |= CAP_UNALIGNED_ACCESS;
> > > > +
> > > > + reg->caps = cpu_to_le32(caps);
> > >
> > > "make C=2 drivers/pci/" complains about this:
> > >
> > > drivers/pci/endpoint/functions/pci-epf-test.c:756:19: warning: incorrect type in assignment (different base types)
> > > drivers/pci/endpoint/functions/pci-epf-test.c:756:19: expected unsigned int [usertype] caps
> > > drivers/pci/endpoint/functions/pci-epf-test.c:756:19: got restricted __le32 [usertype]
> >
> > Yes, pci-epf-test is broken when it comes to endianness, as reported here:
> > https://lore.kernel.org/linux-pci/ZxYHoi4mv-4eg0TK@ryzen.lan/
> >
> >
> > Nice to see that sparse is complaining about it! :)
> >
> > Mani said that he was going to work on it, but I guess that it fell through
> > the cracks.
> >
>
> It doesn't but I put it in the back burner due to other high priority issues to
> fix.
I know that feeling :)
Yeah, I know you have been very busy lately :)
Have a nice evening!
Kind regards,
Niklas
next prev parent reply other threads:[~2025-01-20 16:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-03 6:38 [PATCH v3 0/2] PCI endpoint test: Add support for capabilities Niklas Cassel
2024-12-03 6:38 ` [PATCH v3 1/2] PCI: endpoint: pci-epf-test: " Niklas Cassel
2025-01-18 20:34 ` Bjorn Helgaas
2025-01-20 12:00 ` Niklas Cassel
2025-01-20 15:44 ` Manivannan Sadhasivam
2025-01-20 16:07 ` Niklas Cassel [this message]
2024-12-03 6:38 ` [PATCH v3 2/2] misc: pci_endpoint_test: " Niklas Cassel
2024-12-12 8:52 ` [PATCH v3 0/2] PCI endpoint test: " Niklas Cassel
2024-12-19 14:20 ` Niklas Cassel
2024-12-22 20:58 ` 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=Z450xJve4u0eqVIY@ryzen \
--to=cassel@kernel.org \
--cc=Frank.Li@nxp.com \
--cc=dlemoal@kernel.org \
--cc=helgaas@kernel.org \
--cc=kishon@kernel.org \
--cc=kw@linux.com \
--cc=linux-pci@vger.kernel.org \
--cc=mani@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