From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 27191C52D7C for ; Fri, 23 Aug 2024 15:24:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=6RRAmFo9t8jG9JJufXnjhg7wAYzzrYM3/ZJ9WF/DbfE=; b=HpVaE8M4vasz/Tz9bXus2npkIA 9YflsfY3CVPyrl6ngFCvNkGgZtJHXM+rhv1qrwuh77+lszDmN9P8mMwzSo6kv1Wlyfut14gA3Glpf OEvyiGZZqFS+Tjt64UQHtsKHTiLmL6Z35qQFmdbj3hq0kaL2vi9RRJw92WmZRWbnGjvXpyDNe5qAY /ZMxl/Tx3sytWU/7hBR+Ct8xl1aaXcO6g37vErtqbj25WBjQ5gkmULbjpFpP9zMBecQLzSGrHtVWZ S7ZGrN0z4NR3e1iuiHN2CBH9n8nXWrZSxMTW2qmlPXQ5dgVwZIlMqjMnsaSE3gSWpw1DRrwmeKta5 rV2eURjA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1shW8k-0000000HHow-40mg; Fri, 23 Aug 2024 15:23:50 +0000 Received: from nyc.source.kernel.org ([2604:1380:45d1:ec00::3]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1shW6t-0000000HHPl-1L9h for linux-arm-kernel@lists.infradead.org; Fri, 23 Aug 2024 15:21:56 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 91910A42770; Fri, 23 Aug 2024 15:21:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 30861C32786; Fri, 23 Aug 2024 15:21:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1724426513; bh=z/xlA997HrrjimGdMRbL+kogTgPfZTfDFAxkUoJUHPQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Z028GTwJDVdrD1dy3EjvhFp7/d7QDBryXCZodsxMo5qKnH3PWsQ/4+Wm6eTEOplEp kyBxZ8jGqrPeG1Xt8UjF3BY6dJ8CDvKsug5GIhKRmTuCV4NrVNBw8ZaqqiDNn028+N NVE4bPZFx8i7vIG9zzXW4Gy2cPxD11soRQ0JnmfdL+f5+tDk7wneORN70sI2Sa0XGl z207z0JmHzApJt8hYOYpgbu5My/ukNBLeso2W2h8bw5s2cXb4TcR+6oAOuUZgzBM13 VU1auf4S0UCnI1WUEFGc62AHSLTSq7/h8ij4AjUY+ZmCIeixPeD8mntVJWiTS4ZRVS Ksi6NBAv4Cdhg== Date: Fri, 23 Aug 2024 16:21:48 +0100 From: Will Deacon To: Trilok Soni Cc: Dmitry Baryshkov , Konrad Dybcio , Rob Clark , Konrad Dybcio , Bjorn Andersson , Robin Murphy , Joerg Roedel , Marijn Suijten , iommu@lists.linux.dev, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Konrad Dybcio , Sumit Semwal Subject: Re: [PATCH] iommu/arm-smmu-qcom: Work around SDM845 Adreno SMMU w/ 16K pages Message-ID: <20240823152147.GA396@willie-the-truck> References: <20240729-topic-845_gpu_smmu-v1-1-8e372abbde41@kernel.org> <3332c732-4555-46bf-af75-aa36ce2d58df@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240823_082155_441304_AD2BE949 X-CRM114-Status: GOOD ( 14.69 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Jul 30, 2024 at 10:16:00AM -0700, Trilok Soni wrote: > On 7/30/2024 1:50 AM, Dmitry Baryshkov wrote: > >>>>>> SDM845's Adreno SMMU is unique in that it actually advertizes support > >>>>>> for 16K (and 32M) pages, which doesn't hold for newer SoCs. > > My question is about forbidding 16k pages for sdm845 only or for other > > chips too. I'd assume that it shouldn't also work for other smmu-v2 > > platforms. > > Yes, my understanding was that SMMUv2 based IPs doesn't have 16k support > and it is only starting from SMMUv3. I'm not sure about that. The architecture doc for SMMUv2 talks about the AArch64 translation regime in section 1.5 and bit 13 of SMMU_IDR2 says: | PTFSv8_16kB, bit[13] | Support for 16KB translation granule size. The possible values of this bit are: | 0 The 16KB translation granule is not supported. | 1 The 16KB translation granule is supported. | In SMMUv1, this bit is reserved. so I think Konrad's patch is about right, but if you want to extend it to cover other implementations then that's fine too. Will