Re: [RFC PATCH 1/6] Revert "PCI: Fix is_added/is_busmaster race condition"

2018-08-20 Thread Hari Vyas
On Mon, Aug 20, 2018 at 4:39 PM, Benjamin Herrenschmidt wrote: > On Mon, 2018-08-20 at 11:55 +0530, Hari Vyas wrote: >> On Mon, Aug 20, 2018 at 7:40 AM, Benjamin Herrenschmidt >> wrote: >> > On Sat, 2018-08-18 at 21:24 -0500, Bjorn Helgaas wrote: >> > > On Sat, Aug 18, 2018 at 01:24:51PM +1000, B

Re: [RFC PATCH 1/6] Revert "PCI: Fix is_added/is_busmaster race condition"

2018-08-20 Thread Benjamin Herrenschmidt
On Mon, 2018-08-20 at 09:17 +0200, Lukas Wunner wrote: > On Mon, Aug 20, 2018 at 12:10:59PM +1000, Benjamin Herrenschmidt wrote: > > I chose to create a new mutex which we should be able to address other > > similar races if we find them. The other solutions that I dismissed > > were: > > > > - U

Re: [RFC PATCH 1/6] Revert "PCI: Fix is_added/is_busmaster race condition"

2018-08-20 Thread Benjamin Herrenschmidt
On Mon, 2018-08-20 at 11:55 +0530, Hari Vyas wrote: > On Mon, Aug 20, 2018 at 7:40 AM, Benjamin Herrenschmidt > wrote: > > On Sat, 2018-08-18 at 21:24 -0500, Bjorn Helgaas wrote: > > > On Sat, Aug 18, 2018 at 01:24:51PM +1000, Benjamin Herrenschmidt wrote: > > > > On Fri, 2018-08-17 at 10:44 -0500

Re: [RFC PATCH 1/6] Revert "PCI: Fix is_added/is_busmaster race condition"

2018-08-20 Thread Lukas Wunner
On Mon, Aug 20, 2018 at 12:10:59PM +1000, Benjamin Herrenschmidt wrote: > I chose to create a new mutex which we should be able to address other > similar races if we find them. The other solutions that I dismissed > were: > > - Using the device_lock. A explained previously, this is tricky, I > p

Re: [RFC PATCH 1/6] Revert "PCI: Fix is_added/is_busmaster race condition"

2018-08-19 Thread Hari Vyas
On Mon, Aug 20, 2018 at 7:40 AM, Benjamin Herrenschmidt wrote: > On Sat, 2018-08-18 at 21:24 -0500, Bjorn Helgaas wrote: >> On Sat, Aug 18, 2018 at 01:24:51PM +1000, Benjamin Herrenschmidt wrote: >> > On Fri, 2018-08-17 at 10:44 -0500, Bjorn Helgaas wrote: >> > > On Fri, Aug 17, 2018 at 02:48:57PM

Re: [RFC PATCH 1/6] Revert "PCI: Fix is_added/is_busmaster race condition"

2018-08-19 Thread Benjamin Herrenschmidt
On Sat, 2018-08-18 at 21:24 -0500, Bjorn Helgaas wrote: > On Sat, Aug 18, 2018 at 01:24:51PM +1000, Benjamin Herrenschmidt wrote: > > On Fri, 2018-08-17 at 10:44 -0500, Bjorn Helgaas wrote: > > > On Fri, Aug 17, 2018 at 02:48:57PM +1000, Benjamin Herrenschmidt wrote: > > > > This reverts commit 44b

Re: [RFC PATCH 1/6] Revert "PCI: Fix is_added/is_busmaster race condition"

2018-08-18 Thread Bjorn Helgaas
On Sat, Aug 18, 2018 at 01:24:51PM +1000, Benjamin Herrenschmidt wrote: > On Fri, 2018-08-17 at 10:44 -0500, Bjorn Helgaas wrote: > > On Fri, Aug 17, 2018 at 02:48:57PM +1000, Benjamin Herrenschmidt wrote: > > > This reverts commit 44bda4b7d26e9fffed6d7152d98a2e9edaeb2a76. > > > > Just to be clear

Re: [RFC PATCH 1/6] Revert "PCI: Fix is_added/is_busmaster race condition"

2018-08-17 Thread Benjamin Herrenschmidt
On Fri, 2018-08-17 at 10:44 -0500, Bjorn Helgaas wrote: > On Fri, Aug 17, 2018 at 02:48:57PM +1000, Benjamin Herrenschmidt wrote: > > This reverts commit 44bda4b7d26e9fffed6d7152d98a2e9edaeb2a76. > > Just to be clear, if I understand correctly, this is a pure revert of > 44bda4b7d26e and as such i

Re: [RFC PATCH 1/6] Revert "PCI: Fix is_added/is_busmaster race condition"

2018-08-17 Thread Bjorn Helgaas
On Fri, Aug 17, 2018 at 02:48:57PM +1000, Benjamin Herrenschmidt wrote: > This reverts commit 44bda4b7d26e9fffed6d7152d98a2e9edaeb2a76. Just to be clear, if I understand correctly, this is a pure revert of 44bda4b7d26e and as such it reintroduces the problem solved by that commit. If your solutio

Re: [RFC PATCH 1/6] Revert "PCI: Fix is_added/is_busmaster race condition"

2018-08-16 Thread Benjamin Herrenschmidt
On Fri, 2018-08-17 at 14:48 +1000, Benjamin Herrenschmidt wrote: > This reverts commit 44bda4b7d26e9fffed6d7152d98a2e9edaeb2a76. > > The new pci state mutex provides a simpler way of addressing > this race and avoids the relative includes added to the powerpc > code. Ignore the cset comment, my "

[RFC PATCH 1/6] Revert "PCI: Fix is_added/is_busmaster race condition"

2018-08-16 Thread Benjamin Herrenschmidt
This reverts commit 44bda4b7d26e9fffed6d7152d98a2e9edaeb2a76. The new pci state mutex provides a simpler way of addressing this race and avoids the relative includes added to the powerpc code. Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/kernel/pci-common.c | 4 +--- arch/po