From: Bjorn Helgaas <helgaas@kernel.org>
To: "Krzysztof Wilczyński" <kw@linux.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
Daniel Vetter <daniel.vetter@ffwll.ch>,
Dan Williams <dan.j.williams@intel.com>,
Sasha Levin <sashal@kernel.org>,
linux-pci@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] PCI/sysfs: Use correct variable for the legacy_mem sysfs object
Date: Thu, 19 Aug 2021 10:25:32 -0500 [thread overview]
Message-ID: <20210819152532.GA3206853@bjorn-Precision-5520> (raw)
In-Reply-To: <20210812132144.791268-1-kw@linux.com>
On Thu, Aug 12, 2021 at 01:21:44PM +0000, Krzysztof Wilczyński wrote:
> Two legacy PCI sysfs objects "legacy_io" and "legacy_mem" were updated
> to use an unified address space in the commit 636b21b50152 ("PCI: Revoke
> mappings like devmem"). This allows for revocations to be managed from
> a single place when drivers want to take over and mmap() a /dev/mem
> range.
>
> Following the update, both of the sysfs objects should leverage the
> iomem_get_mapping() function to get an appropriate address range, but
> only the "legacy_io" has been correctly updated - the second attribute
> seems to be using a wrong variable to pass the iomem_get_mapping()
> function to.
>
> Thus, correct the variable name used so that the "legacy_mem" sysfs
> object would also correctly call the iomem_get_mapping() function.
>
> Fixes: 636b21b50152 ("PCI: Revoke mappings like devmem")
> Signed-off-by: Krzysztof Wilczyński <kw@linux.com>
Applied to for-linus for v5.14, thanks!
> ---
> drivers/pci/pci-sysfs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c
> index 5d63df7c1820..7bbf2673c7f2 100644
> --- a/drivers/pci/pci-sysfs.c
> +++ b/drivers/pci/pci-sysfs.c
> @@ -978,7 +978,7 @@ void pci_create_legacy_files(struct pci_bus *b)
> b->legacy_mem->size = 1024*1024;
> b->legacy_mem->attr.mode = 0600;
> b->legacy_mem->mmap = pci_mmap_legacy_mem;
> - b->legacy_io->mapping = iomem_get_mapping();
> + b->legacy_mem->mapping = iomem_get_mapping();
> pci_adjust_legacy_attr(b, pci_mmap_mem);
> error = device_create_bin_file(&b->dev, b->legacy_mem);
> if (error)
> --
> 2.32.0
>
prev parent reply other threads:[~2021-08-19 15:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-12 13:21 [PATCH] PCI/sysfs: Use correct variable for the legacy_mem sysfs object Krzysztof Wilczyński
2021-08-12 16:17 ` Bjorn Helgaas
2021-08-12 17:14 ` Bjorn Helgaas
2021-08-13 8:19 ` Greg Kroah-Hartman
2021-08-13 14:29 ` Bjorn Helgaas
2021-08-13 15:09 ` Greg Kroah-Hartman
2021-08-13 7:23 ` Daniel Vetter
2021-08-19 15:25 ` Bjorn Helgaas [this message]
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=20210819152532.GA3206853@bjorn-Precision-5520 \
--to=helgaas@kernel.org \
--cc=bhelgaas@google.com \
--cc=dan.j.williams@intel.com \
--cc=daniel.vetter@ffwll.ch \
--cc=kw@linux.com \
--cc=linux-pci@vger.kernel.org \
--cc=sashal@kernel.org \
--cc=stable@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