From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH v3 13/13] xen/iommu: smmu: Advertise when the SMMU support coherent table walk Date: Fri, 20 Feb 2015 13:34:44 +0000 Message-ID: <1424439284.30924.233.camel@citrix.com> References: <1422643768-23614-1-git-send-email-julien.grall@linaro.org> <1422643768-23614-14-git-send-email-julien.grall@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YOnjF-0008MY-4Z for xen-devel@lists.xenproject.org; Fri, 20 Feb 2015 13:34:49 +0000 In-Reply-To: <1422643768-23614-14-git-send-email-julien.grall@linaro.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Julien Grall Cc: xen-devel@lists.xenproject.org, tim@xen.org, stefano.stabellini@citrix.com List-Id: xen-devel@lists.xenproject.org On Fri, 2015-01-30 at 18:49 +0000, Julien Grall wrote: > @@ -2896,6 +2911,16 @@ static __init int arm_smmu_dt_init(struct dt_device_node *dev, > if ( !rc ) > iommu_set_ops(&arm_smmu_iommu_ops); > > + /* > + * The last added SMMU is the first element of arm_smmu_devices. > + * It's not necessary to take the lock because only the boot CPU is > + * initialized the SMMU devices. Why is only the last added SMMU of interest? Do we not need to take the union and/or intersection of them all? Perhaps the code which calls iommu_set_feature should gain an else which calls iommu_clear_feature, and between them they can ensure that platform_features is correctly updated? > + */ > + smmu = list_entry(arm_smmu_devices.next, typeof(*smmu), list); > + ASSERT(smmu != NULL); > + > + platform_features &= smmu->features; > + > return rc; > } >