[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1823351.xcsKyrzciK@avalon>
Date: Tue, 29 Dec 2015 02:05:17 +0200
From: Laurent Pinchart <laurent.pinchart@...asonboard.com>
To: Geert Uytterhoeven <geert@...ux-m68k.org>
Cc: Magnus Damm <magnus.damm@...il.com>,
iommu@...ts.linux-foundation.org,
Laurent Pinchart <laurent.pinchart+renesas@...asonboard.com>,
Geert Uytterhoeven <geert+renesas@...der.be>,
Linux-sh list <linux-sh@...r.kernel.org>,
Joerg Roedel <joro@...tes.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Simon Horman <horms+renesas@...ge.net.au>
Subject: Re: [PATCH 03/06] iommu/ipmmu-vmsa: Break out utlb control function
Hi Magnus,
On Tuesday 15 December 2015 16:48:42 Geert Uytterhoeven wrote:
> On Tue, Dec 15, 2015 at 1:02 PM, Magnus Damm <magnus.damm@...il.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.
I agree with Geert. What's your plan here ?
--
Regards,
Laurent Pinchart
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists