xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@arm.com>
To: xen-devel@lists.xen.org
Cc: Julien Grall <julien.grall@arm.com>,
	sstabellini@kernel.org, shankerd@codeaurora.org
Subject: [PATCH 8/8] xen/arm: acpi: Move the ACPI banks in bootinfo
Date: Fri,  3 Feb 2017 19:18:58 +0000	[thread overview]
Message-ID: <1486149538-20432-15-git-send-email-julien.grall@arm.com> (raw)
In-Reply-To: <1486149538-20432-1-git-send-email-julien.grall@arm.com>

Currently the acpi banks are stored in a separate variable and have an
header just for them.

This variable can be moved in the structure bootinfo removing an header
and a global variable.

Signed-off-by: Julien Grall <julien.grall@arm.com>
---
 xen/arch/arm/efi/efi-boot.h |  3 +--
 xen/arch/arm/efi/efi-dom0.c | 12 +++++-------
 xen/arch/arm/efi/efi-dom0.h |  8 --------
 xen/include/asm-arm/setup.h |  3 +++
 4 files changed, 9 insertions(+), 17 deletions(-)
 delete mode 100644 xen/arch/arm/efi/efi-dom0.h

diff --git a/xen/arch/arm/efi/efi-boot.h b/xen/arch/arm/efi/efi-boot.h
index 757d9c6..2e3e169 100644
--- a/xen/arch/arm/efi/efi-boot.h
+++ b/xen/arch/arm/efi/efi-boot.h
@@ -7,7 +7,6 @@
 #include <xen/libfdt/libfdt.h>
 #include <asm/setup.h>
 #include <asm/smp.h>
-#include "efi-dom0.h"
 
 void noreturn efi_xen_start(void *fdt_ptr, uint32_t fdt_size);
 void __flush_dcache_area(const void *vaddr, unsigned long size);
@@ -164,7 +163,7 @@ static EFI_STATUS __init efi_process_memory_map_bootinfo(EFI_MEMORY_DESCRIPTOR *
 #ifdef CONFIG_ACPI
         else if ( desc_ptr->Type == EfiACPIReclaimMemory )
         {
-            if ( !meminfo_add_bank(&acpi_mem, desc_ptr) )
+            if ( !meminfo_add_bank(&bootinfo.acpi, desc_ptr) )
             {
                 PrintStr(L"Error: All " __stringify(NR_MEM_BANKS)
                           " acpi meminfo mem banks exhausted.\r\n");
diff --git a/xen/arch/arm/efi/efi-dom0.c b/xen/arch/arm/efi/efi-dom0.c
index f0ceaa6..1c35654 100644
--- a/xen/arch/arm/efi/efi-dom0.c
+++ b/xen/arch/arm/efi/efi-dom0.c
@@ -22,7 +22,6 @@
  */
 
 #include "efi.h"
-#include "efi-dom0.h"
 #include <xen/sched.h>
 #include <xen/pfn.h>
 #include <xen/libfdt/libfdt.h>
@@ -32,7 +31,6 @@
 #define XZ_EXTERN STATIC
 #include "../../../common/xz/crc32.c"
 
-struct meminfo __initdata acpi_mem;
 /* Constant to indicate "Xen" in unicode u16 format */
 static const CHAR16 xen_efi_fw_vendor[] = {0x0058, 0x0065, 0x006E, 0x0000};
 
@@ -46,7 +44,7 @@ size_t __init estimate_efi_size(int mem_nr_banks)
     int acpi_mem_nr_banks = 0;
 
     if ( !acpi_disabled )
-        acpi_mem_nr_banks = acpi_mem.nr_banks;
+        acpi_mem_nr_banks = bootinfo.acpi.nr_banks;
 
     size = ROUNDUP(est_size + ect_size + fw_vendor_size, 8);
     /* plus 1 for new created tables */
@@ -124,10 +122,10 @@ void __init acpi_create_efi_mmap_table(struct domain *d,
         fill_efi_memory_descriptor(desc, EfiConventionalMemory,
                                    mem->bank[i].start, mem->bank[i].size);
 
-    for ( i = 0; i < acpi_mem.nr_banks; i++, desc++ )
+    for ( i = 0; i < bootinfo.acpi.nr_banks; i++, desc++ )
         fill_efi_memory_descriptor(desc, EfiACPIReclaimMemory,
-                                   acpi_mem.bank[i].start,
-                                   acpi_mem.bank[i].size);
+                                   bootinfo.acpi.bank[i].start,
+                                   bootinfo.acpi.bank[i].size);
 
     fill_efi_memory_descriptor(desc, EfiACPIReclaimMemory,
                                d->arch.efi_acpi_gpa, d->arch.efi_acpi_len);
@@ -135,7 +133,7 @@ void __init acpi_create_efi_mmap_table(struct domain *d,
     tbl_add[TBL_MMAP].start = d->arch.efi_acpi_gpa
                               + acpi_get_table_offset(tbl_add, TBL_MMAP);
     tbl_add[TBL_MMAP].size = sizeof(EFI_MEMORY_DESCRIPTOR)
-                             * (mem->nr_banks + acpi_mem.nr_banks + 1);
+                             * (mem->nr_banks + bootinfo.acpi.nr_banks + 1);
 }
 
 /* Create /hypervisor/uefi node for efi properties. */
diff --git a/xen/arch/arm/efi/efi-dom0.h b/xen/arch/arm/efi/efi-dom0.h
deleted file mode 100644
index 3cd4caa..0000000
--- a/xen/arch/arm/efi/efi-dom0.h
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef __ARM_EFI_DOM0_H__
-#define __ARM_EFI_DOM0_H__
-
-#include <asm/setup.h>
-
-extern struct meminfo acpi_mem;
-
-#endif
diff --git a/xen/include/asm-arm/setup.h b/xen/include/asm-arm/setup.h
index 3da7a49..7c76185 100644
--- a/xen/include/asm-arm/setup.h
+++ b/xen/include/asm-arm/setup.h
@@ -43,6 +43,9 @@ struct bootmodules {
 struct bootinfo {
     struct meminfo mem;
     struct bootmodules modules;
+#ifdef CONFIG_ACPI
+    struct meminfo acpi;
+#endif
 };
 
 extern struct bootinfo bootinfo;
-- 
1.9.1


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

  parent reply	other threads:[~2017-02-03 19:18 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-03 19:18 [PATCH 0/8] xen/arm: Fix and clean-up for ACPI and EFI Julien Grall
2017-02-03 19:18 ` [PATCH 1/8] xen/arm: acpi: Handle correctly detection of GICv2 on GICv3 Julien Grall
2017-02-16  1:36   ` Stefano Stabellini
2017-02-03 19:18 ` [PATCH 1/7] xen/arm: acpi: Rework acpi_boot_table_init error paths Julien Grall
2017-02-03 22:09   ` Wei Liu
2017-02-03 19:18 ` [PATCH 2/7] xen/arm: acpi: Don't fallback on DT when user request ACPI Julien Grall
2017-02-03 19:18 ` [PATCH 2/8] xen/arm: acpi: Rework acpi_boot_table_init error paths Julien Grall
2017-02-03 20:44   ` Andrew Cooper
2017-02-08 18:25     ` Julien Grall
2017-02-16  1:39   ` Stefano Stabellini
2017-02-03 19:18 ` [PATCH 3/8] xen/arm: acpi: Don't fallback on DT when user request ACPI Julien Grall
2017-02-16  1:41   ` Stefano Stabellini
2017-02-20  8:47     ` Julien Grall
2017-02-20 18:12       ` Stefano Stabellini
2017-02-20 18:13         ` Julien Grall
2017-03-03 18:35           ` Julien Grall
2017-02-03 19:18 ` [PATCH 3/7] xen/arm: Print whether Xen is booting using ACPI or DT Julien Grall
2017-02-03 19:18 ` [PATCH 4/7] xen/arm: efi: Avoid duplicating the addition of a new bank Julien Grall
2017-02-03 19:18 ` [PATCH 4/8] xen/arm: Print whether Xen is booting using ACPI or DT Julien Grall
2017-02-16  1:42   ` Stefano Stabellini
2017-02-03 19:18 ` [PATCH 5/8] xen/arm: efi: Avoid duplicating the addition of a new bank Julien Grall
2017-02-16  1:47   ` Stefano Stabellini
2017-02-16  1:49     ` Stefano Stabellini
2017-03-03 18:31       ` Julien Grall
2017-02-03 19:18 ` [PATCH 6/8] xen/arm: efi: Avoid duplicating the addition of a new efi memory descriptor Julien Grall
2017-02-16  1:52   ` Stefano Stabellini
2017-02-03 19:18 ` [PATCH 6/7] xen/arm: efi: Rework acpi_create_efi_mmap_table to avoid memory_map[offset] Julien Grall
2017-02-03 19:18 ` [PATCH 7/7] xen/arm: acpi: Move the ACPI banks in bootinfo Julien Grall
2017-02-03 19:18 ` [PATCH 7/8] xen/arm: efi: Rework acpi_create_efi_mmap_table to avoid memory_map[offset] Julien Grall
2017-02-16  1:57   ` Stefano Stabellini
2017-02-03 19:18 ` Julien Grall [this message]
2017-02-16  2:00   ` [PATCH 8/8] xen/arm: acpi: Move the ACPI banks in bootinfo Stefano Stabellini
2017-02-16  1:58 ` [PATCH 0/8] xen/arm: Fix and clean-up for ACPI and EFI Stefano Stabellini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1486149538-20432-15-git-send-email-julien.grall@arm.com \
    --to=julien.grall@arm.com \
    --cc=shankerd@codeaurora.org \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).