Thread (55 messages) flat view 55 messages, 4 authors, 2020-07-24

Re: [PATCH 03/15] powerpc/powernv/pci: Add explicit tracking of the DMA setup state

From: Alexey Kardashevskiy <hidden>
Date: 2020-07-15 00:25:28


On 14/07/2020 17:21, Alexey Kardashevskiy wrote:

On 14/07/2020 15:58, Oliver O'Halloran wrote:
quoted
On Tue, Jul 14, 2020 at 3:37 PM Alexey Kardashevskiy [off-list ref] wrote:
quoted
On 10/07/2020 15:23, Oliver O'Halloran wrote:
quoted
There's an optimisation in the PE setup which skips performing DMA
setup for a PE if we only have bridges in a PE. The assumption being
that only "real" devices will DMA to system memory, which is probably
fair. However, if we start off with only bridge devices in a PE then
add a non-bridge device the new device won't be able to use DMA  because
we never configured it.

Fix this (admittedly pretty weird) edge case by tracking whether we've done
the DMA setup for the PE or not. If a non-bridge device is added to the PE
(via rescan or hotplug, or whatever) we can set up DMA on demand.
So hotplug does not work on powernv then, right? I thought you tested it
a while ago, or this patch is the result of that attempt? If it is, then
It mostly works. Just the really niche case of hot plugging a bridge,
then later on hot plugging a device into the same bus which wouldn't
work.
Do not you have to have a slot (which is a bridge) for hotplug in the
first place, to hotplug the bridge?

As discussed elsewhere, I missed that it is a non bridge device on the
same bus with previously plugged bridge. Now it all makes sense and


Reviewed-by: Alexey Kardashevskiy <redacted>


-- 
Alexey
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help