diff options
author | Len Brown <len.brown@intel.com> | 2005-09-08 01:45:47 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2005-09-08 01:45:47 -0400 |
commit | 64e47488c913ac704d465a6af86a26786d1412a5 (patch) | |
tree | d3b0148592963dcde26e4bb35ddfec8b1eaf8e23 /arch/s390/kernel | |
parent | 4a35a46bf1cda4737c428380d1db5d15e2590d18 (diff) | |
parent | caf39e87cc1182f7dae84eefc43ca14d54c78ef9 (diff) |
Merge linux-2.6 with linux-acpi-2.6
Diffstat (limited to 'arch/s390/kernel')
-rw-r--r-- | arch/s390/kernel/debug.c | 52 | ||||
-rw-r--r-- | arch/s390/kernel/entry.S | 116 | ||||
-rw-r--r-- | arch/s390/kernel/entry64.S | 117 | ||||
-rw-r--r-- | arch/s390/kernel/time.c | 5 |
4 files changed, 209 insertions, 81 deletions
diff --git a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c index 960ba6029c3..bc59282da76 100644 --- a/arch/s390/kernel/debug.c +++ b/arch/s390/kernel/debug.c @@ -62,7 +62,7 @@ typedef struct } debug_sprintf_entry_t; -extern void tod_to_timeval(uint64_t todval, struct timeval *xtime); +extern void tod_to_timeval(uint64_t todval, struct timespec *xtime); /* internal function prototyes */ @@ -374,9 +374,24 @@ debug_info_copy(debug_info_t* in, int mode) { int i,j; debug_info_t* rc; + unsigned long flags; + + /* get a consistent copy of the debug areas */ + do { + rc = debug_info_alloc(in->name, in->pages_per_area, + in->nr_areas, in->buf_size, in->level, mode); + spin_lock_irqsave(&in->lock, flags); + if(!rc) + goto out; + /* has something changed in the meantime ? */ + if((rc->pages_per_area == in->pages_per_area) && + (rc->nr_areas == in->nr_areas)) { + break; + } + spin_unlock_irqrestore(&in->lock, flags); + debug_info_free(rc); + } while (1); - rc = debug_info_alloc(in->name, in->pages_per_area, in->nr_areas, - in->buf_size, in->level, mode); if(!rc || (mode == NO_AREAS)) goto out; @@ -386,6 +401,7 @@ debug_info_copy(debug_info_t* in, int mode) } } out: + spin_unlock_irqrestore(&in->lock, flags); return rc; } @@ -593,19 +609,15 @@ debug_open(struct inode *inode, struct file *file) debug_info_t *debug_info, *debug_info_snapshot; down(&debug_lock); - - /* find debug log and view */ - debug_info = debug_area_first; - while(debug_info != NULL){ - for (i = 0; i < DEBUG_MAX_VIEWS; i++) { - if (!debug_info->views[i]) - continue; - else if (debug_info->debugfs_entries[i] == - file->f_dentry) { - goto found; /* found view ! */ - } + debug_info = (struct debug_info*)file->f_dentry->d_inode->u.generic_ip; + /* find debug view */ + for (i = 0; i < DEBUG_MAX_VIEWS; i++) { + if (!debug_info->views[i]) + continue; + else if (debug_info->debugfs_entries[i] == + file->f_dentry) { + goto found; /* found view ! */ } - debug_info = debug_info->next; } /* no entry found */ rc = -EINVAL; @@ -833,7 +845,7 @@ extern inline void debug_finish_entry(debug_info_t * id, debug_entry_t* active, int level, int exception) { - STCK(active->id.stck); + active->id.stck = get_clock(); active->id.fields.cpuid = smp_processor_id(); active->caller = __builtin_return_address(0); active->id.fields.exception = exception; @@ -1078,7 +1090,7 @@ debug_register_view(debug_info_t * id, struct debug_view *view) if (view->input_proc) mode |= S_IWUSR; pde = debugfs_create_file(view->name, mode, id->debugfs_root_entry, - NULL, &debug_file_ops); + id , &debug_file_ops); if (!pde){ printk(KERN_WARNING "debug: debugfs_create_file() failed!"\ " Cannot register view %s/%s\n", id->name,view->name); @@ -1432,7 +1444,7 @@ int debug_dflt_header_fn(debug_info_t * id, struct debug_view *view, int area, debug_entry_t * entry, char *out_buf) { - struct timeval time_val; + struct timespec time_spec; unsigned long long time; char *except_str; unsigned long caller; @@ -1443,7 +1455,7 @@ debug_dflt_header_fn(debug_info_t * id, struct debug_view *view, time = entry->id.stck; /* adjust todclock to 1970 */ time -= 0x8126d60e46000000LL - (0x3c26700LL * 1000000 * 4096); - tod_to_timeval(time, &time_val); + tod_to_timeval(time, &time_spec); if (entry->id.fields.exception) except_str = "*"; @@ -1451,7 +1463,7 @@ debug_dflt_header_fn(debug_info_t * id, struct debug_view *view, except_str = "-"; caller = ((unsigned long) entry->caller) & PSW_ADDR_INSN; rc += sprintf(out_buf, "%02i %011lu:%06lu %1u %1s %02i %p ", - area, time_val.tv_sec, time_val.tv_usec, level, + area, time_spec.tv_sec, time_spec.tv_nsec / 1000, level, except_str, entry->id.fields.cpuid, (void *) caller); return rc; } diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S index 1a271b16cb5..cbe7d6a2d02 100644 --- a/arch/s390/kernel/entry.S +++ b/arch/s390/kernel/entry.S @@ -138,14 +138,14 @@ STACK_SIZE = 1 << STACK_SHIFT st %r12,__SF_BACKCHAIN(%r15) # clear back chain .endm - .macro RESTORE_ALL sync - mvc __LC_RETURN_PSW(8),SP_PSW(%r15) # move user PSW to lowcore + .macro RESTORE_ALL psworg,sync + mvc \psworg(8),SP_PSW(%r15) # move user PSW to lowcore .if !\sync - ni __LC_RETURN_PSW+1,0xfd # clear wait state bit + ni \psworg+1,0xfd # clear wait state bit .endif lm %r0,%r15,SP_R0(%r15) # load gprs 0-15 of user STORE_TIMER __LC_EXIT_TIMER - lpsw __LC_RETURN_PSW # back to caller + lpsw \psworg # back to caller .endm /* @@ -235,7 +235,7 @@ sysc_return: tm __TI_flags+3(%r9),_TIF_WORK_SVC bnz BASED(sysc_work) # there is work to do (signals etc.) sysc_leave: - RESTORE_ALL 1 + RESTORE_ALL __LC_RETURN_PSW,1 # # recheck if there is more work to do @@ -312,8 +312,6 @@ sysc_singlestep: la %r14,BASED(sysc_return) # load adr. of system return br %r1 # branch to do_single_step -__critical_end: - # # call trace before and after sys_call # @@ -571,7 +569,8 @@ io_return: tm __TI_flags+3(%r9),_TIF_WORK_INT bnz BASED(io_work) # there is work to do (signals etc.) io_leave: - RESTORE_ALL 0 + RESTORE_ALL __LC_RETURN_PSW,0 +io_done: #ifdef CONFIG_PREEMPT io_preempt: @@ -621,7 +620,7 @@ io_work_loop: # io_mcck_pending: l %r1,BASED(.Ls390_handle_mcck) - l %r14,BASED(io_work_loop) + la %r14,BASED(io_work_loop) br %r1 # TIF bit will be cleared by handler # @@ -674,6 +673,8 @@ ext_no_vtime: basr %r14,%r1 b BASED(io_return) +__critical_end: + /* * Machine check handler routines */ @@ -681,6 +682,7 @@ ext_no_vtime: .globl mcck_int_handler mcck_int_handler: spt __LC_CPU_TIMER_SAVE_AREA # revalidate cpu timer + mvc __LC_ASYNC_ENTER_TIMER(8),__LC_CPU_TIMER_SAVE_AREA lm %r0,%r15,__LC_GPREGS_SAVE_AREA # revalidate gprs SAVE_ALL_BASE __LC_SAVE_AREA+32 la %r12,__LC_MCK_OLD_PSW @@ -693,17 +695,8 @@ mcck_int_handler: mvc __LC_ASYNC_ENTER_TIMER(8),__LC_LAST_UPDATE_TIMER mvc __LC_SYNC_ENTER_TIMER(8),__LC_LAST_UPDATE_TIMER mvc __LC_EXIT_TIMER(8),__LC_LAST_UPDATE_TIMER -0: tm __LC_MCCK_CODE+2,0x08 # mwp of old psw valid? - bno BASED(mcck_no_vtime) # no -> skip cleanup critical - tm __LC_MCK_OLD_PSW+1,0x01 # interrupting from user ? - bz BASED(mcck_no_vtime) - UPDATE_VTIME __LC_EXIT_TIMER,__LC_ASYNC_ENTER_TIMER,__LC_USER_TIMER - UPDATE_VTIME __LC_LAST_UPDATE_TIMER,__LC_EXIT_TIMER,__LC_SYSTEM_TIMER - mvc __LC_LAST_UPDATE_TIMER(8),__LC_ASYNC_ENTER_TIMER -mcck_no_vtime: #endif -0: - tm __LC_MCCK_CODE+2,0x09 # mwp + ia of old psw valid? +0: tm __LC_MCCK_CODE+2,0x09 # mwp + ia of old psw valid? bno BASED(mcck_int_main) # no -> skip cleanup critical tm __LC_MCK_OLD_PSW+1,0x01 # test problem state bit bnz BASED(mcck_int_main) # from user -> load async stack @@ -720,6 +713,16 @@ mcck_int_main: be BASED(0f) l %r15,__LC_PANIC_STACK # load panic stack 0: CREATE_STACK_FRAME __LC_MCK_OLD_PSW,__LC_SAVE_AREA+32 +#ifdef CONFIG_VIRT_CPU_ACCOUNTING + tm __LC_MCCK_CODE+2,0x08 # mwp of old psw valid? + bno BASED(mcck_no_vtime) # no -> skip cleanup critical + tm __LC_MCK_OLD_PSW+1,0x01 # interrupting from user ? + bz BASED(mcck_no_vtime) + UPDATE_VTIME __LC_EXIT_TIMER,__LC_ASYNC_ENTER_TIMER,__LC_USER_TIMER + UPDATE_VTIME __LC_LAST_UPDATE_TIMER,__LC_EXIT_TIMER,__LC_SYSTEM_TIMER + mvc __LC_LAST_UPDATE_TIMER(8),__LC_ASYNC_ENTER_TIMER +mcck_no_vtime: +#endif l %r9,__LC_THREAD_INFO # load pointer to thread_info struct la %r2,SP_PTREGS(%r15) # load pt_regs l %r1,BASED(.Ls390_mcck) @@ -737,7 +740,7 @@ mcck_int_main: l %r1,BASED(.Ls390_handle_mcck) basr %r14,%r1 # call machine check handler mcck_return: - RESTORE_ALL 0 + RESTORE_ALL __LC_RETURN_MCCK_PSW,0 #ifdef CONFIG_SMP /* @@ -803,6 +806,10 @@ cleanup_table_sysc_leave: .long sysc_leave + 0x80000000, sysc_work_loop + 0x80000000 cleanup_table_sysc_work_loop: .long sysc_work_loop + 0x80000000, sysc_reschedule + 0x80000000 +cleanup_table_io_leave: + .long io_leave + 0x80000000, io_done + 0x80000000 +cleanup_table_io_work_loop: + .long io_work_loop + 0x80000000, io_mcck_pending + 0x80000000 cleanup_critical: clc 4(4,%r12),BASED(cleanup_table_system_call) @@ -825,10 +832,26 @@ cleanup_critical: clc 4(4,%r12),BASED(cleanup_table_sysc_work_loop+4) bl BASED(cleanup_sysc_return) 0: + clc 4(4,%r12),BASED(cleanup_table_io_leave) + bl BASED(0f) + clc 4(4,%r12),BASED(cleanup_table_io_leave+4) + bl BASED(cleanup_io_leave) +0: + clc 4(4,%r12),BASED(cleanup_table_io_work_loop) + bl BASED(0f) + clc 4(4,%r12),BASED(cleanup_table_io_work_loop+4) + bl BASED(cleanup_io_return) +0: br %r14 cleanup_system_call: mvc __LC_RETURN_PSW(8),0(%r12) + c %r12,BASED(.Lmck_old_psw) + be BASED(0f) + la %r12,__LC_SAVE_AREA+16 + b BASED(1f) +0: la %r12,__LC_SAVE_AREA+32 +1: #ifdef CONFIG_VIRT_CPU_ACCOUNTING clc __LC_RETURN_PSW+4(4),BASED(cleanup_system_call_insn+4) bh BASED(0f) @@ -838,11 +861,13 @@ cleanup_system_call: #endif clc __LC_RETURN_PSW+4(4),BASED(cleanup_system_call_insn) bh BASED(0f) - mvc __LC_SAVE_AREA(16),__LC_SAVE_AREA+16 -0: st %r13,__LC_SAVE_AREA+20 + mvc __LC_SAVE_AREA(16),0(%r12) +0: st %r13,4(%r12) + st %r12,__LC_SAVE_AREA+48 # argh SAVE_ALL __LC_SVC_OLD_PSW,__LC_SAVE_AREA,1 CREATE_STACK_FRAME __LC_SVC_OLD_PSW,__LC_SAVE_AREA - st %r15,__LC_SAVE_AREA+28 + l %r12,__LC_SAVE_AREA+48 # argh + st %r15,12(%r12) lh %r7,0x8a #ifdef CONFIG_VIRT_CPU_ACCOUNTING cleanup_vtime: @@ -879,17 +904,21 @@ cleanup_sysc_return: cleanup_sysc_leave: clc 4(4,%r12),BASED(cleanup_sysc_leave_insn) - be BASED(0f) + be BASED(2f) #ifdef CONFIG_VIRT_CPU_ACCOUNTING mvc __LC_EXIT_TIMER(8),__LC_ASYNC_ENTER_TIMER clc 4(4,%r12),BASED(cleanup_sysc_leave_insn+4) - be BASED(0f) + be BASED(2f) #endif mvc __LC_RETURN_PSW(8),SP_PSW(%r15) - mvc __LC_SAVE_AREA+16(16),SP_R12(%r15) - lm %r0,%r11,SP_R0(%r15) + c %r12,BASED(.Lmck_old_psw) + bne BASED(0f) + mvc __LC_SAVE_AREA+32(16),SP_R12(%r15) + b BASED(1f) +0: mvc __LC_SAVE_AREA+16(16),SP_R12(%r15) +1: lm %r0,%r11,SP_R0(%r15) l %r15,SP_R15(%r15) -0: la %r12,__LC_RETURN_PSW +2: la %r12,__LC_RETURN_PSW br %r14 cleanup_sysc_leave_insn: #ifdef CONFIG_VIRT_CPU_ACCOUNTING @@ -897,6 +926,36 @@ cleanup_sysc_leave_insn: #endif .long sysc_leave + 10 + 0x80000000 +cleanup_io_return: + mvc __LC_RETURN_PSW(4),0(%r12) + mvc __LC_RETURN_PSW+4(4),BASED(cleanup_table_io_work_loop) + la %r12,__LC_RETURN_PSW + br %r14 + +cleanup_io_leave: + clc 4(4,%r12),BASED(cleanup_io_leave_insn) + be BASED(2f) +#ifdef CONFIG_VIRT_CPU_ACCOUNTING + mvc __LC_EXIT_TIMER(8),__LC_ASYNC_ENTER_TIMER + clc 4(4,%r12),BASED(cleanup_io_leave_insn+4) + be BASED(2f) +#endif + mvc __LC_RETURN_PSW(8),SP_PSW(%r15) + c %r12,BASED(.Lmck_old_psw) + bne BASED(0f) + mvc __LC_SAVE_AREA+32(16),SP_R12(%r15) + b BASED(1f) +0: mvc __LC_SAVE_AREA+16(16),SP_R12(%r15) +1: lm %r0,%r11,SP_R0(%r15) + l %r15,SP_R15(%r15) +2: la %r12,__LC_RETURN_PSW + br %r14 +cleanup_io_leave_insn: +#ifdef CONFIG_VIRT_CPU_ACCOUNTING + .long io_leave + 18 + 0x80000000 +#endif + .long io_leave + 14 + 0x80000000 + /* * Integer constants */ @@ -918,6 +977,7 @@ cleanup_sysc_leave_insn: .Ls390_mcck: .long s390_do_machine_check .Ls390_handle_mcck: .long s390_handle_mcck +.Lmck_old_psw: .long __LC_MCK_OLD_PSW .Ldo_IRQ: .long do_IRQ .Ldo_extint: .long do_extint .Ldo_signal: .long do_signal diff --git a/arch/s390/kernel/entry64.S b/arch/s390/kernel/entry64.S index d9f22915008..fb77b72ab26 100644 --- a/arch/s390/kernel/entry64.S +++ b/arch/s390/kernel/entry64.S @@ -131,14 +131,14 @@ _TIF_WORK_INT = (_TIF_SIGPENDING | _TIF_NEED_RESCHED | _TIF_MCCK_PENDING) stg %r12,__SF_BACKCHAIN(%r15) .endm - .macro RESTORE_ALL sync - mvc __LC_RETURN_PSW(16),SP_PSW(%r15) # move user PSW to lowcore + .macro RESTORE_ALL psworg,sync + mvc \psworg(16),SP_PSW(%r15) # move user PSW to lowcore .if !\sync - ni __LC_RETURN_PSW+1,0xfd # clear wait state bit + ni \psworg+1,0xfd # clear wait state bit .endif lmg %r0,%r15,SP_R0(%r15) # load gprs 0-15 of user STORE_TIMER __LC_EXIT_TIMER - lpswe __LC_RETURN_PSW # back to caller + lpswe \psworg # back to caller .endm /* @@ -214,8 +214,8 @@ sysc_nr_ok: sysc_do_restart: larl %r10,sys_call_table #ifdef CONFIG_S390_SUPPORT - tm SP_PSW+3(%r15),0x01 # are we running in 31 bit mode ? - jo sysc_noemu + tm __TI_flags+5(%r9),(_TIF_31BIT>>16) # running in 31 bit mode ? + jno sysc_noemu larl %r10,sys_call_table_emu # use 31 bit emulation system calls sysc_noemu: #endif @@ -233,7 +233,7 @@ sysc_return: tm __TI_flags+7(%r9),_TIF_WORK_SVC jnz sysc_work # there is work to do (signals etc.) sysc_leave: - RESTORE_ALL 1 + RESTORE_ALL __LC_RETURN_PSW,1 # # recheck if there is more work to do @@ -308,8 +308,6 @@ sysc_singlestep: jg do_single_step # branch to do_sigtrap -__critical_end: - # # call syscall_trace before and after system call # special linkage: %r12 contains the return address for trace_svc @@ -612,7 +610,8 @@ io_return: tm __TI_flags+7(%r9),_TIF_WORK_INT jnz io_work # there is work to do (signals etc.) io_leave: - RESTORE_ALL 0 + RESTORE_ALL __LC_RETURN_PSW,0 +io_done: #ifdef CONFIG_PREEMPT io_preempt: @@ -711,6 +710,8 @@ ext_no_vtime: brasl %r14,do_extint j io_return +__critical_end: + /* * Machine check handler routines */ @@ -718,6 +719,7 @@ ext_no_vtime: mcck_int_handler: la %r1,4095 # revalidate r1 spt __LC_CPU_TIMER_SAVE_AREA-4095(%r1) # revalidate cpu timer + mvc __LC_ASYNC_ENTER_TIMER(8),__LC_CPU_TIMER_SAVE_AREA-4095(%r1) lmg %r0,%r15,__LC_GPREGS_SAVE_AREA-4095(%r1)# revalidate gprs SAVE_ALL_BASE __LC_SAVE_AREA+64 la %r12,__LC_MCK_OLD_PSW @@ -730,17 +732,8 @@ mcck_int_handler: mvc __LC_ASYNC_ENTER_TIMER(8),__LC_LAST_UPDATE_TIMER mvc __LC_SYNC_ENTER_TIMER(8),__LC_LAST_UPDATE_TIMER mvc __LC_EXIT_TIMER(8),__LC_LAST_UPDATE_TIMER -0: tm __LC_MCCK_CODE+2,0x08 # mwp of old psw valid? - jno mcck_no_vtime # no -> no timer update - tm __LC_MCK_OLD_PSW+1,0x01 # interrupting from user ? - jz mcck_no_vtime - UPDATE_VTIME __LC_EXIT_TIMER,__LC_ASYNC_ENTER_TIMER,__LC_USER_TIMER - UPDATE_VTIME __LC_LAST_UPDATE_TIMER,__LC_EXIT_TIMER,__LC_SYSTEM_TIMER - mvc __LC_LAST_UPDATE_TIMER(8),__LC_ASYNC_ENTER_TIMER -mcck_no_vtime: #endif -0: - tm __LC_MCCK_CODE+2,0x09 # mwp + ia of old psw valid? +0: tm __LC_MCCK_CODE+2,0x09 # mwp + ia of old psw valid? jno mcck_int_main # no -> skip cleanup critical tm __LC_MCK_OLD_PSW+1,0x01 # test problem state bit jnz mcck_int_main # from user -> load kernel stack @@ -756,6 +749,16 @@ mcck_int_main: jz 0f lg %r15,__LC_PANIC_STACK # load panic stack 0: CREATE_STACK_FRAME __LC_MCK_OLD_PSW,__LC_SAVE_AREA+64 +#ifdef CONFIG_VIRT_CPU_ACCOUNTING + tm __LC_MCCK_CODE+2,0x08 # mwp of old psw valid? + jno mcck_no_vtime # no -> no timer update + tm __LC_MCK_OLD_PSW+1,0x01 # interrupting from user ? + jz mcck_no_vtime + UPDATE_VTIME __LC_EXIT_TIMER,__LC_ASYNC_ENTER_TIMER,__LC_USER_TIMER + UPDATE_VTIME __LC_LAST_UPDATE_TIMER,__LC_EXIT_TIMER,__LC_SYSTEM_TIMER + mvc __LC_LAST_UPDATE_TIMER(8),__LC_ASYNC_ENTER_TIMER +mcck_no_vtime: +#endif lg %r9,__LC_THREAD_INFO # load pointer to thread_info struct la %r2,SP_PTREGS(%r15) # load pt_regs brasl %r14,s390_do_machine_check @@ -771,7 +774,7 @@ mcck_int_main: jno mcck_return brasl %r14,s390_handle_mcck mcck_return: - RESTORE_ALL 0 + RESTORE_ALL __LC_RETURN_MCCK_PSW,0 #ifdef CONFIG_SMP /* @@ -833,6 +836,10 @@ cleanup_table_sysc_leave: .quad sysc_leave, sysc_work_loop cleanup_table_sysc_work_loop: .quad sysc_work_loop, sysc_reschedule +cleanup_table_io_leave: + .quad io_leave, io_done +cleanup_table_io_work_loop: + .quad io_work_loop, io_mcck_pending cleanup_critical: clc 8(8,%r12),BASED(cleanup_table_system_call) @@ -855,10 +862,26 @@ cleanup_critical: clc 8(8,%r12),BASED(cleanup_table_sysc_work_loop+8) jl cleanup_sysc_return 0: + clc 8(8,%r12),BASED(cleanup_table_io_leave) + jl 0f + clc 8(8,%r12),BASED(cleanup_table_io_leave+8) + jl cleanup_io_leave +0: + clc 8(8,%r12),BASED(cleanup_table_io_work_loop) + jl 0f + clc 8(8,%r12),BASED(cleanup_table_io_work_loop+8) + jl cleanup_io_return +0: br %r14 cleanup_system_call: mvc __LC_RETURN_PSW(16),0(%r12) + cghi %r12,__LC_MCK_OLD_PSW + je 0f + la %r12,__LC_SAVE_AREA+32 + j 1f +0: la %r12,__LC_SAVE_AREA+64 +1: #ifdef CONFIG_VIRT_CPU_ACCOUNTING clc __LC_RETURN_PSW+8(8),BASED(cleanup_system_call_insn+8) jh 0f @@ -868,11 +891,13 @@ cleanup_system_call: #endif clc __LC_RETURN_PSW+8(8),BASED(cleanup_system_call_insn) jh 0f - mvc __LC_SAVE_AREA(32),__LC_SAVE_AREA+32 -0: stg %r13,__LC_SAVE_AREA+40 + mvc __LC_SAVE_AREA(32),0(%r12) +0: stg %r13,8(%r12) + stg %r12,__LC_SAVE_AREA+96 # argh SAVE_ALL __LC_SVC_OLD_PSW,__LC_SAVE_AREA,1 CREATE_STACK_FRAME __LC_SVC_OLD_PSW,__LC_SAVE_AREA - stg %r15,__LC_SAVE_AREA+56 + lg %r12,__LC_SAVE_AREA+96 # argh + stg %r15,24(%r12) llgh %r7,__LC_SVC_INT_CODE #ifdef CONFIG_VIRT_CPU_ACCOUNTING cleanup_vtime: @@ -909,17 +934,21 @@ cleanup_sysc_return: cleanup_sysc_leave: clc 8(8,%r12),BASED(cleanup_sysc_leave_insn) - je 0f + je 2f #ifdef CONFIG_VIRT_CPU_ACCOUNTING mvc __LC_EXIT_TIMER(8),__LC_ASYNC_ENTER_TIMER clc 8(8,%r12),BASED(cleanup_sysc_leave_insn+8) - je 0f + je 2f #endif mvc __LC_RETURN_PSW(16),SP_PSW(%r15) - mvc __LC_SAVE_AREA+32(32),SP_R12(%r15) - lmg %r0,%r11,SP_R0(%r15) + cghi %r12,__LC_MCK_OLD_PSW + jne 0f + mvc __LC_SAVE_AREA+64(32),SP_R12(%r15) + j 1f +0: mvc __LC_SAVE_AREA+32(32),SP_R12(%r15) +1: lmg %r0,%r11,SP_R0(%r15) lg %r15,SP_R15(%r15) -0: la %r12,__LC_RETURN_PSW +2: la %r12,__LC_RETURN_PSW br %r14 cleanup_sysc_leave_insn: #ifdef CONFIG_VIRT_CPU_ACCOUNTING @@ -927,6 +956,36 @@ cleanup_sysc_leave_insn: #endif .quad sysc_leave + 12 +cleanup_io_return: + mvc __LC_RETURN_PSW(8),0(%r12) + mvc __LC_RETURN_PSW+8(8),BASED(cleanup_table_io_work_loop) + la %r12,__LC_RETURN_PSW + br %r14 + +cleanup_io_leave: + clc 8(8,%r12),BASED(cleanup_io_leave_insn) + je 2f +#ifdef CONFIG_VIRT_CPU_ACCOUNTING + mvc __LC_EXIT_TIMER(8),__LC_ASYNC_ENTER_TIMER + clc 8(8,%r12),BASED(cleanup_io_leave_insn+8) + je 2f +#endif + mvc __LC_RETURN_PSW(16),SP_PSW(%r15) + cghi %r12,__LC_MCK_OLD_PSW + jne 0f + mvc __LC_SAVE_AREA+64(32),SP_R12(%r15) + j 1f +0: mvc __LC_SAVE_AREA+32(32),SP_R12(%r15) +1: lmg %r0,%r11,SP_R0(%r15) + lg %r15,SP_R15(%r15) +2: la %r12,__LC_RETURN_PSW + br %r14 +cleanup_io_leave_insn: +#ifdef CONFIG_VIRT_CPU_ACCOUNTING + .quad io_leave + 20 +#endif + .quad io_leave + 16 + /* * Integer constants */ diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c index 8ca48567678..2fd75da1549 100644 --- a/arch/s390/kernel/time.c +++ b/arch/s390/kernel/time.c @@ -139,10 +139,7 @@ int do_settimeofday(struct timespec *tv) set_normalized_timespec(&xtime, sec, nsec); set_normalized_timespec(&wall_to_monotonic, wtm_sec, wtm_nsec); - time_adjust = 0; /* stop active adjtime() */ - time_status |= STA_UNSYNC; - time_maxerror = NTP_PHASE_LIMIT; - time_esterror = NTP_PHASE_LIMIT; + ntp_clear(); write_sequnlock_irq(&xtime_lock); clock_was_set(); return 0; |