From patchwork Thu Jan 17 09:27:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vivek Gautam X-Patchwork-Id: 10767803 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8455914E5 for ; Thu, 17 Jan 2019 09:27:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 718772ED2D for ; Thu, 17 Jan 2019 09:27:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6453F2ED23; Thu, 17 Jan 2019 09:27:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id F2E0E2ED23 for ; Thu, 17 Jan 2019 09:27:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: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=PUnU1XmTp+mgiwpnnmB3R3+7VuvaSvFOpZNTybIN8x4=; b=X9P RBgNXJW8hFBjHZKMWOM8KUbUGX94/+QiaQLcqHuKVi3MyLKdYRCe12anfV8EAlyh1kFOFZRmWDjb4 kJVCWXEWkUSuXqaLEoLRocpW/TVVRJ5pfcPm4tubRqj2Egacb1j/BV231fJaJ+k/p+Lkp/yVadH3r cNTYWEhy2cDTKFaYyjtUA9Zn9YeueFw1eGUlAZh6wqOt7vXt6QG2B+yA1rh/h8N6YTXGEOHBp9b5i L2DgpEirNhdr8kf7AiP1dwmoWXRroiLyElQfAR/WxcN561IQpW46wIlo+j86LWodEfCPxDRN7Jjln vuiOj3AnJPHdJ4Bg0wL8OJSO12M85rw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gk3xW-0007A5-Q2; Thu, 17 Jan 2019 09:27:34 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gk3xT-00079i-7P for linux-arm-kernel@lists.infradead.org; Thu, 17 Jan 2019 09:27:32 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 8E7616081E; Thu, 17 Jan 2019 09:27:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1547717250; bh=ha3EEdy0k9HNUff6t9j+eSO2ILmrLR5UiUWmfVUPmZU=; h=From:To:Cc:Subject:Date:From; b=fzhplasc4Y4ORa3iZsE/ePbnHcgfqWwcg7KIsaMuCiw1+SUToPN2y7oUwk8P/TxoC doNOyalIjRmYZ5Qel6UiCDCyS0X4bkz1ZZrAXyvNsqHz4UYVuNzpusuJyRjDe6cw1d K3rMBxczeJYJVCzI+Z+yUyX5RdInM0IYKTUk1T2c= Received: from blr-ubuntu-41.ap.qualcomm.com (blr-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.18.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: vivek.gautam@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 3E25F6021A; Thu, 17 Jan 2019 09:27:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1547717250; bh=ha3EEdy0k9HNUff6t9j+eSO2ILmrLR5UiUWmfVUPmZU=; h=From:To:Cc:Subject:Date:From; b=fzhplasc4Y4ORa3iZsE/ePbnHcgfqWwcg7KIsaMuCiw1+SUToPN2y7oUwk8P/TxoC doNOyalIjRmYZ5Qel6UiCDCyS0X4bkz1ZZrAXyvNsqHz4UYVuNzpusuJyRjDe6cw1d K3rMBxczeJYJVCzI+Z+yUyX5RdInM0IYKTUk1T2c= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 3E25F6021A Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=vivek.gautam@codeaurora.org From: Vivek Gautam To: will.deacon@arm.com, robin.murphy@arm.com, joro@8bytes.org, iommu@lists.linux-foundation.org Subject: [PATCH 0/2] iommu/arm: Add support for non-coherent page tables Date: Thu, 17 Jan 2019 14:57:16 +0530 Message-Id: <20190117092718.1396-1-vivek.gautam@codeaurora.org> X-Mailer: git-send-email 2.16.1.72.g5be1f00a9a70 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190117_012731_288877_B4C24CB0 X-CRM114-Status: GOOD ( 11.95 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vivek Gautam , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, tfiga@chromium.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP As discussed in the Qcom system cache support thread [1], it is imperative that we enable the support for non-cacheable page tables for SMMU implementations for which removing snoop latency on walks by making mappings as non-cacheable, outweighs the cost of cache maintenance on PTE updates. This series adds a new SMMU device tree option to let the particular SMMU configuration setup cacheable or non-cacheable mappings for page-tables out of box. We set a new quirk for i/o page tables - IO_PGTABLE_QUIRK_NON_COHERENT, that lets us set different TCR configurations. This quirk enables the non-cacheable page tables for all masters sitting on SMMU. Should this control be available per smmu_domain as each master may have a different perf requirement? Enabling this for the entire SMMU may not be desirable for all masters. [1] https://lore.kernel.org/patchwork/patch/1020906/ Vivek Gautam (2): iommu/io-pgtable-arm: Add support for non-coherent page tables iommu/arm-smmu: Add support for non-coherent page table mappings drivers/iommu/arm-smmu.c | 7 +++++++ drivers/iommu/io-pgtable-arm.c | 17 ++++++++++++----- drivers/iommu/io-pgtable.h | 6 ++++++ 3 files changed, 25 insertions(+), 5 deletions(-)