[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <51B1F9A4.7090608@gmail.com>
Date: Fri, 07 Jun 2013 23:17:56 +0800
From: Jiang Liu <liuj97@...il.com>
To: Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
CC: Bjorn Helgaas <bhelgaas@...gle.com>,
Yinghai Lu <yinghai@...nel.org>,
Jiang Liu <jiang.liu@...wei.com>,
"Rafael J . Wysocki" <rjw@...k.pl>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Gu Zheng <guz.fnst@...fujitsu.com>,
Toshi Kani <toshi.kani@...com>,
Myron Stowe <myron.stowe@...hat.com>,
Yijing Wang <wangyijing@...wei.com>, linux-pci@...r.kernel.org,
linux-kernel@...r.kernel.org,
Jeremy Fitzhardinge <jeremy@...p.org>,
xen-devel@...ts.xensource.com,
virtualization@...ts.linux-foundation.org
Subject: Re: [RFC PATCH v2, part3 07/11] PCI, xen-pcifront: use new PCI interfaces
to simplify implementation
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@...wei.com>
>> Cc: Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
>> Cc: Jeremy Fitzhardinge <jeremy@...p.org>
>> Cc: xen-devel@...ts.xensource.com
>> Cc: virtualization@...ts.linux-foundation.org
>> Cc: linux-pci@...r.kernel.org
>> Cc: linux-kernel@...r.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists