From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3BF54C2BB1D for ; Mon, 16 Mar 2020 15:48:03 +0000 (UTC) Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 115BF2071C for ; Mon, 16 Mar 2020 15:48:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="wqEM+8T/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 115BF2071C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=iommu-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id E788E88432; Mon, 16 Mar 2020 15:48:02 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3iRVrtsRpauE; Mon, 16 Mar 2020 15:48:02 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by whitealder.osuosl.org (Postfix) with ESMTP id F23A188426; Mon, 16 Mar 2020 15:48:01 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id EA686C1D88; Mon, 16 Mar 2020 15:48:01 +0000 (UTC) Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id E2C16C013E for ; Mon, 16 Mar 2020 15:48:00 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id C1611872DD for ; Mon, 16 Mar 2020 15:48:00 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VP0JoySRi2uK for ; Mon, 16 Mar 2020 15:47:59 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 4ECA987277 for ; Mon, 16 Mar 2020 15:47:59 +0000 (UTC) Received: by mail-wr1-f66.google.com with SMTP id z15so21830969wrl.1 for ; Mon, 16 Mar 2020 08:47:59 -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=J+yCX5u1YDN6eK0N92vhv3vwdN0qX/QOnRznwSw/NEU=; b=wqEM+8T/4h/xHj/JCPK+rRTCXxcVR4eDf7FRmVy6tL77x3zHH/AiX26KSVcpaAUPYM H2E3TxgVcsUZps0ZwbKrOGHGA1w+q7Tk9JZyHOG4r0miXlsNK9DAr6ASz77gWGMYoThi aqIcdck8zrW9cmOsVNIVfmvriv2jyBKV2gCHKWxDzNBhDSaeuNibLyNo1rN/KPESbvGx bYFXAMI7K3kXwTe2xy6IA/A4hJbQRhpt2ZZKRbDn2/H/Lo/rmmzCexG9w/kcno6ZiI77 ppej5XGet0RlmPFvfqjzVDbUXtrDAc80RMkysk6JhzvWsm3/Qn/rhmBAkBM9JFQCl/h+ nSCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=J+yCX5u1YDN6eK0N92vhv3vwdN0qX/QOnRznwSw/NEU=; b=k0i/4Kmn/bUkaK1uIufmyov4C+nRfcu3NimDEpn1/zh/bVYORLcxMefrUl3wJsdeZx frYxWhapjvF00E6IeomV1jLB7V2O9Edrw8QCdLhWQzgkeb3d6NH5HHCo49da81tcZ1/F SuJbXMc/nvd1h2X1/6nN9UTPxXH/5man9I/baON/TjeXkp2fzZWXoQ0VhU+i7Z3xpi5L JSxx3B9k27/9+rleODv+RYSJQi6iOgtsoU3FaJJfhfc3HhXOVfQEtQzIxyhV6yXc43Ej FT9TUGhx1JlqUZH+GvDFwtcWk7l9w8plurEbZDOyvwJJ5i7UvivEp3pBdY+wZAKqqCvI j38Q== X-Gm-Message-State: ANhLgQ2hnobV/RPE48IekyW5ZLRNYabP7T43NXLNP/cyzq6Vjdm+GnQk TbpZmEHosE09wwbI6Yq1izXqKQ== X-Google-Smtp-Source: ADFU+vu7BwV9+IRhzha1mvLv+qxjTZOswhDVu8mc2cK8kbLXKQAY/jWE86j0EqeFBPhJwYU3dCMzFg== X-Received: by 2002:adf:f510:: with SMTP id q16mr6841064wro.43.1584373677809; Mon, 16 Mar 2020 08:47:57 -0700 (PDT) Received: from myrica ([2001:171b:226b:54a0:116c:c27a:3e7f:5eaf]) by smtp.gmail.com with ESMTPSA id l7sm488506wrw.33.2020.03.16.08.47.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Mar 2020 08:47:57 -0700 (PDT) Date: Mon, 16 Mar 2020 16:47:49 +0100 From: Jean-Philippe Brucker To: Joerg Roedel Subject: Re: [PATCH 08/15] iommu: Introduce accessors for iommu private data Message-ID: <20200316154749.GI304669@myrica> References: <20200310091229.29830-1-joro@8bytes.org> <20200310091229.29830-9-joro@8bytes.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200310091229.29830-9-joro@8bytes.org> Cc: Will Deacon , linux-arm-msm@vger.kernel.org, Sudeep Holla , linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, iommu@lists.linux-foundation.org, Thierry Reding , linux-mediatek@lists.infradead.org, Andy Gross , Joerg Roedel , Hanjun Guo , Matthias Brugger , Bjorn Andersson , Sean Paul , Robin Murphy X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" On Tue, Mar 10, 2020 at 10:12:22AM +0100, Joerg Roedel wrote: > From: Joerg Roedel > > Add dev_iommu_priv_get/set() functions to access per-device iommu > private data. This makes it easier to move the pointer to a different > location. > > Tested-by: Will Deacon # arm-smmu > Signed-off-by: Joerg Roedel Reviewed-by: Jean-Philippe Brucker > --- > include/linux/iommu.h | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/include/linux/iommu.h b/include/linux/iommu.h > index f5edc21a644d..056900e75758 100644 > --- a/include/linux/iommu.h > +++ b/include/linux/iommu.h > @@ -627,6 +627,16 @@ static inline void dev_iommu_fwspec_set(struct device *dev, > dev->iommu->fwspec = fwspec; > } > > +static inline void *dev_iommu_priv_get(struct device *dev) > +{ > + return dev->iommu->fwspec->iommu_priv; > +} > + > +static inline void dev_iommu_priv_set(struct device *dev, void *priv) > +{ > + dev->iommu->fwspec->iommu_priv = priv; > +} > + > int iommu_probe_device(struct device *dev); > void iommu_release_device(struct device *dev); > > -- > 2.17.1 > _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu