From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robin Murphy Subject: Re: [PATCH v2 1/4] iommu/arm-smmu: Introduce wrapper for writeq/readq Date: Thu, 22 Aug 2019 15:30:24 +0100 Message-ID: <4ef6512d-701f-4fe8-8173-5f659dab0d32@arm.com> References: <20190711150242.25290-1-gregory.clement@bootlin.com> <20190711150242.25290-2-gregory.clement@bootlin.com> <20190820120848.2m6gytilrpil4stu@willie-the-truck> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20190820120848.2m6gytilrpil4stu@willie-the-truck> Content-Language: en-GB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Will Deacon , Gregory CLEMENT Cc: devicetree@vger.kernel.org, Jason Cooper , Andrew Lunn , Antoine Tenart , Catalin Marinas , Hanna Hawa , Will Deacon , linux-kernel@vger.kernel.org, Maxime Chevallier , Nadav Haklai , iommu@lists.linux-foundation.org, Rob Herring , Thomas Petazzoni , =?UTF-8?Q?Miqu=c3=a8l_Raynal?= , linux-arm-kernel@lists.infradead.org, Sebastian Hesselbarth List-Id: devicetree@vger.kernel.org On 20/08/2019 13:08, Will Deacon wrote: > Hi Gregory, Hanna, > > On Thu, Jul 11, 2019 at 05:02:39PM +0200, Gregory CLEMENT wrote: >> From: Hanna Hawa >> >> This patch introduces the smmu_writeq_relaxed/smmu_readq_relaxed >> helpers, as preparation to add specific Marvell work-around for >> accessing 64 bits width registers of ARM SMMU. >> >> Signed-off-by: Hanna Hawa >> Signed-off-by: Gregory CLEMENT >> --- >> drivers/iommu/arm-smmu.c | 36 +++++++++++++++++++++++++++--------- >> 1 file changed, 27 insertions(+), 9 deletions(-) > > Sorry for the delay in replying to this -- Robin's been reworking the driver > so that implementation quirks can be specified more cleanly. Please can you > take a look at: > > https://git.kernel.org/pub/scm/linux/kernel/git/will/linux.git/log/?h=for-joerg/arm-smmu/refactoring > > and try to respin your patches on top of that? Right, the arm_smmu_impl design was specifically anticipating this quirk as well - it should just be a case of a cfg_probe hook to hide the features which can't work, plus {read,write}_reg64 hooks to override any remaining 64-bit accesses with the explicit hi_lo_* variants, munged together (either statically or dynamically) with the standard MMU-500 hooks. Robin.