Skip to contentSkip to conversation

s390: core patches

PATCH In review Heiko Carstens 1 participant 1 message Dec 28, 2004

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

PATCH 1/8 s390: core patches

[PATCH 1/8] s390: core changes.

From: Heiko Carstens <[email protected]>

s390 core changes:
- Disable pfault pseudo page faults before stopping a cpu.
- Add exception table for diag10 instruction.
- Move initialization of active_mm of idle task to smp_create_idle.
- Regenerate default configuration.

diffstat:

 arch/s390/defconfig      |    9 +++++++--
 arch/s390/kernel/setup.c |    3 ---
 arch/s390/kernel/smp.c   |    9 ++++++++-
 arch/s390/mm/init.c      |   21 +++++++++++++++++----
 4 files changed, 32 insertions(+), 10 deletions(-)
arch/s390/defconfig +7 -2
diff -urN linux-2.6/arch/s390/defconfig linux-2.6-patched/arch/s390/defconfig
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.10-rc2
-# Tue Nov 30 14:00:30 2004
+# Linux kernel version: 2.6.10
+# Mon Dec 27 11:03:23 2004
 #
 CONFIG_MMU=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
@@ -158,6 +158,7 @@
 # CONFIG_BLK_DEV_CRYPTOLOOP is not set
 CONFIG_BLK_DEV_NBD=m
 CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
 CONFIG_BLK_DEV_RAM_SIZE=4096
 CONFIG_BLK_DEV_INITRD=y
 CONFIG_INITRAMFS_SOURCE=""
@@ -567,6 +568,10 @@
 # CONFIG_CRYPTO_TEST is not set
 
 #
+# Hardware crypto devices
+#
+
+#
 # Library routines
 #
 # CONFIG_CRC_CCITT is not set
arch/s390/kernel/setup.c +0 -3
diff -urN linux-2.6/arch/s390/kernel/setup.c linux-2.6-patched/arch/s390/kernel/setup.c
@@ -98,9 +98,6 @@
         clear_thread_flag(TIF_USEDFPU);
         current->used_math = 0;
 
-        /* Setup active_mm for idle_task  */
-        atomic_inc(&init_mm.mm_count);
-        current->active_mm = &init_mm;
         if (current->mm)
                 BUG();
         enter_lazy_tlb(&init_mm, current);
arch/s390/kernel/smp.c +8 -1
diff -urN linux-2.6/arch/s390/kernel/smp.c linux-2.6-patched/arch/s390/kernel/smp.c
@@ -535,7 +535,7 @@
 extern void init_cpu_timer(void);
 extern void init_cpu_vtimer(void);
 extern int pfault_init(void);
-extern int pfault_token(void);
+extern void pfault_fini(void);
 
 int __devinit start_secondary(void *cpuvoid)
 {
@@ -571,6 +571,8 @@
 	p = fork_idle(cpu);
 	if (IS_ERR(p))
 		panic("failed fork for CPU %u: %li", cpu, PTR_ERR(p));
+	atomic_inc(&init_mm.mm_count);
+	p->active_mm = &init_mm;
 	current_set[cpu] = p;
 }
 
@@ -695,6 +697,11 @@
 		return -EBUSY;
 	}
 
+#ifdef CONFIG_PFAULT
+	/* Disable pfault pseudo page faults on this cpu. */
+	pfault_fini();
+#endif
+
 	/* disable all external interrupts */
 
 	cr_parms.start_ctl = 0;
arch/s390/mm/init.c +17 -4
diff -urN linux-2.6/arch/s390/mm/init.c linux-2.6-patched/arch/s390/mm/init.c
@@ -45,11 +45,24 @@
         if (addr >= 0x7ff00000)
                 return;
 #ifdef __s390x__
-        asm volatile ("sam31\n\t"
-                      "diag %0,%0,0x10\n\t"
-                      "sam64" : : "a" (addr) );
+        asm volatile (
+		"   sam31\n"
+		"   diag %0,%0,0x10\n"
+		"0: sam64\n"
+		".section __ex_table,\"a\"\n"
+		"   .align 8\n"
+		"   .quad 0b, 0b\n"
+		".previous\n"
+		: : "a" (addr));
 #else
-        asm volatile ("diag %0,%0,0x10" : : "a" (addr) );
+        asm volatile (
+		"   diag %0,%0,0x10\n"
+		"0:\n"
+		".section __ex_table,\"a\"\n"
+		"   .align 4\n"
+		"   .long 0b, 0b\n"
+		".previous\n"
+		: : "a" (addr));
 #endif
 }