From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751218AbdEaS31 (ORCPT ); Wed, 31 May 2017 14:29:27 -0400 Received: from foss.arm.com ([217.140.101.70]:47900 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751004AbdEaS30 (ORCPT ); Wed, 31 May 2017 14:29:26 -0400 Subject: Re: [PATCH] irqchip/gic-v3-its: Fix MSI alias accounting To: Robin Murphy , tglx@linutronix.de, jason@lakedaemon.net References: <20170531175230.16529-1-robin.murphy@arm.com> Cc: linux-kernel@vger.kernel.org From: Marc Zyngier Organization: ARM Ltd Message-ID: Date: Wed, 31 May 2017 19:29:23 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170531175230.16529-1-robin.murphy@arm.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 31/05/17 18:52, Robin Murphy wrote: > The call to pci_for_each_dma_alias() in the ITS PCI code has aroused > suspicion in the past, and upon closer inspection does turn out to be > completely backwards. Rather than iterating through each RID alias of > the given device, what we actually want to be doing here is iterating > through all the *other* devices which may also alias the same RID, in > order to size the table for the worst case. > > Do the right thing by ignoring the initial DMA aliases themselves and > just using that walk to detect an aliasing bridge, then walking back > down the bus topology as necessary to actually count everything else. > > Our alias handling still isn't perfect, since we don't account for the > cases of certain bridges only taking ownership of transactions under > particular circumstances, but without completely reworking the ITS code > to cope with the notion of multiple DevIDs per device, it'll have to do. > > Signed-off-by: Robin Murphy Ah, that's pretty neat. Reviewed-by: Marc Zyngier I'll queue this for 4.13. Thanks, M. -- Jazz is not dead. It just smells funny...