From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757642AbcCCQ0o (ORCPT ); Thu, 3 Mar 2016 11:26:44 -0500 Received: from foss.arm.com ([217.140.101.70]:38286 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757305AbcCCQ0l (ORCPT ); Thu, 3 Mar 2016 11:26:41 -0500 Subject: Re: [RFC v5 03/17] iommu: introduce a reserved iova cookie To: Eric Auger , 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> Cc: patches@linaro.org, Manish.Jaggi@caviumnetworks.com, linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org From: Julien Grall Message-ID: <56D865B7.7000404@arm.com> Date: Thu, 3 Mar 2016 16:26:31 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <1456856877-4817-4-git-send-email-eric.auger@linaro.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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; Cheers, -- Julien Grall