From patchwork Thu Jun 24 17:17:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 12342667 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=-12.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,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 1B32EC49EA5 for ; Thu, 24 Jun 2021 17:20:28 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 D6FFF613EA for ; Thu, 24 Jun 2021 17:20:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D6FFF613EA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=TjQ5df0bh8UbtIEiOLVX/uWIQuMC5llFNMCmCJvC8Gs=; b=ioeMzWsFR0QbEE ILL3vtNPOoHFx3IYHuWctm7TVwYbVaMDXcux1vzvUqftkL/tjz/Nd1nYycqH0hxQ95qRrcYMZ6vrw zzmOxF7yRGq5fLCxA/T+ZdWWiIZ2HYmUz6xDzpMxiWKv5eK6MrkPFB//5EmLxkmOJS6mb5bi6FxQZ sBgeqU3lCsFhQ4Un551kSQyxcZgUo5uXsvGVcl5j6DlVASI9+5XVF9G9qgmp7o/SjsCIW6SDSUij3 oza3ddbYzsLeNsTdRupNUYOvta7fYI8/SmSRiCPiM4jiPofiNr11HXXBNxgXrsZlyeez49ObUQBNA YH0pwUgAUToQb/LwmwUw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lwSzn-00FbgI-Oj; Thu, 24 Jun 2021 17:18:31 +0000 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lwSzh-00Fbdj-JQ for linux-arm-kernel@lists.infradead.org; Thu, 24 Jun 2021 17:18:29 +0000 Received: by mail-pl1-x634.google.com with SMTP id v12so3294010plo.10 for ; Thu, 24 Jun 2021 10:18:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=XWNwGk9GjelPq0lKH2dxtU8MIJBYkaGELFI1ssqXZTY=; b=axtIMnpDVdkjRLH4nX+f7Hd/a94NGXarbbRZp9pKXtT6TpJu7knFwnxzm/B9XB9U5q ADPy7uRDHNfp2pRHlI7Plj6WxokjAj3ZwsFS7vr4aASPUFiyzw/o62bdKWis8u+5oBW4 Vikei2WzAFO6FSuuPDtR+qxX1leJS0yoWKXB8= 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:mime-version :content-transfer-encoding; bh=XWNwGk9GjelPq0lKH2dxtU8MIJBYkaGELFI1ssqXZTY=; b=KMaXtCMz07/ISZN/a8hAePWtwjs0ETakX6EfEcVjT/O/QChICKy8YMZBAxHT7zFJo+ m/E2mM/7osiRZlYbmB0MKbbTThjzuaQoA1oDQyv4THWAAhXHcs3toE1BMUyTsmRcLQFs Flu5aiRGEgkxqB+7+LfErwgj0/S5WXUapLW9icOIar6BeCMf1CI9URYWmWY+7kNFPqko c7W2yzjkY58aYedUrmLoJ/UfUnMe5UQOZXU+8pGIyNUtOgA5pJ4RDAs6p7MztfTAw+qt 9r4D5ZoKtzcIwC4JmbFZQjggiBxL4EDgaTkJGXMyoGxF0ip1zi8iIBaBukey+1mrA0Sx NyCA== X-Gm-Message-State: AOAM532Ck+lTqZ/f/o5gl7sHaSQFVFyNVXbTkXKoIQ3dj+rshos53XyQ fmvxTCbMLgG+XxWuPrx6whM4lg== X-Google-Smtp-Source: ABdhPJyDDZAEVmImuYqq+gOLGeBE++WkFuVJuSBHo1MrycS/xGTXZy6Yo8US/jLhBHewMabX0cuR6g== X-Received: by 2002:a17:90b:4d8d:: with SMTP id oj13mr6232430pjb.184.1624555104750; Thu, 24 Jun 2021 10:18:24 -0700 (PDT) Received: from tictac2.mtv.corp.google.com ([2620:15c:202:201:fd74:62bc:19e3:a43b]) by smtp.gmail.com with ESMTPSA id z9sm3365960pfa.2.2021.06.24.10.18.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Jun 2021 10:18:24 -0700 (PDT) From: Douglas Anderson To: will@kernel.org, robin.murphy@arm.com, joro@8bytes.org, bjorn.andersson@linaro.org, ulf.hansson@linaro.org, adrian.hunter@intel.com, bhelgaas@google.com Subject: [PATCH v2 0/3] iommu: Enable non-strict DMA on QCom SD/MMC Date: Thu, 24 Jun 2021 10:17:56 -0700 Message-Id: <20210624171759.4125094-1-dianders@chromium.org> X-Mailer: git-send-email 2.32.0.93.g670b81a890-goog MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210624_101825_706205_CF3EF9FE X-CRM114-Status: GOOD ( 15.13 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-doc@vger.kernel.org, Peter Zijlstra , linux-pci@vger.kernel.org, Konrad Dybcio , Jordan Crouse , Thierry Reding , joel@joelfernandes.org, rajatja@google.com, robdclark@chromium.org, saiprakash.ranjan@codeaurora.org, saravanak@google.com, Jonathan Corbet , quic_c_gdjako@quicinc.com, linux-arm-kernel@lists.infradead.org, Viresh Kumar , vbadigan@codeaurora.org, "Paul E. McKenney" , linux-arm-msm@vger.kernel.org, john.garry@huawei.com, Nicolin Chen , sonnyrao@chromium.org, Vlastimil Babka , Randy Dunlap , linux-mmc@vger.kernel.org, Douglas Anderson , linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, Andrew Morton , "Maciej W. Rozycki" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The goal of this patch series is to get better SD/MMC performance on Qualcomm eMMC controllers and in generally nudge us forward on the path of allowing some devices to be in strict mode and others to be in non-strict mode. This patch series doesn't save the world but hopefully at least moves us in the right direction while accomplishing something useful. Specifically: - No attempt is made to touch the PCI subsystem or cleanup the way that it requests strict vs. non-strict. - No fully generic mechanism is come up with that makes it super easy for everyone to be in non-strict mode. This patch conflicts with a few other patch series that are in flight. I've tried to call them out "after the cut" in patches. I assume other in flight patches will land before this one, so I'd expect to send a rebased version when that happens, assuming that this series isn't NAKed into the ground. Changes in v2: - No longer based on changes adding strictness to "struct device" - Updated kernel-parameters docs. - Patch moving check for strictness in arm-smmu new for v2. - Now accomplish the goal by putting rules in the IOMMU driver. - Reworded commit message to clarify things pointed out by Greg. Douglas Anderson (3): iommu: Add per-domain strictness and combine with the global default iommu/arm-smmu: Check for strictness after calling impl->init_context() mmc: sdhci-msm: Request non-strict IOMMU mode .../admin-guide/kernel-parameters.txt | 5 ++- drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 19 ++++++++ drivers/iommu/arm/arm-smmu/arm-smmu.c | 6 +-- drivers/iommu/iommu.c | 43 +++++++++++++++---- include/linux/iommu.h | 7 +++ 5 files changed, 67 insertions(+), 13 deletions(-)