From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
To: xen-devel@lists.xen.org
Cc: andrew.cooper3@citrix.com,
Boris Ostrovsky <boris.ostrovsky@oracle.com>,
alex.thorlton@hpe.com, jbeulich@suse.com
Subject: [PATCH v2] acpi: Switch to dynamic mapping at SYS_STATE_boot
Date: Wed, 1 Feb 2017 09:31:17 -0500 [thread overview]
Message-ID: <1485959477-1711-1-git-send-email-boris.ostrovsky@oracle.com> (raw)
We can switch ACPI from using fixmap to dynamic mapping as soon as
the system enters SYS_STATE_boot. This will allow us, for example,
to map MADT on systems with large number of processors where the
table might not fit into NUM_FIXMAP_ACPI_PAGES (currently set to 4).
To avoid having a window between system entering SYS_STATE_boot and
vmap area being initialized move vm_init() a little higher.
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
---
Changes in v2:
* Swap vm_init() and system_state assignment.
xen/arch/x86/setup.c | 3 ++-
xen/drivers/acpi/osl.c | 4 ++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index 0ccef1d..ccfd6dd 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -1376,9 +1376,10 @@ void __init noreturn __start_xen(unsigned long mbi_p)
else
end_boot_allocator();
+ vm_init();
+
system_state = SYS_STATE_boot;
- vm_init();
console_init_ring();
vesa_init();
diff --git a/xen/drivers/acpi/osl.c b/xen/drivers/acpi/osl.c
index 3616dfd..7199047 100644
--- a/xen/drivers/acpi/osl.c
+++ b/xen/drivers/acpi/osl.c
@@ -89,7 +89,7 @@ acpi_physical_address __init acpi_os_get_root_pointer(void)
void __iomem *
acpi_os_map_memory(acpi_physical_address phys, acpi_size size)
{
- if (system_state >= SYS_STATE_active) {
+ if (system_state >= SYS_STATE_boot) {
mfn_t mfn = _mfn(PFN_DOWN(phys));
unsigned int offs = phys & (PAGE_SIZE - 1);
@@ -104,7 +104,7 @@ acpi_os_map_memory(acpi_physical_address phys, acpi_size size)
void acpi_os_unmap_memory(void __iomem * virt, acpi_size size)
{
- if (system_state >= SYS_STATE_active)
+ if (system_state >= SYS_STATE_boot)
vunmap((void *)((unsigned long)virt & PAGE_MASK));
}
--
1.8.3.1
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next reply other threads:[~2017-02-01 14:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-01 14:31 Boris Ostrovsky [this message]
2017-02-01 15:40 ` [PATCH v2] acpi: Switch to dynamic mapping at SYS_STATE_boot Jan Beulich
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=1485959477-1711-1-git-send-email-boris.ostrovsky@oracle.com \
--to=boris.ostrovsky@oracle.com \
--cc=alex.thorlton@hpe.com \
--cc=andrew.cooper3@citrix.com \
--cc=jbeulich@suse.com \
--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).