[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170210161122.GB18474@suse.de>
Date: Fri, 10 Feb 2017 17:11:22 +0100
From: Joerg Roedel <jroedel@...e.de>
To: Robin Murphy <robin.murphy@....com>
Cc: Joerg Roedel <joro@...tes.org>, Will Deacon <will.deacon@....com>,
Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
Alex Williamson <alex.williamson@...hat.com>,
David Woodhouse <dwmw2@...radead.org>,
iommu@...ts.linux-foundation.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 06/11] iommu: Add iommu_device_set_fwnode() interface
On Fri, Feb 10, 2017 at 04:03:07PM +0000, Robin Murphy wrote:
> Yeah, on reflection explicit initialisation is certainly easier to read
> than a bunch of arguments handled implicitly by register(), but then
> from that angle, even more clear would be to simply have the drivers
> write the relevant struct members directly - I'd be quite happy with
> that, and we then don't have to add another setter to iommu.h for every
> new struct member (and risk it looking like Java code...)
Yeah, that was my first approach. But there is the Intel VT-d anomaly,
where a part of the driver can be built-in (dmar.c) with
CONFIG_IOMMU_API=N. In this case 'struct iommu_device' is empty, and
trying to access the members directly doesn't compile anymore.
I have to look if this anomaly could be removed, then it is probably the
best to set the struct members directly without wrapper functions.
Joerg
Powered by blists - more mailing lists