Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp4254676rwi; Wed, 2 Nov 2022 08:31:15 -0700 (PDT) X-Google-Smtp-Source: AMsMyM57kacmnAU2Iay9uvbki+Vreh7gQWXUxyYrQu+TCY60iUdT3W9XSFwuvcj11sHRoC+gEeFZ X-Received: by 2002:a17:902:ce11:b0:172:6f2c:a910 with SMTP id k17-20020a170902ce1100b001726f2ca910mr26264397plg.156.1667403075331; Wed, 02 Nov 2022 08:31:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667403075; cv=none; d=google.com; s=arc-20160816; b=Croiea4aXxhmN6ggwh0x/6rzCBllHqW0W6erN2eRzvlmmTujG4scmE1ZLKIGhBWpWL 3uYe3+YUGqjdp63zYUQDMf5smjNwY9MFpwzyeA8H5E+wLOXjkfP/zdssK5CtWfW8GEat xm/NUGeYpj/DNxqzuf+hVAxKdQc4/KRb9H9176a4s8EYjQxGzDR3YukiMVNUCqy3qRFY ewmKkVykDLPETTotBblqw/6MTQC8weJG8l+2eg9Juf0nU+t0MEN5xkbMSpfOrOPPbAcL fcK4hkF7SuZwfHEzAZsYSVuNq2w4ouRrHuxuMnJlWiWXWUaYSvjxFKU7GOAQ2/Y4nt2r dSlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=wP12hBLI/UjYflAvChPOlEUP0Fe9bcRv3GNq3jXeE+o=; b=mDZ7R0mRSfmuZID1Ta7CH4plBizF+ygXvT35nCNIWsRX+PxVKpb6zxQTBEom0wvG0t Txt7G1Ma7ibzP5O514QJB4TFjWtd3HmBkTZKwVFXsaUb8HR8U83BEyC1Rj0PIrJ/84H0 2cZFDjQZe8XyC3coirywPj4v6xVv6DzCnV1qcllb+4s72PnVRW3vjN3foC1p81rJVftd grDmFGuthU52uDoxkMuJ4BMNu96ymbQZmVWji19hJ+DdxKXsjA7dTeuqPuVCK5KyzycN 5eSFmzJsIgqRYCCg8LZZe1CldJyo8LRHE7n0cAdm5IpkenFVAEcTRROEyPgi50LECGK5 yPWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oPg7EAxf; 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 f190-20020a636ac7000000b004629ce15656si15370168pgc.196.2022.11.02.08.30.57; Wed, 02 Nov 2022 08:31:15 -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=oPg7EAxf; 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 S230305AbiKBP2L (ORCPT + 99 others); Wed, 2 Nov 2022 11:28:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39848 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230311AbiKBP2H (ORCPT ); Wed, 2 Nov 2022 11:28:07 -0400 Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E68824BD9 for ; Wed, 2 Nov 2022 08:28:01 -0700 (PDT) Received: by mail-pj1-x1029.google.com with SMTP id d59-20020a17090a6f4100b00213202d77e1so2441937pjk.2 for ; Wed, 02 Nov 2022 08:28:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=wP12hBLI/UjYflAvChPOlEUP0Fe9bcRv3GNq3jXeE+o=; b=oPg7EAxfhFVgkL5qNGfY4856C1CuYDrQT15DtL6CAfeFLX8YI4d839KNXQ4S+gqr3a jl0GyG/hjPYCfH8CFQOTECwjEjyDtxI5jMIWrIYga5TRq0kXfOXd9WDHC1Z//WkJKr9M Ad+DCW+vZTRC+nxDpNFkhVnFxaBoD0sK2hhdLLaaFhIVjXBbWRZtsm8j4QbOW5urUEsh QUwujKODHa/k883wtb2V2C6ovbNxfQKuOLJapf96fLqGvubzOHHsh3bsNDZTFiesw3Fj JKrcUe8+Fk9VgsGaOAMngyH68+2DM3jdLTjfELiAs3+3Jh7pfmiTrYtJePw+hvcxFtNv JbAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=wP12hBLI/UjYflAvChPOlEUP0Fe9bcRv3GNq3jXeE+o=; b=ZlHkbqWd6V4Al276dIt9k2YIY6+NvBYNrLoH2q2KlPJShuox2T347zOBFcYZ7pjBLa CGchD3HYC7RiIgaIeXdPJSQw1dl+VfvgE+7jfffpqslJBxOLi2y4lPhvNmfTmJfGpeuM f6ProzzJKuIk7lJd+QPX1Ha9cg+Fi8Yu1XppVo/20Jq0PBSz8sVxBhaMbj14S0ZwB8at /x/Z5cosVmi6wNRThteh4B0xWj68BHr2Hm6QZi0HnBYv3Kwp6Zfrd+0p/OJqeR99rJD2 hkoeyhKxWNGwEVmk90GrptH/l/FHWDZUl2LSb4vg/wWGDUnKSDn0zfUMcXTUQft9lVyJ hMCw== X-Gm-Message-State: ACrzQf1Bi2EWGvyeE92E3l5IWohhAygdBWofvdQTesHLTlXpEy3Sp8wd Z/3gywj/3oVgY1EmOAbAMHsoR829hATUL1PDgimTVQ== X-Received: by 2002:a17:902:b78b:b0:187:1623:827f with SMTP id e11-20020a170902b78b00b001871623827fmr18869518pls.165.1667402881129; Wed, 02 Nov 2022 08:28:01 -0700 (PDT) MIME-Version: 1.0 References: <20221028130242.20900-1-pshete@nvidia.com> In-Reply-To: <20221028130242.20900-1-pshete@nvidia.com> From: Ulf Hansson Date: Wed, 2 Nov 2022 16:27:24 +0100 Message-ID: Subject: Re: [PATCH v9 1/4] iommu: Add dummy dev_iommu_fwspec_get() helper To: Prathamesh Shete Cc: joro@8bytes.org, adrian.hunter@intel.com, thierry.reding@gmail.com, jonathanh@nvidia.com, p.zabel@pengutronix.de, linux-mmc@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, will@kernel.org, iommu@lists.linux.dev, robin.murphy@arm.com, anrao@nvidia.com, smangipudi@nvidia.com, kyarlagadda@nvidia.com, Thierry Reding Content-Type: text/plain; charset="UTF-8" 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 autolearn=unavailable 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 On Fri, 28 Oct 2022 at 15:02, Prathamesh Shete wrote: > > This dummy implementation is useful to avoid a dependency on the > IOMMU_API Kconfig symbol in drivers that can optionally use the IOMMU > API. > > In order to fully use this, also move the struct iommu_fwspec definition > out of the IOMMU_API protected region. > > Signed-off-by: Thierry Reding > Reviewed-by: Ulf Hansson It seems like you claimed authorship of the patch [1], that was authored by Thierry and updated the commit message header. Can you please restore the patch to its original that was posted by Thierry? Kind regards Uffe [1] https://lore.kernel.org/linux-mmc/20221018105149.820062-1-thierry.reding@gmail.com/ > --- > include/linux/iommu.h | 39 +++++++++++++++++++-------------------- > 1 file changed, 19 insertions(+), 20 deletions(-) > > diff --git a/include/linux/iommu.h b/include/linux/iommu.h > index ea30f00dc145..afa829bc4356 100644 > --- a/include/linux/iommu.h > +++ b/include/linux/iommu.h > @@ -173,6 +173,25 @@ enum iommu_dev_features { > > #define IOMMU_PASID_INVALID (-1U) > > +/** > + * struct iommu_fwspec - per-device IOMMU instance data > + * @ops: ops for this device's IOMMU > + * @iommu_fwnode: firmware handle for this device's IOMMU > + * @flags: IOMMU_FWSPEC_* flags > + * @num_ids: number of associated device IDs > + * @ids: IDs which this device may present to the IOMMU > + */ > +struct iommu_fwspec { > + const struct iommu_ops *ops; > + struct fwnode_handle *iommu_fwnode; > + u32 flags; > + unsigned int num_ids; > + u32 ids[]; > +}; > + > +/* ATS is supported */ > +#define IOMMU_FWSPEC_PCI_RC_ATS (1 << 0) > + > #ifdef CONFIG_IOMMU_API > > /** > @@ -600,25 +619,6 @@ extern struct iommu_group *generic_device_group(struct device *dev); > /* FSL-MC device grouping function */ > struct iommu_group *fsl_mc_device_group(struct device *dev); > > -/** > - * struct iommu_fwspec - per-device IOMMU instance data > - * @ops: ops for this device's IOMMU > - * @iommu_fwnode: firmware handle for this device's IOMMU > - * @flags: IOMMU_FWSPEC_* flags > - * @num_ids: number of associated device IDs > - * @ids: IDs which this device may present to the IOMMU > - */ > -struct iommu_fwspec { > - const struct iommu_ops *ops; > - struct fwnode_handle *iommu_fwnode; > - u32 flags; > - unsigned int num_ids; > - u32 ids[]; > -}; > - > -/* ATS is supported */ > -#define IOMMU_FWSPEC_PCI_RC_ATS (1 << 0) > - > /** > * struct iommu_sva - handle to a device-mm bond > */ > @@ -682,7 +682,6 @@ bool iommu_group_dma_owner_claimed(struct iommu_group *group); > > struct iommu_ops {}; > struct iommu_group {}; > -struct iommu_fwspec {}; > struct iommu_device {}; > struct iommu_fault_param {}; > struct iommu_iotlb_gather {}; > -- > 2.17.1 >