Re: [PATCH 02/13] iommu: Move bus setup to IOMMU device registration

2022-04-23 Thread Lu Baolu
On 2022/4/23 17:00, Lu Baolu wrote: On 2022/4/23 16:51, Lu Baolu wrote: On 2022/4/23 16:37, Robin Murphy wrote: On 2022-04-23 09:01, Lu Baolu wrote: Hi Robin, On 2022/4/19 15:20, Robin Murphy wrote: On 2022-04-19 00:37, Lu Baolu wrote: On 2022/4/19 6:09, Robin Murphy wrote: On 2022-04-16

Re: [PATCH 02/13] iommu: Move bus setup to IOMMU device registration

2022-04-23 Thread Lu Baolu
On 2022/4/23 16:51, Lu Baolu wrote: On 2022/4/23 16:37, Robin Murphy wrote: On 2022-04-23 09:01, Lu Baolu wrote: Hi Robin, On 2022/4/19 15:20, Robin Murphy wrote: On 2022-04-19 00:37, Lu Baolu wrote: On 2022/4/19 6:09, Robin Murphy wrote: On 2022-04-16 01:04, Lu Baolu wrote: On 2022/4/14

Re: [PATCH 02/13] iommu: Move bus setup to IOMMU device registration

2022-04-23 Thread Lu Baolu
On 2022/4/23 16:37, Robin Murphy wrote: On 2022-04-23 09:01, Lu Baolu wrote: Hi Robin, On 2022/4/19 15:20, Robin Murphy wrote: On 2022-04-19 00:37, Lu Baolu wrote: On 2022/4/19 6:09, Robin Murphy wrote: On 2022-04-16 01:04, Lu Baolu wrote: On 2022/4/14 20:42, Robin Murphy wrote: @@

Re: [PATCH 02/13] iommu: Move bus setup to IOMMU device registration

2022-04-23 Thread Robin Murphy
On 2022-04-23 09:01, Lu Baolu wrote: Hi Robin, On 2022/4/19 15:20, Robin Murphy wrote: On 2022-04-19 00:37, Lu Baolu wrote: On 2022/4/19 6:09, Robin Murphy wrote: On 2022-04-16 01:04, Lu Baolu wrote: On 2022/4/14 20:42, Robin Murphy wrote: @@ -1883,27 +1900,12 @@ static int

Re: [PATCH 02/13] iommu: Move bus setup to IOMMU device registration

2022-04-23 Thread Lu Baolu
Hi Robin, On 2022/4/19 15:20, Robin Murphy wrote: On 2022-04-19 00:37, Lu Baolu wrote: On 2022/4/19 6:09, Robin Murphy wrote: 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

Re: [PATCH 02/13] iommu: Move bus setup to IOMMU device registration

2022-04-22 Thread Robin Murphy
On 2022-04-22 19:37, Krishna Reddy wrote: Good effort to isolate bus config from smmu drivers. Reviewed-By: Krishna Reddy Thanks! I have an orthogonal question here. Can the following code handle the case, where different buses have different type of SMMU instances(like one bus has SMMUv2

RE: [PATCH 02/13] iommu: Move bus setup to IOMMU device registration

2022-04-22 Thread Krishna Reddy via iommu
Good effort to isolate bus config from smmu drivers. Reviewed-By: Krishna Reddy I have an orthogonal question here. Can the following code handle the case, where different buses have different type of SMMU instances(like one bus has SMMUv2 and another bus has SMMUv3)? If it need to handle the

Re: [PATCH 02/13] iommu: Move bus setup to IOMMU device registration

2022-04-19 Thread Lu Baolu
On 2022/4/19 15:20, Robin Murphy wrote: On 2022-04-19 00:37, Lu Baolu wrote: On 2022/4/19 6:09, Robin Murphy wrote: 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

Re: [PATCH 02/13] iommu: Move bus setup to IOMMU device registration

2022-04-19 Thread Robin Murphy
On 2022-04-19 00:37, Lu Baolu wrote: On 2022/4/19 6:09, Robin Murphy wrote: 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

Re: [PATCH 02/13] iommu: Move bus setup to IOMMU device registration

2022-04-18 Thread Lu Baolu
On 2022/4/19 6:09, Robin Murphy wrote: 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

Re: [PATCH 02/13] iommu: Move bus setup to IOMMU device registration

2022-04-18 Thread Robin Murphy
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 =

Re: [PATCH 02/13] iommu: Move bus setup to IOMMU device registration

2022-04-15 Thread Lu Baolu
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; -

[PATCH 02/13] iommu: Move bus setup to IOMMU device registration

2022-04-14 Thread Robin Murphy
Move the bus setup to iommu_device_register(). This should allow bus_iommu_probe() to be correctly replayed for multiple IOMMU instances, and leaves bus_set_iommu() as a glorfied no-op to be cleaned up next. Note that although the handling of errors from bus_iommu_probe() looks inadequate, it is