From: Christoph Hellwig <hch@infradead.org>
To: Mikel Rychliski <mikel@mikelr.com>
Cc: amd-gfx@lists.freedesktop.org, linux-pci@vger.kernel.org,
nouveau@lists.freedesktop.org,
"Alex Deucher" <alexander.deucher@amd.com>,
"Christian König" <christian.koenig@amd.com>,
"David (ChunMing) Zhou" <David1.Zhou@amd.com>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Matthew Garrett" <matthewgarrett@google.com>,
"Ben Skeggs" <bskeggs@redhat.com>
Subject: Re: [PATCH RESEND v2 2/2] PCI: Use ioremap(), not phys_to_virt() for platform ROM
Date: Tue, 17 Mar 2020 07:47:31 -0700 [thread overview]
Message-ID: <20200317144731.GG23471@infradead.org> (raw)
In-Reply-To: <20200313222258.15659-3-mikel@mikelr.com>
On Fri, Mar 13, 2020 at 06:22:58PM -0400, Mikel Rychliski wrote:
> /**
> + * pci_platform_rom - ioremap() the ROM image provided by the platform
> * @pdev: pointer to pci device struct
> * @size: pointer to receive size of pci window over ROM
> + *
> + * Return: kernel virtual pointer to image of ROM
> + *
> + * The caller is responsible for removing the mapping with iounmap()
> */
> void __iomem *pci_platform_rom(struct pci_dev *pdev, size_t *size)
> {
> if (pdev->rom && pdev->romlen) {
> *size = pdev->romlen;
> - return phys_to_virt((phys_addr_t)pdev->rom);
> + return ioremap(pdev->rom, pdev->romlen);
> }
What is the value of this helper over just open coding an ioremap
of pdev->rom in the callers?
next prev parent reply other threads:[~2020-03-17 14:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-13 22:22 [PATCH RESEND v2 0/2] Fix loading of platform ROM from 32-bit EFI Mikel Rychliski
2020-03-13 22:22 ` [PATCH RESEND v2 1/2] drm/radeon: Stop directly referencing iomem Mikel Rychliski
2020-03-13 22:22 ` [PATCH RESEND v2 2/2] PCI: Use ioremap(), not phys_to_virt() for platform ROM Mikel Rychliski
2020-03-17 14:47 ` Christoph Hellwig [this message]
2020-03-18 1:34 ` Mikel Rychliski
2020-03-18 6:51 ` Christoph Hellwig
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=20200317144731.GG23471@infradead.org \
--to=hch@infradead.org \
--cc=David1.Zhou@amd.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=bhelgaas@google.com \
--cc=bskeggs@redhat.com \
--cc=christian.koenig@amd.com \
--cc=linux-pci@vger.kernel.org \
--cc=matthewgarrett@google.com \
--cc=mikel@mikelr.com \
--cc=nouveau@lists.freedesktop.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;
as well as URLs for NNTP newsgroup(s).