Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1292300

Re: [PATCH 03/06] iommu/ipmmu-vmsa: Break out utlb control function

From Geert Uytterhoeven <geert@linux-m68k.org>
Newsgroups linux.kernel
Subject Re: [PATCH 03/06] iommu/ipmmu-vmsa: Break out utlb control function
Date 2015-12-15 16:50 +0100
Message-ID <qG01t-68o-41@gated-at.bofh.it> (permalink)
References <qFWAy-3Su-1@gated-at.bofh.it> <qFWAz-3Su-27@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Magnus,

On Tue, Dec 15, 2015 at 1:02 PM, Magnus Damm <magnus.damm@gmail.com> wrote:
> --- 0004/drivers/iommu/ipmmu-vmsa.c
> +++ work/drivers/iommu/ipmmu-vmsa.c     2015-12-15 13:17:40.580513000 +0900
> @@ -279,9 +279,18 @@ static void ipmmu_utlb_enable(struct ipm
>  static void ipmmu_utlb_disable(struct ipmmu_vmsa_domain *domain,
>                                unsigned int utlb)
>  {
> -       struct ipmmu_vmsa_device *mmu = domain->mmu;
> +       ipmmu_write(domain->mmu, IMUCTR(utlb), 0);
> +}
> +
> +static void ipmmu_utlb_ctrl(struct ipmmu_vmsa_domain *domain,
> +                           void (*fn)(struct ipmmu_vmsa_domain *,
> +                                      unsigned int utlb), struct device *dev)
> +{
> +       struct ipmmu_vmsa_dev_data *dev_data = get_dev_data(dev);
> +       unsigned int i;
>
> -       ipmmu_write(mmu, IMUCTR(utlb), 0);
> +       for (i = 0; i < dev_data->num_utlbs; ++i)
> +               fn(domain, dev_data->utlbs[i]);
>  }

Unless you have further plans with the "fn" parameter, I would simply pass
a bool enable/disable flag instead of a function pointer.

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/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 00/06] iommu/ipmmu-vmsa: IPMMU multi-arch update Magnus Damm <magnus.damm@gmail.com> - 2015-12-15 13:10 +0100
  [PATCH 06/06] iommu/ipmmu-vmsa: Drop LPAE Kconfig dependency Magnus Damm <magnus.damm@gmail.com> - 2015-12-15 13:10 +0100
    Re: [PATCH 06/06] iommu/ipmmu-vmsa: Drop LPAE Kconfig dependency Laurent Pinchart <laurent.pinchart@ideasonboard.com> - 2015-12-29 01:30 +0100
  [PATCH 05/06] iommu/ipmmu-vmsa: Break out 32-bit ARM mapping code Magnus Damm <magnus.damm@gmail.com> - 2015-12-15 13:10 +0100
    Re: [PATCH 05/06] iommu/ipmmu-vmsa: Break out 32-bit ARM mapping code Laurent Pinchart <laurent.pinchart@ideasonboard.com> - 2015-12-29 01:30 +0100
  [PATCH 02/06] iommu/ipmmu-vmsa: Convert to dev_data Magnus Damm <magnus.damm@gmail.com> - 2015-12-15 13:10 +0100
    Re: [PATCH 02/06] iommu/ipmmu-vmsa: Convert to dev_data Laurent Pinchart <laurent.pinchart@ideasonboard.com> - 2015-12-29 01:10 +0100
  [PATCH 04/06] iommu/ipmmu-vmsa: Rework interrupt code and use bitmap for context Magnus Damm <magnus.damm@gmail.com> - 2015-12-15 13:10 +0100
    Re: [PATCH 04/06] iommu/ipmmu-vmsa: Rework interrupt code and use bitmap for context Laurent Pinchart <laurent.pinchart@ideasonboard.com> - 2015-12-29 01:20 +0100
  [PATCH 01/06] iommu/ipmmu-vmsa: Remove platform data handling Magnus Damm <magnus.damm@gmail.com> - 2015-12-15 13:10 +0100
    Re: [PATCH 01/06] iommu/ipmmu-vmsa: Remove platform data handling Laurent Pinchart <laurent.pinchart@ideasonboard.com> - 2015-12-29 01:10 +0100
  [PATCH 03/06] iommu/ipmmu-vmsa: Break out utlb control function Magnus Damm <magnus.damm@gmail.com> - 2015-12-15 13:10 +0100
    Re: [PATCH 03/06] iommu/ipmmu-vmsa: Break out utlb control function Geert Uytterhoeven <geert@linux-m68k.org> - 2015-12-15 16:50 +0100
      Re: [PATCH 03/06] iommu/ipmmu-vmsa: Break out utlb control function Laurent Pinchart <laurent.pinchart@ideasonboard.com> - 2015-12-29 01:10 +0100

csiph-web