aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2008-02-09 17:24:09 -0500
committerThomas Gleixner <tglx@linutronix.de>2008-02-09 17:24:09 -0500
commitcf7700fe24301df2c8d3636cf40784651c098207 (patch)
tree2897be493f1b9af0c3a992c541a22f403c6e405c /arch
parent9b706aee7d92d6ac3002547aea12e3eaa0a750ae (diff)
x86 PM: move 64-bit hibernation files to arch/x86/power
Move arch/x86/kernel/suspend_64.c to arch/x86/power . Move arch/x86/kernel/suspend_asm_64.S to arch/x86/power as hibernate_asm_64.S . Update purpose and copyright information in arch/x86/power/suspend_64.c and arch/x86/power/hibernate_asm_64.S . Update the Makefiles in arch/x86, arch/x86/kernel and arch/x86/power to reflect the above changes. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/Makefile4
-rw-r--r--arch/x86/kernel/Makefile2
-rw-r--r--arch/x86/power/Makefile9
-rw-r--r--arch/x86/power/hibernate_asm_64.S (renamed from arch/x86/kernel/suspend_asm_64.S)9
-rw-r--r--arch/x86/power/suspend_64.c (renamed from arch/x86/kernel/suspend_64.c)5
5 files changed, 20 insertions, 9 deletions
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index 364865b1b08d..204af43535c5 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -191,8 +191,10 @@ drivers-$(CONFIG_PCI) += arch/x86/pci/
191# must be linked after kernel/ 191# must be linked after kernel/
192drivers-$(CONFIG_OPROFILE) += arch/x86/oprofile/ 192drivers-$(CONFIG_OPROFILE) += arch/x86/oprofile/
193 193
194ifeq ($(CONFIG_X86_32),y) 194# suspend and hibernation support
195drivers-$(CONFIG_PM) += arch/x86/power/ 195drivers-$(CONFIG_PM) += arch/x86/power/
196
197ifeq ($(CONFIG_X86_32),y)
196drivers-$(CONFIG_FB) += arch/x86/video/ 198drivers-$(CONFIG_FB) += arch/x86/video/
197endif 199endif
198 200
diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile
index 21dc1a061bf1..76ec0f8f138a 100644
--- a/arch/x86/kernel/Makefile
+++ b/arch/x86/kernel/Makefile
@@ -84,8 +84,6 @@ ifeq ($(CONFIG_X86_64),y)
84 obj-y += genapic_64.o genapic_flat_64.o 84 obj-y += genapic_64.o genapic_flat_64.o
85 obj-$(CONFIG_X86_PM_TIMER) += pmtimer_64.o 85 obj-$(CONFIG_X86_PM_TIMER) += pmtimer_64.o
86 obj-$(CONFIG_AUDIT) += audit_64.o 86 obj-$(CONFIG_AUDIT) += audit_64.o
87 obj-$(CONFIG_PM) += suspend_64.o
88 obj-$(CONFIG_HIBERNATION) += suspend_asm_64.o
89 87
90 obj-$(CONFIG_GART_IOMMU) += pci-gart_64.o aperture_64.o 88 obj-$(CONFIG_GART_IOMMU) += pci-gart_64.o aperture_64.o
91 obj-$(CONFIG_CALGARY_IOMMU) += pci-calgary_64.o tce_64.o 89 obj-$(CONFIG_CALGARY_IOMMU) += pci-calgary_64.o tce_64.o
diff --git a/arch/x86/power/Makefile b/arch/x86/power/Makefile
index d764ec950065..8ce87fb4abb4 100644
--- a/arch/x86/power/Makefile
+++ b/arch/x86/power/Makefile
@@ -1,2 +1,7 @@
1obj-$(CONFIG_PM) += cpu.o 1ifeq ($(CONFIG_X86_64),y)
2obj-$(CONFIG_HIBERNATION) += swsusp.o suspend.o 2 obj-$(CONFIG_PM) += suspend_64.o
3 obj-$(CONFIG_HIBERNATION) += hibernate_asm_64.o
4else
5 obj-$(CONFIG_PM) += cpu.o
6 obj-$(CONFIG_HIBERNATION) += swsusp.o suspend.o
7endif
diff --git a/arch/x86/kernel/suspend_asm_64.S b/arch/x86/power/hibernate_asm_64.S
index aeb9a4d7681e..1deb3244b99b 100644
--- a/arch/x86/kernel/suspend_asm_64.S
+++ b/arch/x86/power/hibernate_asm_64.S
@@ -1,7 +1,12 @@
1/* Copyright 2004,2005 Pavel Machek <pavel@suse.cz>, Andi Kleen <ak@suse.de>, Rafael J. Wysocki <rjw@sisk.pl> 1/*
2 * Hibernation support for x86-64
2 * 3 *
3 * Distribute under GPLv2. 4 * Distribute under GPLv2.
4 * 5 *
6 * Copyright 2007 Rafael J. Wysocki <rjw@sisk.pl>
7 * Copyright 2005 Andi Kleen <ak@suse.de>
8 * Copyright 2004 Pavel Machek <pavel@suse.cz>
9 *
5 * swsusp_arch_resume must not use any stack or any nonlocal variables while 10 * swsusp_arch_resume must not use any stack or any nonlocal variables while
6 * copying pages: 11 * copying pages:
7 * 12 *
@@ -9,7 +14,7 @@
9 * image could very well be data page in "new" image, and overwriting 14 * image could very well be data page in "new" image, and overwriting
10 * your own stack under you is bad idea. 15 * your own stack under you is bad idea.
11 */ 16 */
12 17
13 .text 18 .text
14#include <linux/linkage.h> 19#include <linux/linkage.h>
15#include <asm/segment.h> 20#include <asm/segment.h>
diff --git a/arch/x86/kernel/suspend_64.c b/arch/x86/power/suspend_64.c
index 7ac7130022f1..d51dbf21d021 100644
--- a/arch/x86/kernel/suspend_64.c
+++ b/arch/x86/power/suspend_64.c
@@ -1,8 +1,9 @@
1/* 1/*
2 * Suspend support specific for i386. 2 * Suspend and hibernation support for x86-64
3 * 3 *
4 * Distribute under GPLv2 4 * Distribute under GPLv2
5 * 5 *
6 * Copyright (c) 2007 Rafael J. Wysocki <rjw@sisk.pl>
6 * Copyright (c) 2002 Pavel Machek <pavel@suse.cz> 7 * Copyright (c) 2002 Pavel Machek <pavel@suse.cz>
7 * Copyright (c) 2001 Patrick Mochel <mochel@osdl.org> 8 * Copyright (c) 2001 Patrick Mochel <mochel@osdl.org>
8 */ 9 */
@@ -63,7 +64,7 @@ static void __save_processor_state(struct saved_context *ctxt)
63 mtrr_save_fixed_ranges(NULL); 64 mtrr_save_fixed_ranges(NULL);
64 65
65 /* 66 /*
66 * control registers 67 * control registers
67 */ 68 */
68 rdmsrl(MSR_EFER, ctxt->efer); 69 rdmsrl(MSR_EFER, ctxt->efer);
69 ctxt->cr0 = read_cr0(); 70 ctxt->cr0 = read_cr0();