Re: [PATCH] x86: Construct 32 bit boot time page tables in native format.

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Rafael J. Wysocki
Date: Friday, February 1, 2008 - 7:28 am

On Friday, 1 of February 2008, Ingo Molnar wrote:

Here you go, but I think it falls into the ACPI category.

---
From: Rafael J. Wysocki <rjw@sisk.pl>

Since hibernation uses its own temporary page tables for restoring
the image kernel, swsusp_pg_dir is only needed for ACPI resume from
RAM.  Also, some files under arch/x86/kernel/acpi need only be compiled
if ACPI suspend to RAM is going to be used.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---
 arch/x86/kernel/acpi/Makefile |    2 +-
 arch/x86/mm/init_32.c         |   10 +++++-----
 drivers/acpi/Kconfig          |    5 +++++
 3 files changed, 11 insertions(+), 6 deletions(-)

Index: linux-2.6/arch/x86/mm/init_32.c
===================================================================
--- linux-2.6.orig/arch/x86/mm/init_32.c
+++ linux-2.6/arch/x86/mm/init_32.c
@@ -423,23 +423,23 @@ static void __init pagetable_init(void)
 	paravirt_pagetable_setup_done(pgd_base);
 }
 
-#if defined(CONFIG_HIBERNATION) || defined(CONFIG_ACPI)
+#ifdef CONFIG_ACPI_SUSPEND
 /*
- * Swap suspend & friends need this for resume because things like the intel-agp
+ * ACPI suspend needs this for resume, because things like the intel-agp
  * driver might have split up a kernel 4MB mapping.
  */
-char __nosavedata swsusp_pg_dir[PAGE_SIZE]
+char swsusp_pg_dir[PAGE_SIZE]
 	__attribute__ ((aligned(PAGE_SIZE)));
 
 static inline void save_pg_dir(void)
 {
 	memcpy(swsusp_pg_dir, swapper_pg_dir, PAGE_SIZE);
 }
-#else
+#else /* !CONFIG_ACPI_SUSPEND */
 static inline void save_pg_dir(void)
 {
 }
-#endif
+#endif /* !CONFIG_ACPI_SUSPEND */
 
 void zap_low_mappings(void)
 {
Index: linux-2.6/drivers/acpi/Kconfig
===================================================================
--- linux-2.6.orig/drivers/acpi/Kconfig
+++ linux-2.6/drivers/acpi/Kconfig
@@ -42,6 +42,11 @@ menuconfig ACPI
 
 if ACPI
 
+config ACPI_SUSPEND
+	bool
+	depends on SUSPEND
+	default y
+
 config ACPI_SLEEP
 	bool
 	depends on PM_SLEEP
Index: linux-2.6/arch/x86/kernel/acpi/Makefile
===================================================================
--- linux-2.6.orig/arch/x86/kernel/acpi/Makefile
+++ linux-2.6/arch/x86/kernel/acpi/Makefile
@@ -1,5 +1,5 @@
 obj-$(CONFIG_ACPI)		+= boot.o
-obj-$(CONFIG_ACPI_SLEEP)	+= sleep.o wakeup_$(BITS).o
+obj-$(CONFIG_ACPI_SUSPEND)	+= sleep.o wakeup_$(BITS).o
 
 ifneq ($(CONFIG_ACPI_PROCESSOR),)
 obj-y				+= cstate.o processor.o
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] x86: make nx_enabled conditional on CONFIG_X86_PAE, Harvey Harrison, (Tue Jan 22, 2:00 pm)
Re: [PATCH] x86: Construct 32 bit boot time page tables in ..., Jeremy Fitzhardinge, (Wed Jan 23, 6:06 pm)
Re: [PATCH] x86: Construct 32 bit boot time page tables in ..., Jeremy Fitzhardinge, (Thu Jan 24, 3:35 pm)
Re: [PATCH] x86: Construct 32 bit boot time page tables in ..., Jeremy Fitzhardinge, (Thu Jan 24, 3:58 pm)
Re: [PATCH] x86: Construct 32 bit boot time page tables in ..., Jeremy Fitzhardinge, (Thu Jan 24, 4:40 pm)
Re: [PATCH] x86: Construct 32 bit boot time page tables in ..., Jeremy Fitzhardinge, (Thu Jan 24, 4:51 pm)
Re: [PATCH] x86: Construct 32 bit boot time page tables in ..., Jeremy Fitzhardinge, (Thu Jan 24, 5:11 pm)
Re: [PATCH] x86: Construct 32 bit boot time page tables in ..., Jeremy Fitzhardinge, (Thu Jan 24, 5:31 pm)
Re: [PATCH] x86: Construct 32 bit boot time page tables in ..., Rafael J. Wysocki, (Thu Jan 24, 5:46 pm)
Re: [PATCH] x86: Construct 32 bit boot time page tables in ..., Eric W. Biederman, (Thu Jan 24, 7:16 pm)
Re: [PATCH] x86: Construct 32 bit boot time page tables in ..., Eric W. Biederman, (Thu Jan 24, 7:56 pm)
Re: [PATCH] x86: Construct 32 bit boot time page tables in ..., Jeremy Fitzhardinge, (Thu Jan 24, 9:41 pm)
Re: [PATCH] x86: Construct 32 bit boot time page tables in ..., Eric W. Biederman, (Fri Jan 25, 4:07 am)
Re: [PATCH] x86: Construct 32 bit boot time page tables in ..., Rafael J. Wysocki, (Fri Jan 25, 3:02 pm)
Re: [PATCH] x86: Construct 32 bit boot time page tables in ..., Rafael J. Wysocki, (Mon Jan 28, 8:25 am)
Re: [PATCH] x86: Construct 32 bit boot time page tables in ..., Rafael J. Wysocki, (Mon Jan 28, 10:02 am)
Re: [PATCH] x86: Construct 32 bit boot time page tables in ..., Jeremy Fitzhardinge, (Mon Jan 28, 1:03 pm)
Re: [PATCH] x86: Construct 32 bit boot time page tables in ..., Rafael J. Wysocki, (Mon Jan 28, 1:26 pm)
Re: [PATCH] x86: Construct 32 bit boot time page tables in ..., Rafael J. Wysocki, (Mon Jan 28, 1:28 pm)
Re: [PATCH] x86: Construct 32 bit boot time page tables in ..., Jeremy Fitzhardinge, (Mon Jan 28, 1:44 pm)
Re: [PATCH] x86: Construct 32 bit boot time page tables in ..., Rafael J. Wysocki, (Mon Jan 28, 1:50 pm)
Re: [PATCH] x86: Construct 32 bit boot time page tables in ..., Rafael J. Wysocki, (Mon Jan 28, 1:59 pm)
Re: [PATCH] x86: Construct 32 bit boot time page tables in ..., Rafael J. Wysocki, (Mon Jan 28, 3:02 pm)
Re: [PATCH] x86: Construct 32 bit boot time page tables in ..., Rafael J. Wysocki, (Fri Feb 1, 7:28 am)