[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2 30/41] arm : acpi add placeholder for acpi load address



Hi Parth,

On 17/05/2015 21:03, Parth Dixit wrote:
EFI table, memory description table and some of acpi tables
will reside in DOM0 memory. Add placeholder for starting
address for loading in DOM0 and get/set acpi size helpers.

Signed-off-by: Parth Dixit <parth.dixit@xxxxxxxxxx>
---
  xen/arch/arm/acpi/lib.c    | 12 ++++++++++++
  xen/arch/arm/kernel.c      |  5 ++++-
  xen/arch/arm/kernel.h      |  1 +
  xen/include/asm-arm/acpi.h |  4 ++++
  4 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/xen/arch/arm/acpi/lib.c b/xen/arch/arm/acpi/lib.c
index fd9bfa4..9b9f059 100644
--- a/xen/arch/arm/acpi/lib.c
+++ b/xen/arch/arm/acpi/lib.c
@@ -1,6 +1,8 @@
  #include <xen/acpi.h>
  #include <asm/mm.h>

+static int acpi_len = 0;
+

There is no reason to type this variable signed int. Please use unsigned int.

Even better, paddr_t as you use like that after.

  void __iomem *
  acpi_os_map_iomem(acpi_physical_address phys, acpi_size size)
  {
@@ -17,3 +19,13 @@ inline bool_t acpi_psci_hvc_present(void)
  {
      return acpi_gbl_FADT.arm_boot_flags & ACPI_FADT_PSCI_USE_HVC;
  }
+
+inline int get_acpi_size(void)
+{
+    return acpi_len;
+}
+
+inline void set_acpi_size(int size)
+{
+    acpi_len = size;
+}

The variable name is misleading, acpi_len doesn't correspond to the real size of the ACPI but only whole size of the table generated by Xen.

Furthermore, based the usage I was able to find within the other patch, this variable is only used during dom0 creation and should live in kinfo.

--
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.