xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Jiang Liu <liuj97@gmail.com>
To: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
	Yinghai Lu <yinghai@kernel.org>, Jiang Liu <jiang.liu@huawei.com>,
	"Rafael J . Wysocki" <rjw@sisk.pl>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Gu Zheng <guz.fnst@cn.fujitsu.com>,
	Toshi Kani <toshi.kani@hp.com>,
	Myron Stowe <myron.stowe@redhat.com>,
	Yijing Wang <wangyijing@huawei.com>,
	linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
	Jeremy Fitzhardinge <jeremy@goop.org>,
	xen-devel@lists.xensource.com,
	virtualization@lists.linux-foundation.org
Subject: Re: [RFC PATCH v2, part3 07/11] PCI, xen-pcifront: use new PCI interfaces to simplify implementation
Date: Fri, 07 Jun 2013 23:50:49 +0800	[thread overview]
Message-ID: <51B20159.6090208@gmail.com> (raw)
In-Reply-To: <20130607145024.GA16631@phenom.dumpdata.com>

On Fri 07 Jun 2013 10:50:24 PM CST, Konrad Rzeszutek Wilk wrote:
> On Thu, May 16, 2013 at 11:50:55PM +0800, Jiang Liu wrote:
>> Use new PCI interfaces to simplify xen-pcifront implementation:
>> 1) Use pci_create_root_bus() instead of pci_scan_bus_parented()
>>    because pci_scan_bus_parented() is marked as __deprecated.This
>>    also gets rid of a duplicated call of pci_bus_start_devices().
>> 2) Use pci_stop_root_bus() and pci_remove_root_bus() instead of
>>    open-coded private implementation.
>> 3) Use pci_set_host_bridge_release() to release data structures
>>    associated with PCI root buses.
>> 4) Use pci_bus_get()/pci_bus_put() to manage PCI root bus reference
>>    count.
>>
>> This is also a preparation for coming PCI bus lock enhancement.
>>
>> Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
>> Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
>> Cc: Jeremy Fitzhardinge <jeremy@goop.org>
>> Cc: xen-devel@lists.xensource.com
>> Cc: virtualization@lists.linux-foundation.org
>> Cc: linux-pci@vger.kernel.org
>> Cc: linux-kernel@vger.kernel.org
>> ---
>>  drivers/pci/xen-pcifront.c | 81 ++++++++++++++++++++++------------------------
>>  1 file changed, 39 insertions(+), 42 deletions(-)
>>
>> diff --git a/drivers/pci/xen-pcifront.c b/drivers/pci/xen-pcifront.c
>> index 816cf94..6aa2c0f 100644
>> --- a/drivers/pci/xen-pcifront.c
>> +++ b/drivers/pci/xen-pcifront.c
......
>> @@ -480,12 +490,14 @@ static int pcifront_scan_root(struct pcifront_device *pdev,
>>  		goto err_out;
>>  	}
>>
>> -	bus_entry->bus = b;
>> +	pci_set_host_bridge_release(to_pci_host_bridge(b->bridge),
>> +				    pcifront_release_sd, sd);
>>
>> -	list_add(&bus_entry->list, &pdev->root_buses);
>> -
>> -	/* pci_scan_bus_parented skips devices which do not have a have
>> -	* devfn==0. The pcifront_scan_bus enumerates all devfn. */
>> +	/*
>> +	 * Every PCI physical device should have function 0, but that's not
>> +	 * true for xen.
>
> That is incorrect. There are two types of backends - one of them will
> start at zero, but the other might not.
Hi Konrad,
      Forgive my poor knowledge about Xen:(, so I will skip this change.
Regards!
Gerry

  parent reply	other threads:[~2013-06-07 15:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1368719459-24800-1-git-send-email-jiang.liu@huawei.com>
2013-05-16 15:50 ` [RFC PATCH v2, part3 07/11] PCI, xen-pcifront: use new PCI interfaces to simplify implementation Jiang Liu
2013-06-07 14:50   ` Konrad Rzeszutek Wilk
2013-06-07 15:17     ` Jiang Liu
2013-06-07 15:38     ` Konrad Rzeszutek Wilk
2013-06-07 16:50       ` Jiang Liu
2013-06-07 17:07         ` Konrad Rzeszutek Wilk
2013-06-09 16:50           ` Jiang Liu
2013-06-10 16:58             ` Konrad Rzeszutek Wilk
2013-06-10 17:08               ` Jiang Liu
2013-06-14 18:07                 ` Konrad Rzeszutek Wilk
2013-06-07 15:50     ` Jiang Liu [this message]
2013-05-16 15:50 ` [RFC PATCH v2, part3 08/11] PCI, xen-pcifront: use PCI bus lock to protect PCI device hotplug Jiang Liu

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=51B20159.6090208@gmail.com \
    --to=liuj97@gmail.com \
    --cc=bhelgaas@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=guz.fnst@cn.fujitsu.com \
    --cc=jeremy@goop.org \
    --cc=jiang.liu@huawei.com \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=myron.stowe@redhat.com \
    --cc=rjw@sisk.pl \
    --cc=toshi.kani@hp.com \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=wangyijing@huawei.com \
    --cc=xen-devel@lists.xensource.com \
    --cc=yinghai@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;
as well as URLs for NNTP newsgroup(s).