Re: [PATCH/RFC 01/10] iommu/ipmmu-vmsa: Introduce features, break out alias

From: Geert Uytterhoeven
Date: Wed Dec 16 2015 - 03:18:11 EST


Hi Magnus,

On Tue, Dec 15, 2015 at 2:05 PM, Magnus Damm <magnus.damm@xxxxxxxxx> wrote:
> From: Magnus Damm <damm+renesas@xxxxxxxxxxxxx>
>
> 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 <damm+renesas@xxxxxxxxxxxxx>
> ---
>
> 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@xxxxxxxxxxxxxx

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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/