linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: tip-bot for Thomas Renninger <trenn@suse.de>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org,
	yinghai@kernel.org, lenb@kernel.org, eric.piel@tremplin-utc.net,
	tglx@linutronix.de, trenn@suse.de, hpa@linux.intel.com,
	robert.moore@intel.com
Subject: [tip:x86/acpi] x86, acpi: Introduce x86 arch specific arch_reserve_mem_area() for e820 handling
Date: Sun, 30 Sep 2012 20:37:06 -0700	[thread overview]
Message-ID: <tip-8e30524dcc0d0ac1a18a5cee482b9d9cde3cb332@git.kernel.org> (raw)
In-Reply-To: <1349043837-22659-3-git-send-email-trenn@suse.de>

Commit-ID:  8e30524dcc0d0ac1a18a5cee482b9d9cde3cb332
Gitweb:     http://git.kernel.org/tip/8e30524dcc0d0ac1a18a5cee482b9d9cde3cb332
Author:     Thomas Renninger <trenn@suse.de>
AuthorDate: Mon, 1 Oct 2012 00:23:53 +0200
Committer:  H. Peter Anvin <hpa@linux.intel.com>
CommitDate: Sun, 30 Sep 2012 18:03:13 -0700

x86, acpi: Introduce x86 arch specific arch_reserve_mem_area() for e820 handling

This is needed for ACPI table overriding via initrd. Beside reserving
memblocks, X86 also requires to flag the memory area to E820_RESERVED or
E820_ACPI in the e820 mappings to be able to io(re)map it later.

Signed-off-by: Thomas Renninger <trenn@suse.de>
Link: http://lkml.kernel.org/r/1349043837-22659-3-git-send-email-trenn@suse.de
Cc: Len Brown <lenb@kernel.org>
Cc: Robert Moore <robert.moore@intel.com>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Eric Piel <eric.piel@tremplin-utc.net>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
---
 arch/x86/kernel/acpi/boot.c |    6 ++++++
 include/linux/acpi.h        |    8 ++++++++
 2 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
index b2297e5..6b75777 100644
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -1700,3 +1700,9 @@ int __acpi_release_global_lock(unsigned int *lock)
 	} while (unlikely (val != old));
 	return old & 0x1;
 }
+
+void __init arch_reserve_mem_area(acpi_physical_address addr, size_t size)
+{
+	e820_add_region(addr, size, E820_ACPI);
+	update_e820();
+}
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index 4f2a762..946fd1e 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -426,6 +426,14 @@ void acpi_os_set_prepare_sleep(int (*func)(u8 sleep_state,
 
 acpi_status acpi_os_prepare_sleep(u8 sleep_state,
 				  u32 pm1a_control, u32 pm1b_control);
+#if CONFIG_X86
+void arch_reserve_mem_area(acpi_physical_address addr, size_t size);
+#else
+static inline void arch_reserve_mem_area(acpi_physical_address addr,
+					  size_t size)
+{
+}
+#endif /* CONFIG_X86 */
 #else
 #define acpi_os_set_prepare_sleep(func, pm1a_ctrl, pm1b_ctrl) do { } while (0)
 #endif

       reply	other threads:[~2012-10-01  3:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1349043837-22659-3-git-send-email-trenn@suse.de>
2012-10-01  3:37 ` tip-bot for Thomas Renninger [this message]
     [not found] <1348661941-71287-3-git-send-email-trenn@suse.de>
2012-09-28  1:42 ` [tip:x86/acpi] X86 ACPI: Introduce x86 arch specific arch_reserve_mem_area() for e820 handling tip-bot for Thomas Renninger

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=tip-8e30524dcc0d0ac1a18a5cee482b9d9cde3cb332@git.kernel.org \
    --to=trenn@suse.de \
    --cc=eric.piel@tremplin-utc.net \
    --cc=hpa@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=lenb@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=robert.moore@intel.com \
    --cc=tglx@linutronix.de \
    --cc=yinghai@kernel.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).