Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751884AbdCIDod (ORCPT ); Wed, 8 Mar 2017 22:44:33 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:34316 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751762AbdCIDoa (ORCPT ); Wed, 8 Mar 2017 22:44:30 -0500 MIME-Version: 1.0 In-Reply-To: References: <148885660307.28553.995847796823338863.sendpatchset@little-apple> <148885666392.28553.6653211200015255398.sendpatchset@little-apple> From: Magnus Damm Date: Thu, 9 Mar 2017 12:44:27 +0900 Message-ID: Subject: Re: [PATCH v7 06/07] iommu/ipmmu-vmsa: ARM and ARM64 archdata access To: Robin Murphy Cc: joro , Laurent Pinchart , Geert Uytterhoeven , linux-kernel , Linux-Renesas , iommu@lists.linux-foundation.org, Simon Horman , Marek Szyprowski Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1259 Lines: 29 Hi Robin, On Wed, Mar 8, 2017 at 9:48 PM, Robin Murphy wrote: > On 07/03/17 03:17, Magnus Damm wrote: >> From: Magnus Damm >> >> Not all architectures have an iommu member in their archdata, so >> use #ifdefs support build with COMPILE_TEST on any architecture. > > I have a feeling I might be repeating myself, but ipmmu_vmsa_archdata > looks to be trivially convertible to iommu_fwspec, which I strongly > encourage, not least because it would obviate bodges like this. Yeah, I think it should be possible to use iommu_fwspec for this purpose. The question is when to do it. =) I actually looked into it recently, but then realised that for this to work then due to code sharing I need to make use of iommu_fwspec on both 32-bit and 64-bit ARM. So it requires rework of the existing IPMMU for 32-bit ARM (including hairy legacy CONFIG_IOMMU_DMA=n code). I was actually thinking of doing some rework of 32-bit ARM IPMMU code anyway (I suspect iommu_device_* conversion caused breakage) and it probably has to happen on top of current -next. I would also like to start reducing burden of forward porting all these patches, and stirring up the ground does not really help much there... Cheers, / magnus