* [Question] PCI ACS is broken for ARM SMMU v3?
@ 2017-08-31 14:21 ` Zhou Wang
0 siblings, 0 replies; 10+ messages in thread
From: Zhou Wang @ 2017-08-31 14:21 UTC (permalink / raw)
To: Alex Williamson, Will Deacon; +Cc: linux-arm-kernel, Linux PCI, wangzhou1
Hi Will and Alex,
pci_request_acs is called in drivers/iommu/arm-smmu-v3.c to set pci_acs_enable.
PCI subsystem tries to enable ACS as below:
pci_device_add
--> pci_init_capabilities
--> pci_enable_acs
in ACPI PCI driver. However, ACPI PCI driver will be called before SMMU v3 driver,
which will lead pci_enable_acs to return directly as pci_acs_enable is not set
before SMMU v3 driver loading.
I think this is a bug, what do you think about this problem?
Best,
Zhou
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Question] PCI ACS is broken for ARM SMMU v3?
@ 2017-08-31 14:21 ` Zhou Wang
0 siblings, 0 replies; 10+ messages in thread
From: Zhou Wang @ 2017-08-31 14:21 UTC (permalink / raw)
To: linux-arm-kernel
Hi Will and Alex,
pci_request_acs is called in drivers/iommu/arm-smmu-v3.c to set pci_acs_enable.
PCI subsystem tries to enable ACS as below:
pci_device_add
--> pci_init_capabilities
--> pci_enable_acs
in ACPI PCI driver. However, ACPI PCI driver will be called before SMMU v3 driver,
which will lead pci_enable_acs to return directly as pci_acs_enable is not set
before SMMU v3 driver loading.
I think this is a bug, what do you think about this problem?
Best,
Zhou
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Question] PCI ACS is broken for ARM SMMU v3?
2017-08-31 14:21 ` Zhou Wang
@ 2017-09-04 12:33 ` Zhou Wang
-1 siblings, 0 replies; 10+ messages in thread
From: Zhou Wang @ 2017-09-04 12:33 UTC (permalink / raw)
To: Alex Williamson, Will Deacon, Lorenzo Pieralisi
Cc: linux-arm-kernel, Linux PCI
+to: Lorenzo
On 2017/8/31 22:21, Zhou Wang wrote:
> Hi Will and Alex,
>
> pci_request_acs is called in drivers/iommu/arm-smmu-v3.c to set pci_acs_enable.
>
> PCI subsystem tries to enable ACS as below:
>
> pci_device_add
> --> pci_init_capabilities
> --> pci_enable_acs
>
> in ACPI PCI driver. However, ACPI PCI driver will be called before SMMU v3 driver,
> which will lead pci_enable_acs to return directly as pci_acs_enable is not set
> before SMMU v3 driver loading.
>
> I think this is a bug, what do you think about this problem?
>
> Best,
> Zhou
>
>
>
>
>
> .
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Question] PCI ACS is broken for ARM SMMU v3?
@ 2017-09-04 12:33 ` Zhou Wang
0 siblings, 0 replies; 10+ messages in thread
From: Zhou Wang @ 2017-09-04 12:33 UTC (permalink / raw)
To: linux-arm-kernel
+to: Lorenzo
On 2017/8/31 22:21, Zhou Wang wrote:
> Hi Will and Alex,
>
> pci_request_acs is called in drivers/iommu/arm-smmu-v3.c to set pci_acs_enable.
>
> PCI subsystem tries to enable ACS as below:
>
> pci_device_add
> --> pci_init_capabilities
> --> pci_enable_acs
>
> in ACPI PCI driver. However, ACPI PCI driver will be called before SMMU v3 driver,
> which will lead pci_enable_acs to return directly as pci_acs_enable is not set
> before SMMU v3 driver loading.
>
> I think this is a bug, what do you think about this problem?
>
> Best,
> Zhou
>
>
>
>
>
> .
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Question] PCI ACS is broken for ARM SMMU v3?
2017-09-04 12:33 ` Zhou Wang
@ 2017-09-04 15:59 ` Lorenzo Pieralisi
-1 siblings, 0 replies; 10+ messages in thread
From: Lorenzo Pieralisi @ 2017-09-04 15:59 UTC (permalink / raw)
To: Zhou Wang; +Cc: Linux PCI, Alex Williamson, Will Deacon, linux-arm-kernel
On Mon, Sep 04, 2017 at 08:33:22PM +0800, Zhou Wang wrote:
> +to: Lorenzo
>
> On 2017/8/31 22:21, Zhou Wang wrote:
> > Hi Will and Alex,
> >
> > pci_request_acs is called in drivers/iommu/arm-smmu-v3.c to set pci_acs_enable.
> >
> > PCI subsystem tries to enable ACS as below:
> >
> > pci_device_add
> > --> pci_init_capabilities
> > --> pci_enable_acs
> >
> > in ACPI PCI driver. However, ACPI PCI driver will be called before SMMU v3 driver,
> > which will lead pci_enable_acs to return directly as pci_acs_enable is not set
> > before SMMU v3 driver loading.
> >
> > I think this is a bug, what do you think about this problem?
I think that it is a bug that affects OF/ACPI alike. One way of solving
it is requesting ACS at IORT init following appropriate checks (ie
mappings PCI->IOMMU - that would not solve the OF path though). I can
put together a quick fix, the overall problem needs some thinking
though.
Lorenzo
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Question] PCI ACS is broken for ARM SMMU v3?
@ 2017-09-04 15:59 ` Lorenzo Pieralisi
0 siblings, 0 replies; 10+ messages in thread
From: Lorenzo Pieralisi @ 2017-09-04 15:59 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Sep 04, 2017 at 08:33:22PM +0800, Zhou Wang wrote:
> +to: Lorenzo
>
> On 2017/8/31 22:21, Zhou Wang wrote:
> > Hi Will and Alex,
> >
> > pci_request_acs is called in drivers/iommu/arm-smmu-v3.c to set pci_acs_enable.
> >
> > PCI subsystem tries to enable ACS as below:
> >
> > pci_device_add
> > --> pci_init_capabilities
> > --> pci_enable_acs
> >
> > in ACPI PCI driver. However, ACPI PCI driver will be called before SMMU v3 driver,
> > which will lead pci_enable_acs to return directly as pci_acs_enable is not set
> > before SMMU v3 driver loading.
> >
> > I think this is a bug, what do you think about this problem?
I think that it is a bug that affects OF/ACPI alike. One way of solving
it is requesting ACS at IORT init following appropriate checks (ie
mappings PCI->IOMMU - that would not solve the OF path though). I can
put together a quick fix, the overall problem needs some thinking
though.
Lorenzo
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Question] PCI ACS is broken for ARM SMMU v3?
2017-09-04 15:59 ` Lorenzo Pieralisi
@ 2017-09-05 12:47 ` Zhou Wang
-1 siblings, 0 replies; 10+ messages in thread
From: Zhou Wang @ 2017-09-05 12:47 UTC (permalink / raw)
To: Lorenzo Pieralisi
Cc: Alex Williamson, Will Deacon, linux-arm-kernel, Linux PCI
On 2017/9/4 23:59, Lorenzo Pieralisi wrote:
> On Mon, Sep 04, 2017 at 08:33:22PM +0800, Zhou Wang wrote:
>> +to: Lorenzo
>>
>> On 2017/8/31 22:21, Zhou Wang wrote:
>>> Hi Will and Alex,
>>>
>>> pci_request_acs is called in drivers/iommu/arm-smmu-v3.c to set pci_acs_enable.
>>>
>>> PCI subsystem tries to enable ACS as below:
>>>
>>> pci_device_add
>>> --> pci_init_capabilities
>>> --> pci_enable_acs
>>>
>>> in ACPI PCI driver. However, ACPI PCI driver will be called before SMMU v3 driver,
>>> which will lead pci_enable_acs to return directly as pci_acs_enable is not set
>>> before SMMU v3 driver loading.
>>>
>>> I think this is a bug, what do you think about this problem?
>
> I think that it is a bug that affects OF/ACPI alike. One way of solving
Yes, DT also has this problem.
> it is requesting ACS at IORT init following appropriate checks (ie
> mappings PCI->IOMMU - that would not solve the OF path though). I can
> put together a quick fix, the overall problem needs some thinking
> though.
I am not familiar with IORT init, but can we do it like:
diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64/iort.c
index a3215ee..a6f1a21 100644
--- a/drivers/acpi/arm64/iort.c
+++ b/drivers/acpi/arm64/iort.c
@@ -1131,6 +1131,7 @@ static void __init iort_init_platform_devices(void)
acpi_free_fwnode_static(fwnode);
return;
}
+ pci_request_acs();
}
iort_node = ACPI_ADD_PTR(struct acpi_iort_node, iort_node,
Best,
Zhou
>
> Lorenzo
>
> .
>
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [Question] PCI ACS is broken for ARM SMMU v3?
@ 2017-09-05 12:47 ` Zhou Wang
0 siblings, 0 replies; 10+ messages in thread
From: Zhou Wang @ 2017-09-05 12:47 UTC (permalink / raw)
To: linux-arm-kernel
On 2017/9/4 23:59, Lorenzo Pieralisi wrote:
> On Mon, Sep 04, 2017 at 08:33:22PM +0800, Zhou Wang wrote:
>> +to: Lorenzo
>>
>> On 2017/8/31 22:21, Zhou Wang wrote:
>>> Hi Will and Alex,
>>>
>>> pci_request_acs is called in drivers/iommu/arm-smmu-v3.c to set pci_acs_enable.
>>>
>>> PCI subsystem tries to enable ACS as below:
>>>
>>> pci_device_add
>>> --> pci_init_capabilities
>>> --> pci_enable_acs
>>>
>>> in ACPI PCI driver. However, ACPI PCI driver will be called before SMMU v3 driver,
>>> which will lead pci_enable_acs to return directly as pci_acs_enable is not set
>>> before SMMU v3 driver loading.
>>>
>>> I think this is a bug, what do you think about this problem?
>
> I think that it is a bug that affects OF/ACPI alike. One way of solving
Yes, DT also has this problem.
> it is requesting ACS at IORT init following appropriate checks (ie
> mappings PCI->IOMMU - that would not solve the OF path though). I can
> put together a quick fix, the overall problem needs some thinking
> though.
I am not familiar with IORT init, but can we do it like:
diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64/iort.c
index a3215ee..a6f1a21 100644
--- a/drivers/acpi/arm64/iort.c
+++ b/drivers/acpi/arm64/iort.c
@@ -1131,6 +1131,7 @@ static void __init iort_init_platform_devices(void)
acpi_free_fwnode_static(fwnode);
return;
}
+ pci_request_acs();
}
iort_node = ACPI_ADD_PTR(struct acpi_iort_node, iort_node,
Best,
Zhou
>
> Lorenzo
>
> .
>
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [Question] PCI ACS is broken for ARM SMMU v3?
2017-09-05 12:47 ` Zhou Wang
@ 2017-09-06 9:55 ` Lorenzo Pieralisi
-1 siblings, 0 replies; 10+ messages in thread
From: Lorenzo Pieralisi @ 2017-09-06 9:55 UTC (permalink / raw)
To: Zhou Wang; +Cc: Linux PCI, Alex Williamson, Will Deacon, linux-arm-kernel
On Tue, Sep 05, 2017 at 08:47:15PM +0800, Zhou Wang wrote:
> On 2017/9/4 23:59, Lorenzo Pieralisi wrote:
> > On Mon, Sep 04, 2017 at 08:33:22PM +0800, Zhou Wang wrote:
> >> +to: Lorenzo
> >>
> >> On 2017/8/31 22:21, Zhou Wang wrote:
> >>> Hi Will and Alex,
> >>>
> >>> pci_request_acs is called in drivers/iommu/arm-smmu-v3.c to set pci_acs_enable.
> >>>
> >>> PCI subsystem tries to enable ACS as below:
> >>>
> >>> pci_device_add
> >>> --> pci_init_capabilities
> >>> --> pci_enable_acs
> >>>
> >>> in ACPI PCI driver. However, ACPI PCI driver will be called before SMMU v3 driver,
> >>> which will lead pci_enable_acs to return directly as pci_acs_enable is not set
> >>> before SMMU v3 driver loading.
> >>>
> >>> I think this is a bug, what do you think about this problem?
> >
> > I think that it is a bug that affects OF/ACPI alike. One way of solving
>
> Yes, DT also has this problem.
>
> > it is requesting ACS at IORT init following appropriate checks (ie
> > mappings PCI->IOMMU - that would not solve the OF path though). I can
> > put together a quick fix, the overall problem needs some thinking
> > though.
>
> I am not familiar with IORT init, but can we do it like:
>
> diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64/iort.c
> index a3215ee..a6f1a21 100644
> --- a/drivers/acpi/arm64/iort.c
> +++ b/drivers/acpi/arm64/iort.c
> @@ -1131,6 +1131,7 @@ static void __init iort_init_platform_devices(void)
> acpi_free_fwnode_static(fwnode);
> return;
> }
> + pci_request_acs();
> }
>
> iort_node = ACPI_ADD_PTR(struct acpi_iort_node, iort_node,
>
Yep, will send something similar shortly.
Thanks,
Lorenzo
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Question] PCI ACS is broken for ARM SMMU v3?
@ 2017-09-06 9:55 ` Lorenzo Pieralisi
0 siblings, 0 replies; 10+ messages in thread
From: Lorenzo Pieralisi @ 2017-09-06 9:55 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Sep 05, 2017 at 08:47:15PM +0800, Zhou Wang wrote:
> On 2017/9/4 23:59, Lorenzo Pieralisi wrote:
> > On Mon, Sep 04, 2017 at 08:33:22PM +0800, Zhou Wang wrote:
> >> +to: Lorenzo
> >>
> >> On 2017/8/31 22:21, Zhou Wang wrote:
> >>> Hi Will and Alex,
> >>>
> >>> pci_request_acs is called in drivers/iommu/arm-smmu-v3.c to set pci_acs_enable.
> >>>
> >>> PCI subsystem tries to enable ACS as below:
> >>>
> >>> pci_device_add
> >>> --> pci_init_capabilities
> >>> --> pci_enable_acs
> >>>
> >>> in ACPI PCI driver. However, ACPI PCI driver will be called before SMMU v3 driver,
> >>> which will lead pci_enable_acs to return directly as pci_acs_enable is not set
> >>> before SMMU v3 driver loading.
> >>>
> >>> I think this is a bug, what do you think about this problem?
> >
> > I think that it is a bug that affects OF/ACPI alike. One way of solving
>
> Yes, DT also has this problem.
>
> > it is requesting ACS at IORT init following appropriate checks (ie
> > mappings PCI->IOMMU - that would not solve the OF path though). I can
> > put together a quick fix, the overall problem needs some thinking
> > though.
>
> I am not familiar with IORT init, but can we do it like:
>
> diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64/iort.c
> index a3215ee..a6f1a21 100644
> --- a/drivers/acpi/arm64/iort.c
> +++ b/drivers/acpi/arm64/iort.c
> @@ -1131,6 +1131,7 @@ static void __init iort_init_platform_devices(void)
> acpi_free_fwnode_static(fwnode);
> return;
> }
> + pci_request_acs();
> }
>
> iort_node = ACPI_ADD_PTR(struct acpi_iort_node, iort_node,
>
Yep, will send something similar shortly.
Thanks,
Lorenzo
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2017-09-06 9:55 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-31 14:21 [Question] PCI ACS is broken for ARM SMMU v3? Zhou Wang
2017-08-31 14:21 ` Zhou Wang
2017-09-04 12:33 ` Zhou Wang
2017-09-04 12:33 ` Zhou Wang
2017-09-04 15:59 ` Lorenzo Pieralisi
2017-09-04 15:59 ` Lorenzo Pieralisi
2017-09-05 12:47 ` Zhou Wang
2017-09-05 12:47 ` Zhou Wang
2017-09-06 9:55 ` Lorenzo Pieralisi
2017-09-06 9:55 ` Lorenzo Pieralisi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.