Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4406075ybb; Tue, 14 Apr 2020 06:44:06 -0700 (PDT) X-Google-Smtp-Source: APiQypJuex847kkzrds0/WBK6t+ISJRzP1XJxkfy6CiuABiZ7PjkaSecsI+3xp2PczX8YoudL2vz X-Received: by 2002:a05:6402:1a35:: with SMTP id be21mr14023939edb.354.1586871846468; Tue, 14 Apr 2020 06:44:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586871846; cv=none; d=google.com; s=arc-20160816; b=yLjQeOtx8NXJxiAbegRlYDIjXiBsATAqZRi7krAOg5oE1rA/4txO7ntx7vYmdwq0Q5 w+NuycvkoZHmgnT0CPFj4GwkxN1ojcjMKgCnwlxcb68FcLMgStfAut55CJYyuP/opedg x1DrQV/3H/8vg1G6CW0DXp2KOdcFhHBfbOqLPghvnLg/Qcy96GezPq6oF1NmOjKM8oZD wVbdDhcr7Hz1sHNdmWfKKBeyUbblLQb2J8wDuG621kNo6E8BfQVgpBUmTEYTpHukxXPK OvXKVtXSZJcSfLdhIdWPR9FlsESZSkXalx7KKyIObfYgfJY69kmtI1GbFMKrH4NGg2wN 4ZHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=zXGNQQP4X3VX81J+kdAMQQHyCz96RnLdOdy+FSwZIMU=; b=CPi6VwN0xi2c6W9QTig4zHYZdkixq8dqkjqiUSdotJyHXqv5Mdq05lUJ32FfiiIdsK VRiWHzXuKeo+QMPGR6jIa1gip19FgLvGddWRzHGQiNq3xYNnDC3Pqe4DBJOKy0+5eFMk 7tG9uGZ0XMYEOCMDwNLwoqgBOQHTEFdHYQJyMshEL+KoPJAwjiLTbqutsc42LXXZ6coY RXPY6qpfMbr2zRvf3XxWd+PWlxB/Ua+Yus8jyg50X1Ne/oQI271dTM7Z+mVPHVh3JhOp PSmoMcXi1iD8p5rXGt/sUGl99Idtq6PnfNtlGNyzHBrZk38cPlo45dTso6wo+05UTeT0 NPsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=c4eu2TsE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j33si7018898edd.593.2020.04.14.06.43.42; Tue, 14 Apr 2020 06:44:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=c4eu2TsE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389961AbgDMXN2 (ORCPT + 99 others); Mon, 13 Apr 2020 19:13:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35982 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S2389929AbgDMXN0 (ORCPT ); Mon, 13 Apr 2020 19:13:26 -0400 Received: from mail-lf1-x144.google.com (mail-lf1-x144.google.com [IPv6:2a00:1450:4864:20::144]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 33943C0A3BE2 for ; Mon, 13 Apr 2020 16:13:25 -0700 (PDT) Received: by mail-lf1-x144.google.com with SMTP id t11so7881501lfe.4 for ; Mon, 13 Apr 2020 16:13:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=zXGNQQP4X3VX81J+kdAMQQHyCz96RnLdOdy+FSwZIMU=; b=c4eu2TsEdrQ5/05Gmd4JKvLX1E9PqFEvEqAm++vbEwjW5ViflcKiCykyDvWlCsMKip Ln9fa5zS5CzsUazSEwGQuS6uLeUtQXeuUsRs8rHx/ZSgb7malGhvFYaTAW3dqdWegXYF NDNnFSbGrDUe+wgoG3LKqKNwlWDWgWIuod6Ds= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=zXGNQQP4X3VX81J+kdAMQQHyCz96RnLdOdy+FSwZIMU=; b=PaBEF0QnY6tOxiuy4zJw1QEQP0bz+o+ontWUYOu4lYztFq5efj4X1WXkG/9f2x/q5/ 0N6sGNel6TxZTjKIRSPeHxcFNtkeIEvX1heaEeRJBoTpfKWOKbXI043TUZjQ40O/FtAy inC/CH20sFji5jD1sSdp2AaNppNeT9XR7bmvAdY7/7PX9+HidHaSrH0SbtjdoY17MrM4 DerxQ3ZuZfwr17p6sZM3CeSKPS/6xnfyDORh/z0/1H/vriavBDe6t0r5AQb3mTJk4+Br VAVS4L3AXRuONzoOY3UbbmiGnkQye7yDOwEKHcmYfRGUEy4qiF8kR1ycBVl0bXUeKwSR Ai4Q== X-Gm-Message-State: AGi0PuZ+y0c0PfxLVG4/aFGjHrq68fj+CVHY3TSTujH+t/84XGMoEs+C qUFLXts35ZJ77FVljDIMYSyQzSfc0js= X-Received: by 2002:a05:6512:d1:: with SMTP id c17mr11956217lfp.167.1586819603206; Mon, 13 Apr 2020 16:13:23 -0700 (PDT) Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com. [209.85.167.50]) by smtp.gmail.com with ESMTPSA id k21sm4542169ljc.81.2020.04.13.16.13.21 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 13 Apr 2020 16:13:22 -0700 (PDT) Received: by mail-lf1-f50.google.com with SMTP id t11so7881435lfe.4 for ; Mon, 13 Apr 2020 16:13:21 -0700 (PDT) X-Received: by 2002:a19:4a03:: with SMTP id x3mr11835226lfa.159.1586819601453; Mon, 13 Apr 2020 16:13:21 -0700 (PDT) MIME-Version: 1.0 References: <813cc5b2da10c27db982254b274bf26008a9e6da.1579692800.git.saiprakash.ranjan@codeaurora.org> In-Reply-To: <813cc5b2da10c27db982254b274bf26008a9e6da.1579692800.git.saiprakash.ranjan@codeaurora.org> From: Evan Green Date: Mon, 13 Apr 2020 16:12:44 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 2/2] iommu/arm-smmu: Allow client devices to select direct mapping To: Sai Prakash Ranjan Cc: Will Deacon , Robin Murphy , Joerg Roedel , Jordan Crouse , Rob Clark , iommu@lists.linux-foundation.org, linux-arm Mailing List , LKML , linux-arm-msm , Stephen Boyd , Matthias Kaehlcke , Bjorn Andersson , Rajendra Nayak , Tomasz Figa Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 22, 2020 at 3:48 AM Sai Prakash Ranjan wrote: > > From: Jordan Crouse > > Some client devices want to directly map the IOMMU themselves instead > of using the DMA domain. Allow those devices to opt in to direct > mapping by way of a list of compatible strings. > > Signed-off-by: Jordan Crouse > Co-developed-by: Sai Prakash Ranjan > Signed-off-by: Sai Prakash Ranjan > --- > drivers/iommu/arm-smmu-qcom.c | 39 +++++++++++++++++++++++++++++++++++ > drivers/iommu/arm-smmu.c | 3 +++ > drivers/iommu/arm-smmu.h | 5 +++++ > 3 files changed, 47 insertions(+) > > diff --git a/drivers/iommu/arm-smmu-qcom.c b/drivers/iommu/arm-smmu-qcom.c > index 64a4ab270ab7..ff746acd1c81 100644 > --- a/drivers/iommu/arm-smmu-qcom.c > +++ b/drivers/iommu/arm-smmu-qcom.c > @@ -3,6 +3,7 @@ > * Copyright (c) 2019, The Linux Foundation. All rights reserved. > */ > > +#include > #include > > #include "arm-smmu.h" > @@ -11,6 +12,43 @@ struct qcom_smmu { > struct arm_smmu_device smmu; > }; > > +static const struct arm_smmu_client_match_data qcom_adreno = { > + .direct_mapping = true, > +}; > + > +static const struct arm_smmu_client_match_data qcom_mdss = { > + .direct_mapping = true, I don't actually see direct_mapping being used. Shouldn't this member be checked somewhere? -Evan