From: David Gibson <david@gibson.dropbear.id.au>
To: Alexey Kardashevskiy <aik@ozlabs.ru>
Cc: Seeteena Thoufeek <s1seetee@linux.vnet.ibm.com>,
agraf@suse.de, qemu-ppc@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH v1] spapr_pci: fix the path while fetching loc-code from host DT
Date: Wed, 8 Nov 2017 17:08:45 +1100 [thread overview]
Message-ID: <20171108060845.GB7732@umbus.fritz.box> (raw)
In-Reply-To: <7426dac9-67bf-a70a-bb5b-307de4602263@ozlabs.ru>
[-- Attachment #1: Type: text/plain, Size: 1773 bytes --]
On Wed, Nov 08, 2017 at 01:30:04PM +1100, Alexey Kardashevskiy wrote:
> On 08/11/17 00:18, Seeteena Thoufeek wrote:
> > The function spapr_phb_vfio_get_loc_code uses wrong path for
> > fetching loc-code from host DT
> >
> > this is the call that needs to be fixed:
> > /* Construct and read from host device tree the loc-code */
> > path = g_strdup_printf("/proc/device-tree%s/ibm,loc-code", buf);
>
>
> I do not see why would extra '/' hurt but where does it really fail?
>
> My machines have leading '/' in devspec, do not yours?
>
> aik@garrison2:~$ cat /sys/bus/pci/devices/0009:03:00.0/devspec && echo -e '\n'
> /pciex@3fffe40500000/pci@0/pci@0/pci@1/usb-xhci@0
Right, what Alexey said. I see no reason to change this.
>
>
>
>
> >
> > Signed-off-by: Seeteena Thoufeek <s1seetee@linux.vnet.ibm.com>
> > ---
> > hw/ppc/spapr_pci.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
> > index 5a3122a..ae86322 100644
> > --- a/hw/ppc/spapr_pci.c
> > +++ b/hw/ppc/spapr_pci.c
> > @@ -762,7 +762,7 @@ static char *spapr_phb_vfio_get_loc_code(sPAPRPHBState *sphb, PCIDevice *pdev)
> > g_free(path);
> >
> > /* Construct and read from host device tree the loc-code */
> > - path = g_strdup_printf("/proc/device-tree%s/ibm,loc-code", buf);
> > + path = g_strdup_printf("/proc/device-tree/%s/ibm,loc-code", buf);
> > g_free(buf);
> > if (!g_file_get_contents(path, &buf, NULL, NULL)) {
> > goto err_out;
> >
>
>
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2017-11-08 7:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-07 13:18 [Qemu-devel] [PATCH v1] spapr_pci: fix the path while fetching loc-code from host DT Seeteena Thoufeek
2017-11-08 2:30 ` [Qemu-devel] [Qemu-ppc] " Alexey Kardashevskiy
2017-11-08 6:08 ` David Gibson [this message]
2017-11-08 14:34 ` seeteena
2017-11-08 11:29 ` Greg Kurz
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=20171108060845.GB7732@umbus.fritz.box \
--to=david@gibson.dropbear.id.au \
--cc=agraf@suse.de \
--cc=aik@ozlabs.ru \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=s1seetee@linux.vnet.ibm.com \
/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).