[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1d9a2146-9e48-ba97-d049-5d2332ebbd3a@arm.com>
Date: Mon, 18 Apr 2022 23:09:36 +0100
From: Robin Murphy <robin.murphy@....com>
To: Lu Baolu <baolu.lu@...ux.intel.com>, joro@...tes.org,
will@...nel.org
Cc: iommu@...ts.linux-foundation.org, sven@...npeter.dev,
robdclark@...il.com, m.szyprowski@...sung.com,
yong.wu@...iatek.com, mjrosato@...ux.ibm.com,
gerald.schaefer@...ux.ibm.com, zhang.lyra@...il.com,
thierry.reding@...il.com, vdumpa@...dia.com,
jean-philippe@...aro.org, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 02/13] iommu: Move bus setup to IOMMU device registration
On 2022-04-16 01:04, Lu Baolu wrote:
> On 2022/4/14 20:42, Robin Murphy wrote:
>> @@ -1883,27 +1900,12 @@ static int iommu_bus_init(struct bus_type *bus)
>> */
>> int bus_set_iommu(struct bus_type *bus, const struct iommu_ops *ops)
>> {
>> - int err;
>> -
>> - if (ops == NULL) {
>> - bus->iommu_ops = NULL;
>> - return 0;
>> - }
>> -
>> - if (bus->iommu_ops != NULL)
>> + if (bus->iommu_ops && ops && bus->iommu_ops != ops)
>> return -EBUSY;
>> bus->iommu_ops = ops;
>
> Do we still need to keep above lines in bus_set_iommu()?
It preserves the existing behaviour until each callsite and its
associated error handling are removed later on, which seems like as good
a thing to do as any. Since I'm already relaxing iommu_device_register()
to a warn-but-continue behaviour while it keeps the bus ops on
life-support internally, I figured not changing too much at once would
make it easier to bisect any potential issues arising from this first step.
Thanks,
Robin.
Powered by blists - more mailing lists