Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp2818550iob; Mon, 16 May 2022 06:59:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwdIP7BWhOP8SSci72S+eSqtFTFGQJGNVPxiCPvmkAXg2K96hGmEKD3B/U9LfatJ+M3NQn5 X-Received: by 2002:a63:115b:0:b0:3c1:eb46:6f5 with SMTP id 27-20020a63115b000000b003c1eb4606f5mr15627052pgr.277.1652709547712; Mon, 16 May 2022 06:59:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652709547; cv=none; d=google.com; s=arc-20160816; b=eVOGfsxyoBTNRngwUb6v85o4pDMNffuCGsz4jnIVoyoRlYhomF+4uLD1y2Hzeysb/B bWvuOlnLOy/OSY3tnzOtAU1hSFcAFNw3AjeYVHna12jcBOeltZM3FdBMqBJYwLqvw7nR EUuTbNKoKlIHmZt7mnZ7CnkNsNNJOzL9TkKKqmwwyvmFsDeppkMktAOXm/yllNK29lc0 rBFtCK8OF1wCF9cAYtx/1Ai2yWuwjmUtTThslznp78JsGnMYS6+saklaZ7pzY/IaTSan /d2iDVtRuVMGyqzzLp9TZ4HlDZVqtRzYXgVWdQ0tDj4K3fMBgLjf0X2XvUx9n/HxFjdh nbJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=fWkwQsmctjZuzNgYxnAKr5+YEBZD6Vnzh24HSXGD4s4=; b=t8cvZe06zdIVsT6gGU2ohF3q2O/3s2NkCKigjBLZUsrj1+TcH+3J0eaX55pTuq8JLp kE62CBsGxjHqWw+VKNBB4mXY8V93Q4OxT8KLEahIAzcmpfKV7FdY1cHAgxXBKlBAZ9Rn gAhWeQdYP7jiHVMTE8dmb515qBJRimKggQ3Us0wQ0UdVTkksQQY1HDCrWC6ANQGu7heY gXAARENEUevMTgCKvZZVyeKMKXcVROYDjaclhJkKZ1wpknBgdzl8ICkHCxJRpOSpagC/ 0wENuD/Rgn4G662H+j2tqOUOIKYpQWgjWL9vj2HfNaoEoxPwEOR9SUAPDAXNQUAfytRI W1YQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@kapsi.fi header.s=20161220 header.b="PyvF5wt/"; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y18-20020a63ce12000000b003db68cb9d71si14723453pgf.407.2022.05.16.06.58.57; Mon, 16 May 2022 06:59:07 -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=fail header.i=@kapsi.fi header.s=20161220 header.b="PyvF5wt/"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240582AbiEPKNm (ORCPT + 99 others); Mon, 16 May 2022 06:13:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238546AbiEPKNj (ORCPT ); Mon, 16 May 2022 06:13:39 -0400 Received: from mail.kapsi.fi (mail.kapsi.fi [IPv6:2001:67c:1be8::25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 43A73B7C8; Mon, 16 May 2022 03:13:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=kapsi.fi; s=20161220; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:Cc:To:Subject:MIME-Version:Date:Message-ID:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=fWkwQsmctjZuzNgYxnAKr5+YEBZD6Vnzh24HSXGD4s4=; b=PyvF5wt/y7YPONshkgm9QvVDBg ofst1pJP0Wz+jy0MpOKmeONA+ui5V0E/rUyTSJz5lluFvjphLQUOW4m1TGTcb8rZizQ+fbHYWLWew /xQ9G4Psi7BDZQKEb4Zb39YdHsYSq0ksZ7L5J8D4EnKoSu4jl0vWKeCQyJdNgVu95mq5GeMNGHw0h nR+FiSXWtwr57cFQ5zPIPUbnAIEyV2xkoYwqpCgENWf13AKUlbX9cCwb3iku5748UtSaRtn/7+A5m E296JSCsnKVU5cbYlofpOk9K7Pdq6V9+++V2vUUERzQpS/IhCSKIn0a0MczNTBD+9xjWeWDoBglda 6ZW8LDuA==; Received: from 91-158-25-70.elisa-laajakaista.fi ([91.158.25.70] helo=[192.168.1.10]) by mail.kapsi.fi with esmtpsa (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nqXjD-0000OD-HN; Mon, 16 May 2022 13:13:27 +0300 Message-ID: <4a170997-c893-1788-dcaa-8ed2193146ae@kapsi.fi> Date: Mon, 16 May 2022 13:13:27 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.1 Subject: Re: [PATCH v5 5/9] iommu/arm-smmu: Attach to host1x context device bus Content-Language: en-US To: Will Deacon Cc: thierry.reding@gmail.com, jonathanh@nvidia.com, joro@8bytes.org, robin.murphy@arm.com, robh+dt@kernel.org, krzysztof.kozlowski@canonical.com, linux-tegra@vger.kernel.org, dri-devel@lists.freedesktop.org, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Mikko Perttunen References: <20220516085258.1227691-1-cyndis@kapsi.fi> <20220516085258.1227691-6-cyndis@kapsi.fi> <20220516100721.GA1927@willie-the-truck> From: Mikko Perttunen In-Reply-To: <20220516100721.GA1927@willie-the-truck> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 91.158.25.70 X-SA-Exim-Mail-From: cyndis@kapsi.fi X-SA-Exim-Scanned: No (on mail.kapsi.fi); SAEximRunCond expanded to false X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,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 On 5/16/22 13:07, Will Deacon wrote: > On Mon, May 16, 2022 at 11:52:54AM +0300, cyndis@kapsi.fi wrote: >> From: Mikko Perttunen >> >> Set itself as the IOMMU for the host1x context device bus, containing >> "dummy" devices used for Host1x context isolation. >> >> Signed-off-by: Mikko Perttunen >> --- >> drivers/iommu/arm/arm-smmu/arm-smmu.c | 13 +++++++++++++ >> 1 file changed, 13 insertions(+) >> >> diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu.c b/drivers/iommu/arm/arm-smmu/arm-smmu.c >> index 568cce590ccc..9ff54eaecf81 100644 >> --- a/drivers/iommu/arm/arm-smmu/arm-smmu.c >> +++ b/drivers/iommu/arm/arm-smmu/arm-smmu.c >> @@ -39,6 +39,7 @@ >> >> #include >> #include >> +#include >> >> #include "arm-smmu.h" >> >> @@ -2053,8 +2054,20 @@ static int arm_smmu_bus_init(struct iommu_ops *ops) >> goto err_reset_pci_ops; >> } >> #endif >> +#ifdef CONFIG_TEGRA_HOST1X_CONTEXT_BUS >> + if (!iommu_present(&host1x_context_device_bus_type)) { >> + err = bus_set_iommu(&host1x_context_device_bus_type, ops); >> + if (err) >> + goto err_reset_fsl_mc_ops; >> + } >> +#endif >> + >> return 0; >> >> +err_reset_fsl_mc_ops: __maybe_unused; >> +#ifdef CONFIG_FSL_MC_BUS >> + bus_set_iommu(&fsl_mc_bus_type, NULL); >> +#endif > > bus_set_iommu() is going away: > > https://lore.kernel.org/r/cover.1650890638.git.robin.murphy@arm.com > > Will Thanks for the heads-up. Robin had pointed out that this work was ongoing but I hadn't seen the patches yet. I'll look into it. Mikko >>