Re: [PATCH 1/2] powerpc/powernv: reduce multi-hit of iommu_add_device()

2014-04-29 Thread Wei Yang
On Wed, Apr 30, 2014 at 10:28:12AM +1000, Gavin Shan wrote: > >It seems that we have 2 problems here: > >- For non-SRIOV case, pcibios_setup_device() is called for towice. That > seems incorrect. We could simply remove pcibios_setup_bus_devices() > from pcibios_fixup_bus(). I have thought about

Re: [PATCH 1/2] powerpc/powernv: reduce multi-hit of iommu_add_device()

2014-04-29 Thread Wei Yang
On Tue, Apr 29, 2014 at 11:11:05PM +1000, Alexey Kardashevskiy wrote: >On 04/29/2014 07:37 PM, Wei Yang wrote: >> On Tue, Apr 29, 2014 at 05:55:48PM +1000, Alexey Kardashevskiy wrote: >>> On 04/29/2014 04:49 PM, Wei Yang wrote: On Mon, Apr 28, 2014 at 11:35:32PM +1000, Alexey Kardashevskiy wro

Re: [PATCH 1/2] powerpc/powernv: reduce multi-hit of iommu_add_device()

2014-04-29 Thread Gavin Shan
On Tue, Apr 29, 2014 at 02:49:55PM +0800, Wei Yang wrote: >On Mon, Apr 28, 2014 at 11:35:32PM +1000, Alexey Kardashevskiy wrote: >>On 04/23/2014 12:26 PM, Wei Yang wrote: .../... >Generally, when kernel enumerate on the pci device, following functions will >be invoked. > > pci_device_add >

Re: [PATCH 1/2] powerpc/powernv: reduce multi-hit of iommu_add_device()

2014-04-29 Thread Alexey Kardashevskiy
On 04/29/2014 07:37 PM, Wei Yang wrote: > On Tue, Apr 29, 2014 at 05:55:48PM +1000, Alexey Kardashevskiy wrote: >> On 04/29/2014 04:49 PM, Wei Yang wrote: >>> On Mon, Apr 28, 2014 at 11:35:32PM +1000, Alexey Kardashevskiy wrote: On 04/23/2014 12:26 PM, Wei Yang wrote: > During the EEH hotp

Re: [PATCH 1/2] powerpc/powernv: reduce multi-hit of iommu_add_device()

2014-04-29 Thread Wei Yang
On Tue, Apr 29, 2014 at 05:55:48PM +1000, Alexey Kardashevskiy wrote: >On 04/29/2014 04:49 PM, Wei Yang wrote: >> On Mon, Apr 28, 2014 at 11:35:32PM +1000, Alexey Kardashevskiy wrote: >>> On 04/23/2014 12:26 PM, Wei Yang wrote: During the EEH hotplug event, iommu_add_device() will be invoked t

Re: [PATCH 1/2] powerpc/powernv: reduce multi-hit of iommu_add_device()

2014-04-29 Thread Alexey Kardashevskiy
On 04/29/2014 04:49 PM, Wei Yang wrote: > On Mon, Apr 28, 2014 at 11:35:32PM +1000, Alexey Kardashevskiy wrote: >> On 04/23/2014 12:26 PM, Wei Yang wrote: >>> During the EEH hotplug event, iommu_add_device() will be invoked three times >>> and two of them will trigger warning or error. >>> >>> The

Re: [PATCH 1/2] powerpc/powernv: reduce multi-hit of iommu_add_device()

2014-04-28 Thread Wei Yang
On Mon, Apr 28, 2014 at 11:35:32PM +1000, Alexey Kardashevskiy wrote: >On 04/23/2014 12:26 PM, Wei Yang wrote: >> During the EEH hotplug event, iommu_add_device() will be invoked three times >> and two of them will trigger warning or error. >> >> The three times to invoke the iommu_add_device() ar

Re: [PATCH 1/2] powerpc/powernv: reduce multi-hit of iommu_add_device()

2014-04-28 Thread Alexey Kardashevskiy
On 04/23/2014 12:26 PM, Wei Yang wrote: > During the EEH hotplug event, iommu_add_device() will be invoked three times > and two of them will trigger warning or error. > > The three times to invoke the iommu_add_device() are: > > pci_device_add >... >set_iommu_table_base_and_g