提交 a6eb84bc 编写于 作者: R Rafael J. Wysocki 提交者: Len Brown

suspend: cleanup reference to swsusp_pg_dir[]

swsusp_pg_dir[] is used for suspend, but not for hibernation.
clean-up the ifdefs which worked by accident, while implying the opposite.
Delete the __nosavedata, which also implied the opposite.

Some day we may optimize CONFIG_ACPI_SLEEP to build minimal kernels
for just hibernate or just suspend but not both,
but today isn't that day.
Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: NLen Brown <len.brown@intel.com>
上级 ffffa4b5
...@@ -423,23 +423,23 @@ static void __init pagetable_init(void) ...@@ -423,23 +423,23 @@ static void __init pagetable_init(void)
paravirt_pagetable_setup_done(pgd_base); paravirt_pagetable_setup_done(pgd_base);
} }
#if defined(CONFIG_HIBERNATION) || defined(CONFIG_ACPI) #ifdef CONFIG_ACPI_SLEEP
/* /*
* 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. * 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))); __attribute__ ((aligned(PAGE_SIZE)));
static inline void save_pg_dir(void) static inline void save_pg_dir(void)
{ {
memcpy(swsusp_pg_dir, swapper_pg_dir, PAGE_SIZE); memcpy(swsusp_pg_dir, swapper_pg_dir, PAGE_SIZE);
} }
#else #else /* !CONFIG_ACPI_SLEEP */
static inline void save_pg_dir(void) static inline void save_pg_dir(void)
{ {
} }
#endif #endif /* !CONFIG_ACPI_SLEEP */
void zap_low_mappings(void) void zap_low_mappings(void)
{ {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册