浏览代码

[S390] hibernation: merge files and move to kernel/

Merge the nearly empty C files and move everything from power/ to
kernel/. That way the files are easier to handle.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Heiko Carstens 15 年之前
父节点
当前提交
c48ff644f2
共有 6 个文件被更改,包括 36 次插入53 次删除
  1. 1 2
      arch/s390/Makefile
  2. 1 1
      arch/s390/kernel/Makefile
  3. 33 2
      arch/s390/kernel/suspend.c
  4. 1 1
      arch/s390/kernel/swsusp_asm64.S
  5. 0 7
      arch/s390/power/Makefile
  6. 0 40
      arch/s390/power/suspend.c

+ 1 - 2
arch/s390/Makefile

@@ -88,8 +88,7 @@ LDFLAGS_vmlinux := -e start
 head-y		:= arch/s390/kernel/head.o arch/s390/kernel/init_task.o
 head-y		:= arch/s390/kernel/head.o arch/s390/kernel/init_task.o
 
 
 core-y		+= arch/s390/mm/ arch/s390/kernel/ arch/s390/crypto/ \
 core-y		+= arch/s390/mm/ arch/s390/kernel/ arch/s390/crypto/ \
-		   arch/s390/appldata/ arch/s390/hypfs/ arch/s390/kvm/ \
-		   arch/s390/power/
+		   arch/s390/appldata/ arch/s390/hypfs/ arch/s390/kvm/
 
 
 libs-y		+= arch/s390/lib/
 libs-y		+= arch/s390/lib/
 drivers-y	+= drivers/s390/
 drivers-y	+= drivers/s390/

+ 1 - 1
arch/s390/kernel/Makefile

@@ -32,7 +32,7 @@ extra-y				+= head.o init_task.o vmlinux.lds
 
 
 obj-$(CONFIG_MODULES)		+= s390_ksyms.o module.o
 obj-$(CONFIG_MODULES)		+= s390_ksyms.o module.o
 obj-$(CONFIG_SMP)		+= smp.o topology.o
 obj-$(CONFIG_SMP)		+= smp.o topology.o
-
+obj-$(CONFIG_HIBERNATION)	+= suspend.o swsusp_asm64.o
 obj-$(CONFIG_AUDIT)		+= audit.o
 obj-$(CONFIG_AUDIT)		+= audit.o
 compat-obj-$(CONFIG_AUDIT)	+= compat_audit.o
 compat-obj-$(CONFIG_AUDIT)	+= compat_audit.o
 obj-$(CONFIG_COMPAT)		+= compat_linux.o compat_signal.o \
 obj-$(CONFIG_COMPAT)		+= compat_linux.o compat_signal.o \

+ 33 - 2
arch/s390/power/swsusp.c → arch/s390/kernel/suspend.c

@@ -1,13 +1,44 @@
 /*
 /*
- * Support for suspend and resume on s390
+ * Suspend support specific for s390.
  *
  *
  * Copyright IBM Corp. 2009
  * Copyright IBM Corp. 2009
  *
  *
  * Author(s): Hans-Joachim Picht <hans@linux.vnet.ibm.com>
  * Author(s): Hans-Joachim Picht <hans@linux.vnet.ibm.com>
- *
  */
  */
 
 
+#include <linux/suspend.h>
+#include <linux/reboot.h>
+#include <linux/pfn.h>
+#include <linux/mm.h>
+#include <asm/sections.h>
 #include <asm/system.h>
 #include <asm/system.h>
+#include <asm/ipl.h>
+
+/*
+ * References to section boundaries
+ */
+extern const void __nosave_begin, __nosave_end;
+
+/*
+ *  check if given pfn is in the 'nosave' or in the read only NSS section
+ */
+int pfn_is_nosave(unsigned long pfn)
+{
+	unsigned long nosave_begin_pfn = __pa(&__nosave_begin) >> PAGE_SHIFT;
+	unsigned long nosave_end_pfn = PAGE_ALIGN(__pa(&__nosave_end))
+					>> PAGE_SHIFT;
+	unsigned long eshared_pfn = PFN_DOWN(__pa(&_eshared)) - 1;
+	unsigned long stext_pfn = PFN_DOWN(__pa(&_stext));
+
+	if (pfn >= nosave_begin_pfn && pfn < nosave_end_pfn)
+		return 1;
+	if (pfn >= stext_pfn && pfn <= eshared_pfn) {
+		if (ipl_info.type == IPL_TYPE_NSS)
+			return 1;
+	} else if ((tprot(pfn * PAGE_SIZE) && pfn > 0))
+		return 1;
+	return 0;
+}
 
 
 void save_processor_state(void)
 void save_processor_state(void)
 {
 {

+ 1 - 1
arch/s390/power/swsusp_asm64.S → arch/s390/kernel/swsusp_asm64.S

@@ -21,7 +21,7 @@
  * This function runs with disabled interrupts.
  * This function runs with disabled interrupts.
  */
  */
 	.section .text
 	.section .text
-	.align	2
+	.align	4
 	.globl swsusp_arch_suspend
 	.globl swsusp_arch_suspend
 swsusp_arch_suspend:
 swsusp_arch_suspend:
 	stmg	%r6,%r15,__SF_GPRS(%r15)
 	stmg	%r6,%r15,__SF_GPRS(%r15)

+ 0 - 7
arch/s390/power/Makefile

@@ -1,7 +0,0 @@
-#
-# Makefile for s390 PM support
-#
-
-obj-$(CONFIG_HIBERNATION) += suspend.o
-obj-$(CONFIG_HIBERNATION) += swsusp.o
-obj-$(CONFIG_HIBERNATION) += swsusp_asm64.o

+ 0 - 40
arch/s390/power/suspend.c

@@ -1,40 +0,0 @@
-/*
- * Suspend support specific for s390.
- *
- * Copyright IBM Corp. 2009
- *
- * Author(s): Hans-Joachim Picht <hans@linux.vnet.ibm.com>
- */
-
-#include <linux/mm.h>
-#include <linux/suspend.h>
-#include <linux/reboot.h>
-#include <linux/pfn.h>
-#include <asm/sections.h>
-#include <asm/ipl.h>
-
-/*
- * References to section boundaries
- */
-extern const void __nosave_begin, __nosave_end;
-
-/*
- *  check if given pfn is in the 'nosave' or in the read only NSS section
- */
-int pfn_is_nosave(unsigned long pfn)
-{
-	unsigned long nosave_begin_pfn = __pa(&__nosave_begin) >> PAGE_SHIFT;
-	unsigned long nosave_end_pfn = PAGE_ALIGN(__pa(&__nosave_end))
-					>> PAGE_SHIFT;
-	unsigned long eshared_pfn = PFN_DOWN(__pa(&_eshared)) - 1;
-	unsigned long stext_pfn = PFN_DOWN(__pa(&_stext));
-
-	if (pfn >= nosave_begin_pfn && pfn < nosave_end_pfn)
-		return 1;
-	if (pfn >= stext_pfn && pfn <= eshared_pfn) {
-		if (ipl_info.type == IPL_TYPE_NSS)
-			return 1;
-	} else if ((tprot(pfn * PAGE_SIZE) && pfn > 0))
-		return 1;
-	return 0;
-}