Re: [PATCH v2 03/14] PCI/P2PDMA: Add constants for not-supported result upstream_bridge_distance()

2019-08-08 Thread Logan Gunthorpe
On 2019-08-08 1:31 a.m., Christoph Hellwig wrote: > On Wed, Aug 07, 2019 at 09:58:06AM -0600, Logan Gunthorpe wrote: >> We only calculate it at the same time as we calculate the distance. This >> is necessary because, to calculate the type, we have to walk the tree >> and check the ACS bits. If

Re: [PATCH v2 03/14] PCI/P2PDMA: Add constants for not-supported result upstream_bridge_distance()

2019-08-08 Thread Christoph Hellwig
On Wed, Aug 07, 2019 at 09:58:06AM -0600, Logan Gunthorpe wrote: > We only calculate it at the same time as we calculate the distance. This > is necessary because, to calculate the type, we have to walk the tree > and check the ACS bits. If we separated it, we'd have to walk the tree > twice in a v

Re: [PATCH v2 03/14] PCI/P2PDMA: Add constants for not-supported result upstream_bridge_distance()

2019-08-07 Thread Logan Gunthorpe
On 2019-08-06 11:54 p.m., Christoph Hellwig wrote: > On Tue, Jul 30, 2019 at 10:35:34AM -0600, Logan Gunthorpe wrote: >> Add constant flags to indicate two devices are not supported or whether >> the data path goes through the host bridge instead of using the negative >> values -1 and -2. >> >>

Re: [PATCH v2 03/14] PCI/P2PDMA: Add constants for not-supported result upstream_bridge_distance()

2019-08-06 Thread Christoph Hellwig
On Tue, Jul 30, 2019 at 10:35:34AM -0600, Logan Gunthorpe wrote: > Add constant flags to indicate two devices are not supported or whether > the data path goes through the host bridge instead of using the negative > values -1 and -2. > > This helps annotate the code better, but the main reason is

[PATCH v2 03/14] PCI/P2PDMA: Add constants for not-supported result upstream_bridge_distance()

2019-07-30 Thread Logan Gunthorpe
Add constant flags to indicate two devices are not supported or whether the data path goes through the host bridge instead of using the negative values -1 and -2. This helps annotate the code better, but the main reason is so we can use the information to store the required mapping method in an xa