Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752434AbdCHJzI (ORCPT ); Wed, 8 Mar 2017 04:55:08 -0500 Received: from mail-it0-f66.google.com ([209.85.214.66]:36678 "EHLO mail-it0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752400AbdCHJzE (ORCPT ); Wed, 8 Mar 2017 04:55:04 -0500 MIME-Version: 1.0 In-Reply-To: <148885666392.28553.6653211200015255398.sendpatchset@little-apple> References: <148885660307.28553.995847796823338863.sendpatchset@little-apple> <148885666392.28553.6653211200015255398.sendpatchset@little-apple> From: Geert Uytterhoeven Date: Wed, 8 Mar 2017 10:55:02 +0100 X-Google-Sender-Auth: HWu3uf9ArQ9uxSb5jQaLAwCrK3k Message-ID: Subject: Re: [PATCH v7 06/07] iommu/ipmmu-vmsa: ARM and ARM64 archdata access To: Magnus Damm Cc: Joerg Roedel , Laurent Pinchart , Geert Uytterhoeven , "linux-kernel@vger.kernel.org" , Linux-Renesas , iommu@lists.linux-foundation.org, Simon Horman , Robin Murphy , 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: 1585 Lines: 53 Hi Magnus, On Tue, Mar 7, 2017 at 4:17 AM, 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. to support > Signed-off-by: Magnus Damm > Reviewed-by: Joerg Roedel Reviewed-by: Geert Uytterhoeven > --- 0010/drivers/iommu/ipmmu-vmsa.c > +++ work/drivers/iommu/ipmmu-vmsa.c 2017-03-06 19:26:26.070607110 +0900 > @@ -72,6 +72,25 @@ static struct ipmmu_vmsa_domain *to_vmsa > return container_of(dom, struct ipmmu_vmsa_domain, io_domain); > } > > +#if defined(CONFIG_ARM) || defined(CONFIG_ARM64) > +static struct ipmmu_vmsa_archdata *to_archdata(struct device *dev) > +{ > + return dev->archdata.iommu; > +} > +static void set_archdata(struct device *dev, struct ipmmu_vmsa_archdata *p) > +{ > + dev->archdata.iommu = p; > +} > +#else #else /* compile testing */ > +static struct ipmmu_vmsa_archdata *to_archdata(struct device *dev) > +{ > + return NULL; > +} > +static void set_archdata(struct device *dev, struct ipmmu_vmsa_archdata *p) > +{ > +} > +#endif Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds