From: Marc Zyngier <maz@kernel.org>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Linus Walleij <linusw@kernel.org>, Imre Kaloz <kaloz@openwrt.org>,
Krzysztof Halasa <khalasa@piap.pl>,
"K. Y. Srinivasan" <kys@microsoft.com>,
Haiyang Zhang <haiyangz@microsoft.com>,
Stephen Hemminger <sthemmin@microsoft.com>,
Sasha Levin <sashal@kernel.org>,
Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
Bjorn Helgaas <bhelgaas@google.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 7/8] PCI: hv: Allocate a named fwnode instead of an address-based one
Date: Wed, 7 Aug 2019 14:02:06 +0100 [thread overview]
Message-ID: <dce13cf7-2be6-e51e-974c-3c87b0190618@kernel.org> (raw)
In-Reply-To: <20190806145716.125421-8-maz@kernel.org>
On 06/08/2019 15:57, Marc Zyngier wrote:
> To allocate its fwnode that is then used to allocate an irqdomain,
> the driver uses irq_domain_alloc_fwnode(), passing it a VA as an
> identifier. This is a rather bad idea, as this address ends up
> published in debugfs (and we want to move away from VAs there
> anyway).
>
> Instead, let's allocate a named fwnode by using the device GUID as
> an identifier. It is allegedly unique, and can be traced back to
> the original device.
>
> Signed-off-by: Marc Zyngier <maz@kernel.org>
> ---
> drivers/pci/controller/pci-hyperv.c | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/pci/controller/pci-hyperv.c b/drivers/pci/controller/pci-hyperv.c
> index 40b625458afa..f6ed2583167a 100644
> --- a/drivers/pci/controller/pci-hyperv.c
> +++ b/drivers/pci/controller/pci-hyperv.c
> @@ -2521,6 +2521,7 @@ static int hv_pci_probe(struct hv_device *hdev,
> const struct hv_vmbus_device_id *dev_id)
> {
> struct hv_pcibus_device *hbus;
> + char *name;
> int ret;
>
> /*
> @@ -2589,7 +2590,14 @@ static int hv_pci_probe(struct hv_device *hdev,
> goto free_config;
> }
>
> - hbus->sysdata.fwnode = irq_domain_alloc_fwnode(hbus);
> + name = kasprintf("%pUL", &hdev->dev_instance);
Of course, this is bogus. It needs a GFP_KERNEL as the first parameter.
/me adds HYPERV to .config, and fixes it locally.
M.
--
Jazz is not dead, it just smells funny...
next prev parent reply other threads:[~2019-08-07 13:02 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-06 14:57 [PATCH 0/8] irqdomain/debugfs: Fix uses of irq_domain_alloc_fwnode Marc Zyngier
2019-08-06 14:57 ` [PATCH 1/8] irqchip/gic-v3: Register the distributor's PA instead of its VA in fwnode Marc Zyngier
2019-08-06 14:57 ` [PATCH 2/8] irqchip/gic-v3-its: Register the ITS' " Marc Zyngier
2019-08-06 14:57 ` [PATCH 3/8] irqchip/gic: Register the distributor's " Marc Zyngier
2019-08-06 14:57 ` [PATCH 4/8] irqchip/gic-v2m: Register the frame's " Marc Zyngier
2019-08-06 14:57 ` [PATCH 5/8] irqchip/ixp4xx: Register the base " Marc Zyngier
2019-08-06 14:57 ` [PATCH 6/8] gpio/ixp4xx: " Marc Zyngier
2019-08-07 12:41 ` Linus Walleij
2019-08-06 14:57 ` [PATCH 7/8] PCI: hv: Allocate a named fwnode instead of an address-based one Marc Zyngier
2019-08-07 13:02 ` Marc Zyngier [this message]
2019-08-06 14:57 ` [PATCH 8/8] irqdomain/debugfs: Use PAs to generate fwnode names Marc Zyngier
2019-08-07 13:19 ` [PATCH 0/8] irqdomain/debugfs: Fix uses of irq_domain_alloc_fwnode Thomas Gleixner
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=dce13cf7-2be6-e51e-974c-3c87b0190618@kernel.org \
--to=maz@kernel.org \
--cc=bhelgaas@google.com \
--cc=haiyangz@microsoft.com \
--cc=kaloz@openwrt.org \
--cc=khalasa@piap.pl \
--cc=kys@microsoft.com \
--cc=linusw@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lorenzo.pieralisi@arm.com \
--cc=sashal@kernel.org \
--cc=sthemmin@microsoft.com \
--cc=tglx@linutronix.de \
/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).