Skip to contentSkip to conversation

Rename suspend/hibernation stuff for clarity

PATCH Pavel Machek 3 participants 3 messages Jan 7, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

kernel/suspend_64.c and power/cpu.c were equivalent. Move them into power/cpu_*.c for consistency.

power/swsusp.S and kernel/suspend_asm_64.S were both misnamed and equivalent. Merge then minto power/hibernation_*.S.

---
commit 2a4fbaecebafff5b3114d0e87ecf73c45bc57f7b
tree a13462c0ae1fa640a9b9d08cfea0bf6056b26385
parent eafb847ccc4f73c2737157b510dcf7b040f53147
author Pavel <[email protected]> Mon, 07 Jan 2008 14:50:25 +0100 committer Pavel <[email protected]> Mon, 07 Jan 2008 14:50:25 +0100

 arch/x86/Makefile_64             |    1 
 arch/x86/kernel/Makefile_64      |    2 
 arch/x86/kernel/suspend_64.c     |  294 --------------------------------------
 arch/x86/kernel/suspend_asm_64.S |  141 ------------------
 arch/x86/power/Makefile          |   10 +
 arch/x86/power/cpu.c             |  133 -----------------
 arch/x86/power/cpu_32.c          |  133 +++++++++++++++++
 arch/x86/power/cpu_64.c          |  294 ++++++++++++++++++++++++++++++++++++++
 arch/x86/power/hibernation_32.S  |   78 ++++++++++
 arch/x86/power/hibernation_64.S  |  141 ++++++++++++++++++
 arch/x86/power/swsusp.S          |   78 ----------
 11 files changed, 655 insertions(+), 650 deletions(-)
arch/x86/Makefile_64 +1 -0
index a804860..4938b6b 100644
@@ -87,6 +87,7 @@ core-y					+= arch/x86/kernel/ \
 core-$(CONFIG_IA32_EMULATION)		+= arch/x86/ia32/
 drivers-$(CONFIG_PCI)			+= arch/x86/pci/
 drivers-$(CONFIG_OPROFILE)		+= arch/x86/oprofile/
+drivers-$(CONFIG_PM)			+= arch/x86/power/
 
 boot := arch/x86/boot
 
arch/x86/kernel/Makefile_64 +0 -2
index 5a88890..cc79834 100644
@@ -24,8 +24,6 @@ obj-y				+= apic_64.o  nmi_64.o
 obj-y				+= io_apic_64.o mpparse_64.o genapic_64.o genapic_flat_64.o
 obj-$(CONFIG_KEXEC)		+= machine_kexec_64.o relocate_kernel_64.o crash.o
 obj-$(CONFIG_CRASH_DUMP)	+= crash_dump_64.o
-obj-$(CONFIG_PM)		+= suspend_64.o
-obj-$(CONFIG_HIBERNATION)	+= suspend_asm_64.o
 obj-$(CONFIG_EARLY_PRINTK)	+= early_printk.o
 obj-$(CONFIG_GART_IOMMU)	+= pci-gart_64.o aperture_64.o
 obj-$(CONFIG_CALGARY_IOMMU)	+= pci-calgary_64.o tce_64.o
arch/x86/kernel/suspend_64.c deleted +0 -294

294 lines not on this page · raw message

arch/x86/kernel/suspend_asm_64.S deleted +0 -141

141 lines not on this page · raw message

arch/x86/power/Makefile +8 -2
index d764ec9..dd99371 100644
@@ -1,2 +1,8 @@
-obj-$(CONFIG_PM)		+= cpu.o
-obj-$(CONFIG_HIBERNATION)	+= swsusp.o suspend.o
+ifeq ($(CONFIG_X86_32),y)
+obj-$(CONFIG_PM)		+= cpu_32.o
+obj-$(CONFIG_HIBERNATION)	+= hibernation_32.o suspend.o
+else
+obj-$(CONFIG_PM)		+= cpu_64.o
+obj-$(CONFIG_HIBERNATION)	+= hibernation_64.o
+endif
+
arch/x86/power/cpu.c deleted +0 -133

133 lines not on this page · raw message

arch/x86/power/cpu_32.c new file +133 -0

133 lines not on this page · raw message

arch/x86/power/cpu_64.c new file +294 -0

294 lines not on this page · raw message

arch/x86/power/hibernation_32.S new file +78 -0

78 lines not on this page · raw message

arch/x86/power/hibernation_64.S new file +141 -0

141 lines not on this page · raw message

arch/x86/power/swsusp.S deleted +0 -76

76 lines not on this page · raw message

#1 lore raw
Quoted 5 lines · Pavel Machek

kernel/suspend_64.c and power/cpu.c were equivalent. Move them into power/cpu_*.c for consistency.

power/swsusp.S and kernel/suspend_asm_64.S were both misnamed and equivalent. Merge then minto power/hibernation_*.S.

Well, all of that are changes in the right direction, but I'm not sure if it's the right time to do that just now. For example, suspend_64.c in your patch is missing the comments on __save/restore_processor_state() already queued up for 2.6.25 by Ingo.

Any chance to base the patch on top of the mm branch of /pub/scm / linux/kernel/git/x86/linux-2.6-x86.git ?

Thanks,
Rafael

#2 lore raw
In reply to Pavel Machek
Quoted 15 lines · Pavel Machek

kernel/suspend_64.c and power/cpu.c were equivalent. Move them into power/cpu_*.c for consistency.

power/swsusp.S and kernel/suspend_asm_64.S were both misnamed and equivalent. Merge then minto power/hibernation_*.S.

---
commit 2a4fbaecebafff5b3114d0e87ecf73c45bc57f7b
tree a13462c0ae1fa640a9b9d08cfea0bf6056b26385
parent eafb847ccc4f73c2737157b510dcf7b040f53147
author Pavel <[email protected]> Mon, 07 Jan 2008 14:50:25 +0100 committer Pavel <[email protected]> Mon, 07 Jan 2008 14:50:25 +0100

Quoted 12 lines
 arch/x86/Makefile_64             |    1 
 arch/x86/kernel/Makefile_64      |    2 
 arch/x86/kernel/suspend_64.c     |  294 --------------------------------------
 arch/x86/kernel/suspend_asm_64.S |  141 ------------------
 arch/x86/power/Makefile          |   10 +
 arch/x86/power/cpu.c             |  133 -----------------
 arch/x86/power/cpu_32.c          |  133 +++++++++++++++++
 arch/x86/power/cpu_64.c          |  294 ++++++++++++++++++++++++++++++++++++++
 arch/x86/power/hibernation_32.S  |   78 ++++++++++
 arch/x86/power/hibernation_64.S  |  141 ++++++++++++++++++
 arch/x86/power/swsusp.S          |   78 ----------
 11 files changed, 655 insertions(+), 650 deletions(-)

git diff -C -M -B (IIRC) gives a much more readable diffstat. They works for git format-patch and friends too.

Sam