diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2009-04-14 09:36:27 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2009-04-14 09:37:27 -0400 |
commit | 5b409ed17bb32c8316b1f456466c70529454573a (patch) | |
tree | db9731f053d7aee4fe27268febc95d3d9a9fde9d /arch/s390 | |
parent | b86ccca49cd8f22086c1d135ab3051cf48fb1688 (diff) |
[S390] cpu hotplug and accounting values
Reset the cpu timer to the maximum value and correctly initialize the
cpu accounting values in the lowcore when the cpu is started.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390')
-rw-r--r-- | arch/s390/kernel/asm-offsets.c | 2 | ||||
-rw-r--r-- | arch/s390/kernel/entry.S | 13 | ||||
-rw-r--r-- | arch/s390/kernel/entry64.S | 13 |
3 files changed, 28 insertions, 0 deletions
diff --git a/arch/s390/kernel/asm-offsets.c b/arch/s390/kernel/asm-offsets.c index 67a60016babb..fa9905ce7d0b 100644 --- a/arch/s390/kernel/asm-offsets.c +++ b/arch/s390/kernel/asm-offsets.c | |||
@@ -27,6 +27,8 @@ int main(void) | |||
27 | DEFINE(__TI_flags, offsetof(struct thread_info, flags)); | 27 | DEFINE(__TI_flags, offsetof(struct thread_info, flags)); |
28 | DEFINE(__TI_cpu, offsetof(struct thread_info, cpu)); | 28 | DEFINE(__TI_cpu, offsetof(struct thread_info, cpu)); |
29 | DEFINE(__TI_precount, offsetof(struct thread_info, preempt_count)); | 29 | DEFINE(__TI_precount, offsetof(struct thread_info, preempt_count)); |
30 | DEFINE(__TI_user_timer, offsetof(struct thread_info, user_timer)); | ||
31 | DEFINE(__TI_system_timer, offsetof(struct thread_info, system_timer)); | ||
30 | BLANK(); | 32 | BLANK(); |
31 | DEFINE(__PT_ARGS, offsetof(struct pt_regs, args)); | 33 | DEFINE(__PT_ARGS, offsetof(struct pt_regs, args)); |
32 | DEFINE(__PT_PSW, offsetof(struct pt_regs, psw)); | 34 | DEFINE(__PT_PSW, offsetof(struct pt_regs, psw)); |
diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S index 1268aa2991bf..f3e275934213 100644 --- a/arch/s390/kernel/entry.S +++ b/arch/s390/kernel/entry.S | |||
@@ -837,16 +837,29 @@ mcck_return: | |||
837 | __CPUINIT | 837 | __CPUINIT |
838 | .globl restart_int_handler | 838 | .globl restart_int_handler |
839 | restart_int_handler: | 839 | restart_int_handler: |
840 | basr %r1,0 | ||
841 | restart_base: | ||
842 | spt restart_vtime-restart_base(%r1) | ||
843 | stck __LC_LAST_UPDATE_CLOCK | ||
844 | mvc __LC_LAST_UPDATE_TIMER(8),restart_vtime-restart_base(%r1) | ||
845 | mvc __LC_EXIT_TIMER(8),restart_vtime-restart_base(%r1) | ||
840 | l %r15,__LC_SAVE_AREA+60 # load ksp | 846 | l %r15,__LC_SAVE_AREA+60 # load ksp |
841 | lctl %c0,%c15,__LC_CREGS_SAVE_AREA # get new ctl regs | 847 | lctl %c0,%c15,__LC_CREGS_SAVE_AREA # get new ctl regs |
842 | lam %a0,%a15,__LC_AREGS_SAVE_AREA | 848 | lam %a0,%a15,__LC_AREGS_SAVE_AREA |
843 | lm %r6,%r15,__SF_GPRS(%r15) # load registers from clone | 849 | lm %r6,%r15,__SF_GPRS(%r15) # load registers from clone |
850 | l %r1,__LC_THREAD_INFO | ||
851 | mvc __LC_USER_TIMER(8),__TI_user_timer(%r1) | ||
852 | mvc __LC_SYSTEM_TIMER(8),__TI_system_timer(%r1) | ||
853 | xc __LC_STEAL_TIMER(8),__LC_STEAL_TIMER | ||
844 | stosm __SF_EMPTY(%r15),0x04 # now we can turn dat on | 854 | stosm __SF_EMPTY(%r15),0x04 # now we can turn dat on |
845 | basr %r14,0 | 855 | basr %r14,0 |
846 | l %r14,restart_addr-.(%r14) | 856 | l %r14,restart_addr-.(%r14) |
847 | br %r14 # branch to start_secondary | 857 | br %r14 # branch to start_secondary |
848 | restart_addr: | 858 | restart_addr: |
849 | .long start_secondary | 859 | .long start_secondary |
860 | .align 8 | ||
861 | restart_vtime: | ||
862 | .long 0x7fffffff,0xffffffff | ||
850 | .previous | 863 | .previous |
851 | #else | 864 | #else |
852 | /* | 865 | /* |
diff --git a/arch/s390/kernel/entry64.S b/arch/s390/kernel/entry64.S index c6fbde13971a..84a105838e03 100644 --- a/arch/s390/kernel/entry64.S +++ b/arch/s390/kernel/entry64.S | |||
@@ -831,14 +831,27 @@ mcck_return: | |||
831 | __CPUINIT | 831 | __CPUINIT |
832 | .globl restart_int_handler | 832 | .globl restart_int_handler |
833 | restart_int_handler: | 833 | restart_int_handler: |
834 | basr %r1,0 | ||
835 | restart_base: | ||
836 | spt restart_vtime-restart_base(%r1) | ||
837 | stck __LC_LAST_UPDATE_CLOCK | ||
838 | mvc __LC_LAST_UPDATE_TIMER(8),restart_vtime-restart_base(%r1) | ||
839 | mvc __LC_EXIT_TIMER(8),restart_vtime-restart_base(%r1) | ||
834 | lg %r15,__LC_SAVE_AREA+120 # load ksp | 840 | lg %r15,__LC_SAVE_AREA+120 # load ksp |
835 | lghi %r10,__LC_CREGS_SAVE_AREA | 841 | lghi %r10,__LC_CREGS_SAVE_AREA |
836 | lctlg %c0,%c15,0(%r10) # get new ctl regs | 842 | lctlg %c0,%c15,0(%r10) # get new ctl regs |
837 | lghi %r10,__LC_AREGS_SAVE_AREA | 843 | lghi %r10,__LC_AREGS_SAVE_AREA |
838 | lam %a0,%a15,0(%r10) | 844 | lam %a0,%a15,0(%r10) |
839 | lmg %r6,%r15,__SF_GPRS(%r15) # load registers from clone | 845 | lmg %r6,%r15,__SF_GPRS(%r15) # load registers from clone |
846 | lg %r1,__LC_THREAD_INFO | ||
847 | mvc __LC_USER_TIMER(8),__TI_user_timer(%r1) | ||
848 | mvc __LC_SYSTEM_TIMER(8),__TI_system_timer(%r1) | ||
849 | xc __LC_STEAL_TIMER(8),__LC_STEAL_TIMER | ||
840 | stosm __SF_EMPTY(%r15),0x04 # now we can turn dat on | 850 | stosm __SF_EMPTY(%r15),0x04 # now we can turn dat on |
841 | jg start_secondary | 851 | jg start_secondary |
852 | .align 8 | ||
853 | restart_vtime: | ||
854 | .long 0x7fffffff,0xffffffff | ||
842 | .previous | 855 | .previous |
843 | #else | 856 | #else |
844 | /* | 857 | /* |