Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1638880iob; Thu, 19 May 2022 10:50:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyBpFRMmftsxP0/cuGBpXyYqfKaiY6DhGSgEsAOtF3oLu4KU8rp8kFP9tXlYT+V2XHixXZZ X-Received: by 2002:a17:907:3e99:b0:6f3:d1e1:23ae with SMTP id hs25-20020a1709073e9900b006f3d1e123aemr5498310ejc.470.1652982626119; Thu, 19 May 2022 10:50:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652982626; cv=none; d=google.com; s=arc-20160816; b=D11M8JQyr+IeeINy+iPf9fySPBb16zS+SuT/bWHInKDq+89W0N5USYA/LZRvfgCb7r HNEmRY0bbdoGolsMyVNGI0kjC/ICEIAjwzPFAJHdIDqoo96HkIgnl17ctpTf/D/jrh6h 0Ft1THaZJaxcTrnXyFo/Ke2NNiBYrJJ2GO1Q7aNa548Rg/DHLCtx30Pf2X0waxOX1xrl /APkpijbRQEBb0iTsDiDp6dIxSjMJk414rUs8m6Ktz/2muiaUbg3vdnQaQMoLHBVkaGk P7Egf7wWW6m3ioaZSHz5iZZibaMFFz95veiWFRhSseCB684sG4tRLDb2CMUwJIPN3q88 94uA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=91RlCk313r8m40bIa9yHP69AdJe8s0O90hAGX9tfpQo=; b=xrgN3EKKtxrSYbgA6tK3nrIctNLVy+8EbSH/QU5VJ8WcDCwfZ402cG7F01ggVHvzwi 8X6lG+4fdpaGDhJqYgAiN2pwtc8Vx8afFnYyCs/RbbT4To8xWW7ET0eu0u8OHtKoEiZO 5VwYZyrhUlCB2d+mrxkOiwR+A+GtJAwv0UWaNRObJsG/hAZWDiZGThg8y5zWarJb+6YH 6NiFsSuMSGsGbCljbLAytYG16urBi1ALJn8/NFhYLq26aVTVxt2IkvijdT7X+JkWGKL4 HTGzF6aQ04tpmoIUGIALkbENCI9UjC0vAlNCEd+ZRg+4irAldiht3B3lHKfI8RkVX2wr j2JA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IGROSZ9s; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gr19-20020a170906e2d300b006e8bd9bf296si6570474ejb.279.2022.05.19.10.49.59; Thu, 19 May 2022 10:50:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IGROSZ9s; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237071AbiESKh4 (ORCPT + 99 others); Thu, 19 May 2022 06:37:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36840 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235891AbiESKhw (ORCPT ); Thu, 19 May 2022 06:37:52 -0400 Received: from mail-oi1-x22f.google.com (mail-oi1-x22f.google.com [IPv6:2607:f8b0:4864:20::22f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D502864713 for ; Thu, 19 May 2022 03:37:51 -0700 (PDT) Received: by mail-oi1-x22f.google.com with SMTP id q8so5906926oif.13 for ; Thu, 19 May 2022 03:37:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=91RlCk313r8m40bIa9yHP69AdJe8s0O90hAGX9tfpQo=; b=IGROSZ9snA0E8moJpPnXXlZ+dVvo7Pn7LrcuG45gT2NMj0Ft/xuwojMxSci6m30Tpb /+VVqblq/P9RPYJr4EEmwIU97Qi6+E+yf3v4QCvn8OqlhyIAXXcNOcV5K4t6/w4G1uvM uEmQnlU2XcVwe/ZGt0z1yg6STGpDIjMg+qPFFfwAsg3K2NKtCuJW7jvqlLXGNCoahT2/ NGDeqP7vUbd8MLT7ZPqZUmIwLxHVVF9dSSXYfUoUhTPDYL5mcFXQX1Q8mdpM0FckoFoE qBh+ed3PA9GGqzt4MmB7FjdMVUAOtRNTf7o+LN2mg0u/lZBWQ3NWKmSwIfUjvW2WYtQQ 8dnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=91RlCk313r8m40bIa9yHP69AdJe8s0O90hAGX9tfpQo=; b=6ZBnQ/eDv8SjPCaR0su/+u0PREOJWsdTOmS1EfQeoGQQzwWrg4xNTcABKn8mDmUr2d cYPgJ5uMob+NNIsi6uBHneyLYrouNbVN399Al/tnbED+0zoI19x2Daa4Xq1kjwEyDQLP Jstjt/XDHSfQjGNxx9Xyi8UcfHdA4PichiQdZdTJWKS+hhOQxoqAYpDsN2BtqhJKMkBP 7hvrJJ6w4seZXoucPgqZO3cYvRN/aErPlNFRlvFZ1CvYzbG+v3fZ1UOEy8BnrFwt86dI kyblJ/OadUeq/58kev1WicCzKorMGJWCP7rc8aVhcXGgyz3B23+1Kh21o8GFDB6W6j5N tGYg== X-Gm-Message-State: AOAM532BV2Udch8inQ7QkdI8RaiEblsXmxZxdIGhCfLPdbTK4uS5jV1a K4Yg4XmZhlUQ+/QU4Jv1bc5gNw== X-Received: by 2002:a54:4513:0:b0:325:5f69:19ea with SMTP id l19-20020a544513000000b003255f6919eamr2197507oil.111.1652956671191; Thu, 19 May 2022 03:37:51 -0700 (PDT) Received: from myrica (cpc92880-cmbg19-2-0-cust679.5-4.cable.virginm.net. [82.27.106.168]) by smtp.gmail.com with ESMTPSA id i62-20020aca3b41000000b00325cda1ff8esm1726727oia.13.2022.05.19.03.37.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 May 2022 03:37:50 -0700 (PDT) Date: Thu, 19 May 2022 11:37:23 +0100 From: Jean-Philippe Brucker To: Lu Baolu Cc: Joerg Roedel , Jason Gunthorpe , Christoph Hellwig , Kevin Tian , Ashok Raj , Will Deacon , Robin Murphy , Jean-Philippe Brucker , Dave Jiang , Vinod Koul , Eric Auger , Liu Yi L , Jacob jun Pan , iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v7 01/10] iommu: Add pasids field in struct iommu_device Message-ID: References: <20220519072047.2996983-1-baolu.lu@linux.intel.com> <20220519072047.2996983-2-baolu.lu@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220519072047.2996983-2-baolu.lu@linux.intel.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Baolu, On Thu, May 19, 2022 at 03:20:38PM +0800, Lu Baolu wrote: > diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c > index 88817a3376ef..6e2cd082c670 100644 > --- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c > +++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c > @@ -3546,6 +3546,7 @@ static int arm_smmu_device_hw_probe(struct arm_smmu_device *smmu) > /* SID/SSID sizes */ > smmu->ssid_bits = FIELD_GET(IDR1_SSIDSIZE, reg); > smmu->sid_bits = FIELD_GET(IDR1_SIDSIZE, reg); > + smmu->iommu.pasids = smmu->ssid_bits; This should be 1UL << smmu->ssid_bits Thanks, Jean