Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5918723imu; Sun, 20 Jan 2019 23:25:08 -0800 (PST) X-Google-Smtp-Source: ALg8bN5yPIrGJWIoXzbI95O22YTpJ0C3DcC+mkgUqLbIbptX/H5NJtQXgzPNiNz1bZdsMb2JB1HN X-Received: by 2002:a17:902:227:: with SMTP id 36mr29221426plc.140.1548055508811; Sun, 20 Jan 2019 23:25:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548055508; cv=none; d=google.com; s=arc-20160816; b=cjOZ1m4rdttCZGuGUS/YtOnWqJ+ongCaPc85MCdnH+RYwB/3LW5aAlzDXl3Tl15zdw Ok5pmceWHtcnnGTJaYD4tjVaGyyol1yiN4/UtRWa6g4VsTizJQtXi+cMGl1rGdfeEp9x HgOq26g57PKJP/PcfbTXIDMhl7XZRTHTl5RHYX+kNd5zz0s4S2q9eSbysdv3DtlKoTTl y0ozFEhxKaHO8Ir9B1SwUuJ4/G4wxt29flDo9TjRycpzWx7CKWJ9W0YZH9+V9HxyRc8U GP0ZGsBA3rVUgOTKabjNHEclg2//WOd148NNOBGXqoG0DiYZ4QHgVGJC9xd214UoEpkG ZNIQ== 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:dmarc-filter:dkim-signature :dkim-signature; bh=Y1F7ZjV/FsFNJuYd4G9AXKgIC9hZcdkYWSwP8ggf6OM=; b=yZahV85hh19m+hP3jk740o2TOl7tb4wc7KZdRmWbJ4fF0Uyb5KAZptHmai+e5YhQKb PfC1Mv/ZPGIhPR4PH/OmB1NBGrbcfcWRa0/f07QpYuSrJpHiepEFt070fcm9KvjdtJsH 88uL0eZ9flbo09A9drVv4QPIVOIGeInZMHKKYVswp7qfOg852Pc3QvYYn52jJuyX9hDj srRtgAtERuBKdwWZ5u+o9pb52cZkEAAiV2OrD3idDlC94b1TOlITCvlpWGuanuptIEHa XbfaCEfOj3/chLmgn/35w56pk5BIlJ6i3R8g0vBVpt9z979xFxzHMjoWm+2JIEwWiuHo 1OWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=eH+5DAAZ; dkim=pass header.i=@codeaurora.org header.s=default header.b=nCus+WXg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z12si11788483plk.90.2019.01.20.23.24.53; Sun, 20 Jan 2019 23:25:08 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=eH+5DAAZ; dkim=pass header.i=@codeaurora.org header.s=default header.b=nCus+WXg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728291AbfAUHXF (ORCPT + 99 others); Mon, 21 Jan 2019 02:23:05 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:53374 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727634AbfAUHXE (ORCPT ); Mon, 21 Jan 2019 02:23:04 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 16D6460878; Mon, 21 Jan 2019 06:05:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1548050744; bh=Y1F7ZjV/FsFNJuYd4G9AXKgIC9hZcdkYWSwP8ggf6OM=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=eH+5DAAZa80tNpDhIJ3O21BXzbQJOc9B2oMUBHQY/OWVO58ph2En4p7dwJzGn7bEJ t2YiieGxpdGKwisBehn8go0wzSOEuZH59BWZwCjBg/hLA8eXbESr1N8PI/JEND8KtR +zXRe1DfaGPVjuaad23/9yP3y7z8zR3UDmweXsB0= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED autolearn=no autolearn_force=no version=3.4.0 Received: from mail-ed1-f45.google.com (mail-ed1-f45.google.com [209.85.208.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: vivek.gautam@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 4F4006083E; Mon, 21 Jan 2019 06:05:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1548050743; bh=Y1F7ZjV/FsFNJuYd4G9AXKgIC9hZcdkYWSwP8ggf6OM=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=nCus+WXg4sXwWN/Xeb7jzLA9onnM5nP/4M4GXsSk6O+xtqSYUgWA3dauiwEo5JyN1 xXv52V2epWfJbTdOe6MJk1ShzC3Fk4ztNehq46w1+UZxiVYbQk7CxI3aCYm/r3azsf nX4rJuEW0XGNoW78gvegkb64VxEgHtx/nXlQOKww= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 4F4006083E 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 Received: by mail-ed1-f45.google.com with SMTP id h50so15622554ede.5; Sun, 20 Jan 2019 22:05:43 -0800 (PST) X-Gm-Message-State: AJcUukfrlbhJiW4R8rVzROTlZXHfhSGYNYW+jO/8cRyHa4+PUBxL22PM ykpmm62krdNbJKCFTOMD15+DT4ZefHIh7cTdF/8= X-Received: by 2002:aa7:c0d0:: with SMTP id j16mr25116444edp.173.1548050741904; Sun, 20 Jan 2019 22:05:41 -0800 (PST) MIME-Version: 1.0 References: <20190117092718.1396-1-vivek.gautam@codeaurora.org> <20190117092718.1396-3-vivek.gautam@codeaurora.org> <20190120000117.GH26876@brain-police> In-Reply-To: <20190120000117.GH26876@brain-police> From: Vivek Gautam Date: Mon, 21 Jan 2019 11:35:30 +0530 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 2/2] iommu/arm-smmu: Add support for non-coherent page table mappings To: Will Deacon Cc: linux-arm-msm , open list , "list@263.net:IOMMU DRIVERS , Joerg Roedel ," , Robin Murphy , Linux ARM 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 Hi Will, On Sun, Jan 20, 2019 at 5:31 AM Will Deacon wrote: > > On Thu, Jan 17, 2019 at 02:57:18PM +0530, Vivek Gautam wrote: > > Adding a device tree option for arm smmu to enable non-cacheable > > memory for page tables. > > We already enable a smmu feature for coherent walk based on > > whether the smmu device is dma-coherent or not. Have an option > > to enable non-cacheable page table memory to force set it for > > particular smmu devices. > > Hmm, I must be missing something here. What is the difference between this > new property, and simply omitting dma-coherent on the SMMU? So, this is what I understood from the email thread for Last level cache support - Robin pointed to the fact that we may need to add support for setting non-cacheable mappings in the TCR. Currently, we don't do that for SMMUs that omit dma-coherent. We rely on the interconnect to handle the configuration set in TCR, and let interconnect ignore the cacheability if it can't support. Moreover, Robin suggested that we should take care of SMMUs, for which removing snoop latency on walks by making mappings as non-cacheable outweighs the cost of cache maintenance on PTE updates. So, this change adds another property to do this non-cacheable mappings explicitly. As I pointed, omitting 'dma-coherent', and corresponding IO_PGTABLE_QUIRK_NO_DMA' does takes care of few things. Should we handle the TCR settings too with this quirk? Regards Vivek > > Will > _______________________________________________ > iommu mailing list > iommu@lists.linux-foundation.org > https://lists.linuxfoundation.org/mailman/listinfo/iommu -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation