From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932367AbcC2R1i (ORCPT ); Tue, 29 Mar 2016 13:27:38 -0400 Received: from mail-wm0-f43.google.com ([74.125.82.43]:36977 "EHLO mail-wm0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757471AbcC2R1h (ORCPT ); Tue, 29 Mar 2016 13:27:37 -0400 Subject: Re: [RFC v5 03/17] iommu: introduce a reserved iova cookie To: Julien Grall , eric.auger@st.com, robin.murphy@arm.com, alex.williamson@redhat.com, will.deacon@arm.com, joro@8bytes.org, tglx@linutronix.de, jason@lakedaemon.net, marc.zyngier@arm.com, christoffer.dall@linaro.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org References: <1456856877-4817-1-git-send-email-eric.auger@linaro.org> <1456856877-4817-4-git-send-email-eric.auger@linaro.org> <56D865B7.7000404@arm.com> Cc: patches@linaro.org, Manish.Jaggi@caviumnetworks.com, linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org From: Eric Auger Message-ID: <56FABAC1.1020506@linaro.org> Date: Tue, 29 Mar 2016 19:26:25 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <56D865B7.7000404@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 Hi Julien, On 03/03/2016 05:26 PM, Julien Grall wrote: > Hi Eric, > > On 01/03/16 18:27, Eric Auger wrote: >> diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c >> index 0e3b009..7b2bb94 100644 >> --- a/drivers/iommu/iommu.c >> +++ b/drivers/iommu/iommu.c >> @@ -1072,6 +1072,7 @@ static struct iommu_domain >> *__iommu_domain_alloc(struct bus_type *bus, >> >> domain->ops = bus->iommu_ops; >> domain->type = type; >> + mutex_init(&domain->reserved_mutex); > > For consistency, the RB-tree reserved_binding_list should be initialized > too: > > domain->reserved_binding_list = RB_ROOT; Sure Thank you Eric > > Cheers, >