Re: [PATCH v9 06/18] PCI/P2PDMA: Collect the path's ACS controls before deciding

From: Leon Romanovsky

Date: Wed Oct 07 2026 - 10:17:28 EST


On Tue, Oct 06, 2026 at 04:48:58PM -0500, Bjorn Helgaas wrote:
> On Thu, Oct 01, 2026 at 02:55:14PM +0300, Leon Romanovsky wrote:
> > From: Leon Romanovsky <leonro@xxxxxxxxxx>
> >
> > calc_map_type_and_dist() reads each divergence port's ACS Control register
> > and folds the result into running counters as it goes. Any routing property
> > that depends on the kind of TLP being routed would have to be threaded
> > through that code, so there is nowhere to put one without reading the
> > registers again for each kind.
>
> What is the "one" that there's nowhere to put? I guess the routing
> property? So this is an optimization to avoid some config reads?

Right, cache the ACS bits, since we need to query them for both devices
whenever we calculate routing.

Thanks