提交 d344e38b 编写于 作者: H H. Peter Anvin 提交者: Ingo Molnar

x86, nx: Mark the ACPI resume trampoline code as +x

We reserve lowmem for the things that need it, like the ACPI
wakeup code, way early to guarantee availability.  This happens
before we set up the proper pagetables, so set_memory_x() has no
effect.

Until we have a better solution, use an initcall to mark the
wakeup code executable.
Originally-by: NMatthieu Castet <castet.matthieu@free.fr>
Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
Cc: Matthias Hopf <mhopf@suse.de>
Cc: rjw@sisk.pl
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
LKML-Reference: <4D4F8019.2090104@zytor.com>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 8dbdea84
...@@ -12,10 +12,8 @@ ...@@ -12,10 +12,8 @@
#include <linux/cpumask.h> #include <linux/cpumask.h>
#include <asm/segment.h> #include <asm/segment.h>
#include <asm/desc.h> #include <asm/desc.h>
#ifdef CONFIG_X86_32
#include <asm/pgtable.h> #include <asm/pgtable.h>
#endif #include <asm/cacheflush.h>
#include "realmode/wakeup.h" #include "realmode/wakeup.h"
#include "sleep.h" #include "sleep.h"
...@@ -149,6 +147,15 @@ void __init acpi_reserve_wakeup_memory(void) ...@@ -149,6 +147,15 @@ void __init acpi_reserve_wakeup_memory(void)
memblock_x86_reserve_range(mem, mem + WAKEUP_SIZE, "ACPI WAKEUP"); memblock_x86_reserve_range(mem, mem + WAKEUP_SIZE, "ACPI WAKEUP");
} }
int __init acpi_configure_wakeup_memory(void)
{
if (acpi_realmode)
set_memory_x(acpi_realmode, WAKEUP_SIZE >> PAGE_SHIFT);
return 0;
}
arch_initcall(acpi_configure_wakeup_memory);
static int __init acpi_sleep_setup(char *str) static int __init acpi_sleep_setup(char *str)
{ {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册