[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>
This commit is contained in:
parent
b86ccca49c
commit
5b409ed17b
3 changed files with 28 additions and 0 deletions
|
@ -27,6 +27,8 @@ int main(void)
|
||||||
DEFINE(__TI_flags, offsetof(struct thread_info, flags));
|
DEFINE(__TI_flags, offsetof(struct thread_info, flags));
|
||||||
DEFINE(__TI_cpu, offsetof(struct thread_info, cpu));
|
DEFINE(__TI_cpu, offsetof(struct thread_info, cpu));
|
||||||
DEFINE(__TI_precount, offsetof(struct thread_info, preempt_count));
|
DEFINE(__TI_precount, offsetof(struct thread_info, preempt_count));
|
||||||
|
DEFINE(__TI_user_timer, offsetof(struct thread_info, user_timer));
|
||||||
|
DEFINE(__TI_system_timer, offsetof(struct thread_info, system_timer));
|
||||||
BLANK();
|
BLANK();
|
||||||
DEFINE(__PT_ARGS, offsetof(struct pt_regs, args));
|
DEFINE(__PT_ARGS, offsetof(struct pt_regs, args));
|
||||||
DEFINE(__PT_PSW, offsetof(struct pt_regs, psw));
|
DEFINE(__PT_PSW, offsetof(struct pt_regs, psw));
|
||||||
|
|
|
@ -837,16 +837,29 @@ mcck_return:
|
||||||
__CPUINIT
|
__CPUINIT
|
||||||
.globl restart_int_handler
|
.globl restart_int_handler
|
||||||
restart_int_handler:
|
restart_int_handler:
|
||||||
|
basr %r1,0
|
||||||
|
restart_base:
|
||||||
|
spt restart_vtime-restart_base(%r1)
|
||||||
|
stck __LC_LAST_UPDATE_CLOCK
|
||||||
|
mvc __LC_LAST_UPDATE_TIMER(8),restart_vtime-restart_base(%r1)
|
||||||
|
mvc __LC_EXIT_TIMER(8),restart_vtime-restart_base(%r1)
|
||||||
l %r15,__LC_SAVE_AREA+60 # load ksp
|
l %r15,__LC_SAVE_AREA+60 # load ksp
|
||||||
lctl %c0,%c15,__LC_CREGS_SAVE_AREA # get new ctl regs
|
lctl %c0,%c15,__LC_CREGS_SAVE_AREA # get new ctl regs
|
||||||
lam %a0,%a15,__LC_AREGS_SAVE_AREA
|
lam %a0,%a15,__LC_AREGS_SAVE_AREA
|
||||||
lm %r6,%r15,__SF_GPRS(%r15) # load registers from clone
|
lm %r6,%r15,__SF_GPRS(%r15) # load registers from clone
|
||||||
|
l %r1,__LC_THREAD_INFO
|
||||||
|
mvc __LC_USER_TIMER(8),__TI_user_timer(%r1)
|
||||||
|
mvc __LC_SYSTEM_TIMER(8),__TI_system_timer(%r1)
|
||||||
|
xc __LC_STEAL_TIMER(8),__LC_STEAL_TIMER
|
||||||
stosm __SF_EMPTY(%r15),0x04 # now we can turn dat on
|
stosm __SF_EMPTY(%r15),0x04 # now we can turn dat on
|
||||||
basr %r14,0
|
basr %r14,0
|
||||||
l %r14,restart_addr-.(%r14)
|
l %r14,restart_addr-.(%r14)
|
||||||
br %r14 # branch to start_secondary
|
br %r14 # branch to start_secondary
|
||||||
restart_addr:
|
restart_addr:
|
||||||
.long start_secondary
|
.long start_secondary
|
||||||
|
.align 8
|
||||||
|
restart_vtime:
|
||||||
|
.long 0x7fffffff,0xffffffff
|
||||||
.previous
|
.previous
|
||||||
#else
|
#else
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -831,14 +831,27 @@ mcck_return:
|
||||||
__CPUINIT
|
__CPUINIT
|
||||||
.globl restart_int_handler
|
.globl restart_int_handler
|
||||||
restart_int_handler:
|
restart_int_handler:
|
||||||
|
basr %r1,0
|
||||||
|
restart_base:
|
||||||
|
spt restart_vtime-restart_base(%r1)
|
||||||
|
stck __LC_LAST_UPDATE_CLOCK
|
||||||
|
mvc __LC_LAST_UPDATE_TIMER(8),restart_vtime-restart_base(%r1)
|
||||||
|
mvc __LC_EXIT_TIMER(8),restart_vtime-restart_base(%r1)
|
||||||
lg %r15,__LC_SAVE_AREA+120 # load ksp
|
lg %r15,__LC_SAVE_AREA+120 # load ksp
|
||||||
lghi %r10,__LC_CREGS_SAVE_AREA
|
lghi %r10,__LC_CREGS_SAVE_AREA
|
||||||
lctlg %c0,%c15,0(%r10) # get new ctl regs
|
lctlg %c0,%c15,0(%r10) # get new ctl regs
|
||||||
lghi %r10,__LC_AREGS_SAVE_AREA
|
lghi %r10,__LC_AREGS_SAVE_AREA
|
||||||
lam %a0,%a15,0(%r10)
|
lam %a0,%a15,0(%r10)
|
||||||
lmg %r6,%r15,__SF_GPRS(%r15) # load registers from clone
|
lmg %r6,%r15,__SF_GPRS(%r15) # load registers from clone
|
||||||
|
lg %r1,__LC_THREAD_INFO
|
||||||
|
mvc __LC_USER_TIMER(8),__TI_user_timer(%r1)
|
||||||
|
mvc __LC_SYSTEM_TIMER(8),__TI_system_timer(%r1)
|
||||||
|
xc __LC_STEAL_TIMER(8),__LC_STEAL_TIMER
|
||||||
stosm __SF_EMPTY(%r15),0x04 # now we can turn dat on
|
stosm __SF_EMPTY(%r15),0x04 # now we can turn dat on
|
||||||
jg start_secondary
|
jg start_secondary
|
||||||
|
.align 8
|
||||||
|
restart_vtime:
|
||||||
|
.long 0x7fffffff,0xffffffff
|
||||||
.previous
|
.previous
|
||||||
#else
|
#else
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Add table
Reference in a new issue