Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754613AbbLPISB (ORCPT ); Wed, 16 Dec 2015 03:18:01 -0500 Received: from mail-oi0-f44.google.com ([209.85.218.44]:36020 "EHLO mail-oi0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754445AbbLPIR7 (ORCPT ); Wed, 16 Dec 2015 03:17:59 -0500 MIME-Version: 1.0 In-Reply-To: <20151215130518.13535.13822.sendpatchset@little-apple> References: <20151215130508.13535.26186.sendpatchset@little-apple> <20151215130518.13535.13822.sendpatchset@little-apple> Date: Wed, 16 Dec 2015 09:17:59 +0100 X-Google-Sender-Auth: UsvJrorlwRT08BRgvRsyXDAPiCQ Message-ID: Subject: Re: [PATCH/RFC 01/10] iommu/ipmmu-vmsa: Introduce features, break out alias From: Geert Uytterhoeven To: Magnus Damm Cc: iommu@lists.linux-foundation.org, Laurent Pinchart , Geert Uytterhoeven , Linux-sh list , Joerg Roedel , "linux-kernel@vger.kernel.org" , Simon Horman 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: 1643 Lines: 47 Hi Magnus, On Tue, Dec 15, 2015 at 2:05 PM, Magnus Damm wrote: > From: Magnus Damm > > Introduce struct ipmmu_features to track various hardware > and software implementation changes inside the driver for > various kinds of IPMMU hardware. Add use_ns_alias_offset > as a first example of a feature to control if the secure > register bank offset should be used or not. > > Signed-off-by: Magnus Damm > --- > > drivers/iommu/ipmmu-vmsa.c | 34 ++++++++++++++++++++++++++++------ > 1 file changed, 28 insertions(+), 6 deletions(-) > > --- 0009/drivers/iommu/ipmmu-vmsa.c > +++ work/drivers/iommu/ipmmu-vmsa.c 2015-12-15 13:41:22.600513000 +0900 > @@ -31,6 +31,10 @@ > > #define IPMMU_CTX_MAX 1 > > +struct ipmmu_features { > + bool use_ns_alias_offset; > +}; Given you're adding more than 4 features in this series, you may want to consider using an unsigned int bitfield instead. That way you could also store it directly in of_device_id.data, if you want. 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/