From: Heiko Carstens 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. Signed-off-by: Heiko Carstens Signed-off-by: Andrew Morton --- 25-akpm/arch/s390/defconfig | 9 +++++++-- 25-akpm/arch/s390/kernel/setup.c | 3 --- 25-akpm/arch/s390/kernel/smp.c | 9 ++++++++- 25-akpm/arch/s390/mm/init.c | 21 +++++++++++++++++---- 4 files changed, 32 insertions(+), 10 deletions(-) diff -puN arch/s390/defconfig~s390-core-patches arch/s390/defconfig --- 25/arch/s390/defconfig~s390-core-patches 2004-12-28 00:39:15.462490936 -0800 +++ 25-akpm/arch/s390/defconfig 2004-12-28 00:39:15.470489720 -0800 @@ -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_LOOP=m # 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=y # CONFIG_CRYPTO_TEST is not set # +# Hardware crypto devices +# + +# # Library routines # # CONFIG_CRC_CCITT is not set diff -puN arch/s390/kernel/setup.c~s390-core-patches arch/s390/kernel/setup.c --- 25/arch/s390/kernel/setup.c~s390-core-patches 2004-12-28 00:39:15.463490784 -0800 +++ 25-akpm/arch/s390/kernel/setup.c 2004-12-28 00:39:15.471489568 -0800 @@ -98,9 +98,6 @@ void __devinit cpu_init (void) 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); diff -puN arch/s390/kernel/smp.c~s390-core-patches arch/s390/kernel/smp.c --- 25/arch/s390/kernel/smp.c~s390-core-patches 2004-12-28 00:39:15.465490480 -0800 +++ 25-akpm/arch/s390/kernel/smp.c 2004-12-28 00:39:15.472489416 -0800 @@ -535,7 +535,7 @@ __init smp_check_cpus(unsigned int max_c 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 @@ static void __init smp_create_idle(unsig 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 @@ __cpu_disable(void) 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; diff -puN arch/s390/mm/init.c~s390-core-patches arch/s390/mm/init.c --- 25/arch/s390/mm/init.c~s390-core-patches 2004-12-28 00:39:15.466490328 -0800 +++ 25-akpm/arch/s390/mm/init.c 2004-12-28 00:39:15.472489416 -0800 @@ -65,11 +65,24 @@ void diag10(unsigned long addr) 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 } _