* [PATCH v2 for-4.9] xen/arm: Don't unflatten DT when booting with ACPI
@ 2017-04-21 13:12 Punit Agrawal
2017-04-21 20:47 ` Stefano Stabellini
0 siblings, 1 reply; 3+ messages in thread
From: Punit Agrawal @ 2017-04-21 13:12 UTC (permalink / raw)
To: xen-devel; +Cc: julien.grall, Punit Agrawal, sstabellini
Unflattening the device tree when booting with "acpi=force" leads to the
following stack trace on AMD Seattle platform -
(XEN) Xen call trace:
(XEN) [<0000000000204bfc>] dt_irq_translate+0x48/0x58 (PC)
(XEN) [<0000000000204f5c>] dt_device_get_irq+0x34/0x38 (LR)
(XEN) [<0000000000251a08>] platform_get_irq+0x14/0x44
(XEN) [<00000000002952bc>] smmu.c#arm_smmu_dt_init+0x190/0x100c
(XEN) [<0000000000299310>] device_init+0xa8/0xdc
(XEN) [<00000000002950f0>] iommu_hardware_setup+0x34/0x68
(XEN) [<0000000000294ef0>] iommu_setup+0x48/0x1c8
(XEN) [<000000000029cecc>] start_xen+0xb94/0xd34
(XEN) [<00000083fbba91dc>] 00000083fbba91dc
The problem arises due to the unflattened device tree being
unconditionally used in iommu_hardware_setup().
Let's re-arrange the code without changing boot order to unflatten the
device tree only when acpi is disabled.
Signed-off-by: Punit Agrawal <punit.agrawal@arm.com>
Reviewed-by: Julien Grall <julien.grall@arm.com>
---
v1 -> v2
* Changed tab to spaces
* Added tag
---
xen/arch/arm/setup.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
index 92a2de6b70..046905f6c3 100644
--- a/xen/arch/arm/setup.c
+++ b/xen/arch/arm/setup.c
@@ -753,16 +753,18 @@ void __init start_xen(unsigned long boot_phys_offset,
/* Parse the ACPI tables for possible boot-time configuration */
acpi_boot_table_init();
+ end_boot_allocator();
+
+ vm_init();
+
if ( acpi_disabled )
+ {
printk("Booting using Device Tree\n");
+ dt_unflatten_host_device_tree();
+ }
else
printk("Booting using ACPI\n");
- end_boot_allocator();
-
- vm_init();
- dt_unflatten_host_device_tree();
-
init_IRQ();
platform_init();
--
2.11.0
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH v2 for-4.9] xen/arm: Don't unflatten DT when booting with ACPI
2017-04-21 13:12 [PATCH v2 for-4.9] xen/arm: Don't unflatten DT when booting with ACPI Punit Agrawal
@ 2017-04-21 20:47 ` Stefano Stabellini
2017-04-24 8:28 ` Punit Agrawal
0 siblings, 1 reply; 3+ messages in thread
From: Stefano Stabellini @ 2017-04-21 20:47 UTC (permalink / raw)
To: Punit Agrawal; +Cc: julien.grall, sstabellini, xen-devel
On Fri, 21 Apr 2017, Punit Agrawal wrote:
> Unflattening the device tree when booting with "acpi=force" leads to the
> following stack trace on AMD Seattle platform -
>
> (XEN) Xen call trace:
> (XEN) [<0000000000204bfc>] dt_irq_translate+0x48/0x58 (PC)
> (XEN) [<0000000000204f5c>] dt_device_get_irq+0x34/0x38 (LR)
> (XEN) [<0000000000251a08>] platform_get_irq+0x14/0x44
> (XEN) [<00000000002952bc>] smmu.c#arm_smmu_dt_init+0x190/0x100c
> (XEN) [<0000000000299310>] device_init+0xa8/0xdc
> (XEN) [<00000000002950f0>] iommu_hardware_setup+0x34/0x68
> (XEN) [<0000000000294ef0>] iommu_setup+0x48/0x1c8
> (XEN) [<000000000029cecc>] start_xen+0xb94/0xd34
> (XEN) [<00000083fbba91dc>] 00000083fbba91dc
>
> The problem arises due to the unflattened device tree being
> unconditionally used in iommu_hardware_setup().
>
> Let's re-arrange the code without changing boot order to unflatten the
> device tree only when acpi is disabled.
>
> Signed-off-by: Punit Agrawal <punit.agrawal@arm.com>
> Reviewed-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
and committed
> ---
> v1 -> v2
> * Changed tab to spaces
> * Added tag
> ---
> xen/arch/arm/setup.c | 12 +++++++-----
> 1 file changed, 7 insertions(+), 5 deletions(-)
>
> diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
> index 92a2de6b70..046905f6c3 100644
> --- a/xen/arch/arm/setup.c
> +++ b/xen/arch/arm/setup.c
> @@ -753,16 +753,18 @@ void __init start_xen(unsigned long boot_phys_offset,
> /* Parse the ACPI tables for possible boot-time configuration */
> acpi_boot_table_init();
>
> + end_boot_allocator();
> +
> + vm_init();
> +
> if ( acpi_disabled )
> + {
> printk("Booting using Device Tree\n");
> + dt_unflatten_host_device_tree();
> + }
> else
> printk("Booting using ACPI\n");
>
> - end_boot_allocator();
> -
> - vm_init();
> - dt_unflatten_host_device_tree();
> -
> init_IRQ();
>
> platform_init();
> --
> 2.11.0
>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH v2 for-4.9] xen/arm: Don't unflatten DT when booting with ACPI
2017-04-21 20:47 ` Stefano Stabellini
@ 2017-04-24 8:28 ` Punit Agrawal
0 siblings, 0 replies; 3+ messages in thread
From: Punit Agrawal @ 2017-04-24 8:28 UTC (permalink / raw)
To: Stefano Stabellini; +Cc: julien.grall, xen-devel
Stefano Stabellini <sstabellini@kernel.org> writes:
> On Fri, 21 Apr 2017, Punit Agrawal wrote:
>> Unflattening the device tree when booting with "acpi=force" leads to the
>> following stack trace on AMD Seattle platform -
>>
>> (XEN) Xen call trace:
>> (XEN) [<0000000000204bfc>] dt_irq_translate+0x48/0x58 (PC)
>> (XEN) [<0000000000204f5c>] dt_device_get_irq+0x34/0x38 (LR)
>> (XEN) [<0000000000251a08>] platform_get_irq+0x14/0x44
>> (XEN) [<00000000002952bc>] smmu.c#arm_smmu_dt_init+0x190/0x100c
>> (XEN) [<0000000000299310>] device_init+0xa8/0xdc
>> (XEN) [<00000000002950f0>] iommu_hardware_setup+0x34/0x68
>> (XEN) [<0000000000294ef0>] iommu_setup+0x48/0x1c8
>> (XEN) [<000000000029cecc>] start_xen+0xb94/0xd34
>> (XEN) [<00000083fbba91dc>] 00000083fbba91dc
>>
>> The problem arises due to the unflattened device tree being
>> unconditionally used in iommu_hardware_setup().
>>
>> Let's re-arrange the code without changing boot order to unflatten the
>> device tree only when acpi is disabled.
>>
>> Signed-off-by: Punit Agrawal <punit.agrawal@arm.com>
>> Reviewed-by: Julien Grall <julien.grall@arm.com>
>
>
> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
>
> and committed
Thanks Julien and Stefano for the quick turn around!
Cheers,
Punit
>
>
>> ---
>> v1 -> v2
>> * Changed tab to spaces
>> * Added tag
>> ---
>> xen/arch/arm/setup.c | 12 +++++++-----
>> 1 file changed, 7 insertions(+), 5 deletions(-)
>>
>> diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
>> index 92a2de6b70..046905f6c3 100644
>> --- a/xen/arch/arm/setup.c
>> +++ b/xen/arch/arm/setup.c
>> @@ -753,16 +753,18 @@ void __init start_xen(unsigned long boot_phys_offset,
>> /* Parse the ACPI tables for possible boot-time configuration */
>> acpi_boot_table_init();
>>
>> + end_boot_allocator();
>> +
>> + vm_init();
>> +
>> if ( acpi_disabled )
>> + {
>> printk("Booting using Device Tree\n");
>> + dt_unflatten_host_device_tree();
>> + }
>> else
>> printk("Booting using ACPI\n");
>>
>> - end_boot_allocator();
>> -
>> - vm_init();
>> - dt_unflatten_host_device_tree();
>> -
>> init_IRQ();
>>
>> platform_init();
>> --
>> 2.11.0
>>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-04-24 8:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-21 13:12 [PATCH v2 for-4.9] xen/arm: Don't unflatten DT when booting with ACPI Punit Agrawal
2017-04-21 20:47 ` Stefano Stabellini
2017-04-24 8:28 ` Punit Agrawal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).