linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Bryant G. Ly" <bryantly@linux.vnet.ibm.com>
To: Sam Bobroff <sam.bobroff@au1.ibm.com>
Cc: benh@kernel.crashing.org, paulus@samba.org, mpe@ellerman.id.au,
	"Bryant G. Ly" <bgly@us.ibm.com>,
	linuxppc-dev@lists.ozlabs.org, martin.petersen@oracle.com
Subject: Re: [PATCH] powerpc/kernel: Change retrieval of pci_dn
Date: Tue, 29 Aug 2017 08:19:47 -0500	[thread overview]
Message-ID: <0bbc434e-a9d2-8887-43fa-a343013cacb1@linux.vnet.ibm.com> (raw)
In-Reply-To: <20170829062031.hb3pwrnt5pohpr7l@tungsten.ozlabs.ibm.com>

On 8/29/17 1:20 AM, Sam Bobroff wrote:

> On Mon, Aug 28, 2017 at 11:05:03AM -0500, Bryant G. Ly wrote:
>> For a PCI device it's pci_dn can be retrieved from
>> pdev->dev.archdata.firmware_data, PCI_DN(devnode), or parent's list.
>> Thus, we should just use the generic function pci_get_pdn_by_devfn
>> to get the pci_dn.
>>
>> Signed-off-by: Bryant G. Ly <bgly@us.ibm.com>
> Reviewed-by: Sam Bobroff <sam.bobroff@au1.ibm.com>
>
> I don't know this area but I tested it using a patched kernel with the
> old and new code together. My test kernel booted fine (in QEMU+KVM) and
> I saw 26 reads and 4 writes, all of which got the same value with either
> code block.
>
> I also checked that the error result in the "not found" case is the same
> as well, which it is, because rtas_{read,write}_config() will return
> PCIBIOS_DEVICE_NOT_FOUND if given a NULL pdn.
>
> So, looks good to me.
>
> Cheers,
> Sam.
>
Thanks for the review Sam!

  reply	other threads:[~2017-08-29 13:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-28 16:05 [PATCH] powerpc/kernel: Change retrieval of pci_dn Bryant G. Ly
2017-08-29  6:20 ` Sam Bobroff
2017-08-29 13:19   ` Bryant G. Ly [this message]
2017-08-29  6:31 ` Michael Ellerman
2017-08-29  6:33 ` Michael Ellerman
2017-08-29 13:18   ` Bryant G. Ly
  -- strict thread matches above, loose matches on Subject: below --
2017-08-29 13:11 Bryant G. Ly

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=0bbc434e-a9d2-8887-43fa-a343013cacb1@linux.vnet.ibm.com \
    --to=bryantly@linux.vnet.ibm.com \
    --cc=benh@kernel.crashing.org \
    --cc=bgly@us.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=martin.petersen@oracle.com \
    --cc=mpe@ellerman.id.au \
    --cc=paulus@samba.org \
    --cc=sam.bobroff@au1.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).