xen/arm: domain_build: Consolidate make_timer_node() and make_timer_domU_node()
authorViktor Mitin <viktor.mitin.19@gmail.com>
Wed, 7 Aug 2019 10:10:28 +0000 (13:10 +0300)
committerJulien Grall <julien.grall@arm.com>
Wed, 14 Aug 2019 10:07:00 +0000 (11:07 +0100)
commit7ef3c2f298f2d9405d73f0c1db4563ab62559bd7
treed373fb821ad79aa11771fe845b90870676dd7aa6
parentf94e42b2ea67dedb01d4a9d122b61d7d8b20a393
xen/arm: domain_build: Consolidate make_timer_node() and make_timer_domU_node()

At the moment, the hwdom and domUs are creating the timer node
differently.

Technically the timer exposed the same way for any domain, the only
difference should be the interrupts used. The two current other
differences are:
    - compatible: The hwdom DT will use the same as the one provided
      by the host provided. The domUs DT will use "arm,armv7-timer" for
      32-bit domain and "arm,armv8-timer" for 64-bit domain. The latter
      matches the behavior of libxl when guests are created from
      userspace.

    - clock-frequency: The property is used on platform with
      broken firmware to indicate the clock frequency. This should
      be used by all the domains, however this is not yet the case
      for domUs created by Xen.

To avoid more discrepancy the two functions are now consolidated into
one place make_timer_node().

For simplicity, the compatible will now be based on the bitness even
for the hwdom. This means the compatible exposed for the hwdom may
differ. This should only have an impact on 32-bit hwdom booting on
Armv8 hardware.

Suggested-by: Julien Grall <julien.grall@arm.com>
Signed-off-by: Viktor Mitin <viktor_mitin@epam.com>
[julien: Reword commit message]
Acked-by: Julien Grall <julien.grall@arm.com>
xen/arch/arm/domain_build.c