Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp3687406pxt; Tue, 10 Aug 2021 09:05:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzQohRxOU5Z54gG0akBRU59Bu0eYvOZa0P66dsFlengBxDG3UDaKfeAvxmmOK3RRcgbmyyt X-Received: by 2002:a17:907:104f:: with SMTP id oy15mr11093816ejb.46.1628611510625; Tue, 10 Aug 2021 09:05:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628611510; cv=none; d=google.com; s=arc-20160816; b=qdS3K11PpJdM/SRevUT6XFt09juhuJK6WaL82BHAU00mijUxXfQxlKEkwXSuBGjwVV wEn2E1t5EHK2zqD7JRsa1fHKZNVYjvNZi0D1AP+U2pwjW3n72C/Zop6WIQaARFxYeJ0p ej5JgNuBt27q4dsxuUXj/Q/sG4GjFBeMCgVZqbrXvGeMF1awzkVANk0JdCQDxryZDmfb 4atV8FZHfyDbRbdIq98PmwkE3Vhw1xVyI410CmBP+Ec//giu/dXpFOjIPQb3jdq652LC XwQ9vdtVUpp4DlANNrnEcEG4EAjReDq1uPZa0WcTJcaRBiki6BwiUN5HSwZnmkQn/HOn bfBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:message-id:references:in-reply-to :subject:cc:to:from:date:content-transfer-encoding:mime-version :sender:dkim-signature; bh=60vq8IZG6c8Gs1cuSWU7oo0+DBbyu3c+ZH4aBblmawM=; b=C9GSo73eecK9flOfUs9fxs79OIKZswqu2PGiFBR+oX4yorTCCY//0fKH0GncI+mgUs Zt+HnUhqO+zZuIvKb/Dl7syzY2tH35VGJXbM82HzSDTwXzrPjmZbH9TL/hTpnVqIZYMB hrFwZvjh8uF0iXDWlJXHHBtY7PjaA7JxrY9PqxMHCgpxgdeJYOmKt8GOe60u8znTBZ0m TY/l5FYTFLbUx86PZb4kmcR2vsPH4RSkGUuDLLLGq8eN+HjId4NKGMafkVafFTLWY+dK xxktRaKvlMT3ggbddBPEfo1FXVNJtkxKEPImCtCE0w4n57MrY4yjrEecevQoNa0DNKUv Xu8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=rbVZayTC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cf27si7291051edb.374.2021.08.10.09.04.46; Tue, 10 Aug 2021 09:05:10 -0700 (PDT) Received-SPF: pass (google.com: 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=@mg.codeaurora.org header.s=smtp header.b=rbVZayTC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236647AbhHJJzS (ORCPT + 99 others); Tue, 10 Aug 2021 05:55:18 -0400 Received: from m43-7.mailgun.net ([69.72.43.7]:27176 "EHLO m43-7.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233594AbhHJJzR (ORCPT ); Tue, 10 Aug 2021 05:55:17 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1628589295; h=Message-ID: References: In-Reply-To: Subject: Cc: To: From: Date: Content-Transfer-Encoding: Content-Type: MIME-Version: Sender; bh=60vq8IZG6c8Gs1cuSWU7oo0+DBbyu3c+ZH4aBblmawM=; b=rbVZayTCtFns0Pdq6lPRZt/MJx6OVTJHNxy7n6J9hPhpa6RiiYc4SJ8bguE1cNFZbVUq8lLw 4kEYtIE2BqRsdy/pBua2vtaV1VOmmZprq/OxYw06sdhYqN9Ly3A1lLtHOr3A45nAyoh0//4t Gg5uvv7MONzU3qC3UCmd9VxnnhU= X-Mailgun-Sending-Ip: 69.72.43.7 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n06.prod.us-east-1.postgun.com with SMTP id 61124ce476c3a9a172929ded (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Tue, 10 Aug 2021 09:54:44 GMT Sender: saiprakash.ranjan=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 49A69C43148; Tue, 10 Aug 2021 09:54:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: saiprakash.ranjan) by smtp.codeaurora.org (Postfix) with ESMTPSA id 05E71C4338A; Tue, 10 Aug 2021 09:54:41 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 10 Aug 2021 15:24:41 +0530 From: Sai Prakash Ranjan To: Will Deacon Cc: Rob Clark , "Isaac J. Manjarres" , freedreno , Jordan Crouse , David Airlie , linux-arm-msm , Akhil P Oommen , dri-devel , Linux Kernel Mailing List , "list@263.net:IOMMU DRIVERS , Joerg Roedel ," , Kristian H Kristensen , Daniel Vetter , Sean Paul , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , Robin Murphy Subject: Re: [Freedreno] [PATCH 0/3] iommu/drm/msm: Allow non-coherent masters to use system cache In-Reply-To: <20210810091619.GA2494@willie-the-truck> References: <20210802105544.GA27657@willie-the-truck> <20210802151409.GE28735@willie-the-truck> <20210809145651.GC1458@willie-the-truck> <20210809170508.GB1589@willie-the-truck> <20210809174022.GA1840@willie-the-truck> <76bfd0b4248148dfbf9d174ddcb4c2a2@codeaurora.org> <20210810091619.GA2494@willie-the-truck> Message-ID: <5b6953c5afdf566c248a2da59f91d9de@codeaurora.org> X-Sender: saiprakash.ranjan@codeaurora.org User-Agent: Roundcube Webmail/1.3.9 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021-08-10 14:46, Will Deacon wrote: > On Mon, Aug 09, 2021 at 11:17:40PM +0530, Sai Prakash Ranjan wrote: >> On 2021-08-09 23:10, Will Deacon wrote: >> > On Mon, Aug 09, 2021 at 10:18:21AM -0700, Rob Clark wrote: >> > > On Mon, Aug 9, 2021 at 10:05 AM Will Deacon wrote: >> > > > On Mon, Aug 09, 2021 at 09:57:08AM -0700, Rob Clark wrote: >> > > > > But I suppose we could call it instead IOMMU_QCOM_LLC or something >> > > > > like that to make it more clear that it is not necessarily something >> > > > > that would work with a different outer level cache implementation? >> > > > >> > > > ... or we could just deal with the problem so that other people can reuse >> > > > the code. I haven't really understood the reluctance to solve this properly. >> > > > >> > > > Am I missing some reason this isn't solvable? >> > > >> > > Oh, was there another way to solve it (other than foregoing setting >> > > INC_OCACHE in the pgtables)? Maybe I misunderstood, is there a >> > > corresponding setting on the MMU pgtables side of things? >> > >> > Right -- we just need to program the CPU's MMU with the matching memory >> > attributes! It's a bit more fiddly if you're just using ioremap_wc() >> > though, as it's usually the DMA API which handles the attributes under >> > the >> > hood. >> > >> > Anyway, sorry, I should've said that explicitly earlier on. We've done >> > this >> > sort of thing in the Android tree so I assumed Sai knew what needed to >> > be >> > done and then I didn't think to explain to you :( >> > >> >> Right I was aware of that but even in the android tree there is no >> user :) > > I'm assuming there are vendor modules using it there, otherwise we > wouldn't > have been asked to put it in. Since you work at Qualcomm, maybe you > could > talk to your colleagues (Isaac and Patrick) directly? > Right I will check with them regarding the vendor modules in android. >> I think we can't have a new memory type without any user right in >> upstream >> like android tree? > > Correct. But I don't think we should be adding IOMMU_* anything > upstream > if we don't have a user. > Agreed, once we have the fix for GPU crash I can continue further on using this properly. Thanks, Sai -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation