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=-9.5 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,URIBL_BLOCKED,USER_AGENT_GIT 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 801C8C432C0 for ; Fri, 22 Nov 2019 10:58:49 +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 5196720679 for ; Fri, 22 Nov 2019 10:58:49 +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="tZrmxDqs" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5196720679 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 3538888197; Fri, 22 Nov 2019 10:58:49 +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 SpR7Aio5yigh; Fri, 22 Nov 2019 10:58:48 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by whitealder.osuosl.org (Postfix) with ESMTP id 985CF86B6B; Fri, 22 Nov 2019 10:58:48 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 747EEC1DD8; Fri, 22 Nov 2019 10:58:48 +0000 (UTC) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 8D79FC18DA for ; Fri, 22 Nov 2019 10:58:46 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 79F5188B4B for ; Fri, 22 Nov 2019 10:58:46 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nSiaLGlg3-8T for ; Fri, 22 Nov 2019 10:58:46 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ed1-f67.google.com (mail-ed1-f67.google.com [209.85.208.67]) by hemlock.osuosl.org (Postfix) with ESMTPS id B86CE88B3D for ; Fri, 22 Nov 2019 10:58:45 +0000 (UTC) Received: by mail-ed1-f67.google.com with SMTP id a67so5579066edf.11 for ; Fri, 22 Nov 2019 02:58:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=lDs5y1/lUK+eWeeJx//ERXKdVvxWdj4EMLwCwstQME4=; b=tZrmxDqsZ1RxyI07RNeundpwyg3krx2pcdHCNpZvL3eVD3KsQ239cK0WPxnijQt1Sx Fs/hoURodhjYShc3UsRO8wvWP3TJghstOvwU0hqvTLFGlHfjPbK+N8DC9RWKjJr0OSfG U8/SeO0cY0wZsBiqU23iCYDvR8R/mftguKFjWVo1gq4EDGNowS6VNXbBbPpDaZ6ANKju QvHqIx0HkGQc9XfDWtkRsWeWzQvhDGRGubK/9H01T5zo/uIfdNyzFvyaivP26qcnRGV1 2W+UM6kD51rYLCCVA698kX5jZc+fgUZ9zv8aIXlsnfVKBPQMWGC6BGoWZw80BqSyjx13 75PQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=lDs5y1/lUK+eWeeJx//ERXKdVvxWdj4EMLwCwstQME4=; b=aLtN1IjyXNT0VHxSk6SjQNzbgLgdwNZweW1+YMXd7H6zh5EA91TN5xrOEuvIi7xUlR pX9SYYXOG4LIvx1pgoTYCyE5ma9ue9kz2XLa5siQMwHU5OfT2W8G4ad82LzZb1T2GH5n kcvu4Ffb20rqXFDg73rFcTefGcKNMRQzKq4fJFKe0w4PT4a+jb1yppkMOV+tJthG5suD /s+W96WLNbwzze82+Ox5vYuVHrrA54C8bSzTpO7NmzklPuUDxh+agGVkgGe8LwbwIeie gBni1Rou+Ufz3mVdHOnCLPRnNXYzu78T1cy47LI3+zmoVBu4L9H/y0S9Ab53IxdHxTYR Otlg== X-Gm-Message-State: APjAAAU6cR17FaSYXcm3dNgbnw0shSWRMgfviv1Cy2sWojKmg0T3qVuk d9J3YSfP6myC8XbFyiKmgAQ47d4XpHs= X-Google-Smtp-Source: APXvYqz63MumbBUd6GIRd7d2nXdQzJtqYQvwS0Q1xjmH0yv+JY/99rcdr1f7XN3ibul7iFA5Jzo61w== X-Received: by 2002:adf:9f43:: with SMTP id f3mr17102828wrg.76.1574419864067; Fri, 22 Nov 2019 02:51:04 -0800 (PST) Received: from localhost.localdomain (xdsl-188-155-204-106.adslplus.ch. [188.155.204.106]) by smtp.gmail.com with ESMTPSA id o133sm2088197wmb.4.2019.11.22.02.51.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Nov 2019 02:51:03 -0800 (PST) From: Jean-Philippe Brucker To: linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, iommu@lists.linux-foundation.org, virtualization@lists.linux-foundation.org, linux-pci@vger.kernel.org, virtio-dev@lists.oasis-open.org Subject: [RFC 10/13] iommu/virtio: Update IORT fwnode Date: Fri, 22 Nov 2019 11:49:57 +0100 Message-Id: <20191122105000.800410-11-jean-philippe@linaro.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191122105000.800410-1-jean-philippe@linaro.org> References: <20191122105000.800410-1-jean-philippe@linaro.org> MIME-Version: 1.0 Cc: kevin.tian@intel.com, mst@redhat.com, gregkh@linuxfoundation.org, sudeep.holla@arm.com, rjw@rjwysocki.net, sebastien.boeuf@intel.com, jacob.jun.pan@intel.com, guohanjun@huawei.com, bhelgaas@google.com, jasowang@redhat.com, lenb@kernel.org 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" When the virtio-iommu uses the PCI transport and the topology is described with IORT, register the PCI fwnode with IORT. Signed-off-by: Jean-Philippe Brucker --- drivers/iommu/virtio-iommu.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/iommu/virtio-iommu.c b/drivers/iommu/virtio-iommu.c index 8efa368134c0..9847552faecc 100644 --- a/drivers/iommu/virtio-iommu.c +++ b/drivers/iommu/virtio-iommu.c @@ -7,6 +7,7 @@ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt +#include #include #include #include @@ -989,6 +990,8 @@ static int viommu_set_fwnode(struct viommu_dev *viommu) set_primary_fwnode(dev, fwnode); } + /* Tell IORT about a PCI device's fwnode */ + iort_iommu_update_fwnode(dev, dev->fwnode); iommu_device_set_fwnode(&viommu->iommu, dev->fwnode); return 0; } @@ -1000,6 +1003,8 @@ static void viommu_clear_fwnode(struct viommu_dev *viommu) if (!dev->fwnode) return; + iort_iommu_update_fwnode(dev, NULL); + if (is_software_node(dev->fwnode)) { struct fwnode_handle *fwnode = dev->fwnode; -- 2.24.0 _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu