aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-01-02 12:08:45 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2017-01-02 12:08:45 -0500
commit74e5c265a4955d6a01adc40783346b716271170b (patch)
treefc47a6b896e07a06d4bc14cfb5a475fc59d022c3
parent71a332e5603e000b907e66d172eae0e7a8c2c653 (diff)
parentcabab3f9f5ca077535080b3252e6168935b914af (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Pull s390 fixes from Martin Schwidefsky: "Two bug fixes for 4.10-rc3" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/kbuild: enable modversions for symbols exported from asm s390/vtime: correct system time accounting
-rw-r--r--arch/s390/include/asm/asm-prototypes.h8
-rw-r--r--arch/s390/kernel/vtime.c8
2 files changed, 12 insertions, 4 deletions
diff --git a/arch/s390/include/asm/asm-prototypes.h b/arch/s390/include/asm/asm-prototypes.h
new file mode 100644
index 000000000000..2c3413b0ca52
--- /dev/null
+++ b/arch/s390/include/asm/asm-prototypes.h
@@ -0,0 +1,8 @@
1#ifndef _ASM_S390_PROTOTYPES_H
2
3#include <linux/kvm_host.h>
4#include <linux/ftrace.h>
5#include <asm/fpu/api.h>
6#include <asm-generic/asm-prototypes.h>
7
8#endif /* _ASM_S390_PROTOTYPES_H */
diff --git a/arch/s390/kernel/vtime.c b/arch/s390/kernel/vtime.c
index 6b246aadf311..1b5c5ee9fc1b 100644
--- a/arch/s390/kernel/vtime.c
+++ b/arch/s390/kernel/vtime.c
@@ -94,7 +94,7 @@ static void update_mt_scaling(void)
94 * Update process times based on virtual cpu times stored by entry.S 94 * Update process times based on virtual cpu times stored by entry.S
95 * to the lowcore fields user_timer, system_timer & steal_clock. 95 * to the lowcore fields user_timer, system_timer & steal_clock.
96 */ 96 */
97static int do_account_vtime(struct task_struct *tsk, int hardirq_offset) 97static int do_account_vtime(struct task_struct *tsk)
98{ 98{
99 u64 timer, clock, user, system, steal; 99 u64 timer, clock, user, system, steal;
100 u64 user_scaled, system_scaled; 100 u64 user_scaled, system_scaled;
@@ -138,7 +138,7 @@ static int do_account_vtime(struct task_struct *tsk, int hardirq_offset)
138 } 138 }
139 account_user_time(tsk, user); 139 account_user_time(tsk, user);
140 tsk->utimescaled += user_scaled; 140 tsk->utimescaled += user_scaled;
141 account_system_time(tsk, hardirq_offset, system); 141 account_system_time(tsk, 0, system);
142 tsk->stimescaled += system_scaled; 142 tsk->stimescaled += system_scaled;
143 143
144 steal = S390_lowcore.steal_timer; 144 steal = S390_lowcore.steal_timer;
@@ -152,7 +152,7 @@ static int do_account_vtime(struct task_struct *tsk, int hardirq_offset)
152 152
153void vtime_task_switch(struct task_struct *prev) 153void vtime_task_switch(struct task_struct *prev)
154{ 154{
155 do_account_vtime(prev, 0); 155 do_account_vtime(prev);
156 prev->thread.user_timer = S390_lowcore.user_timer; 156 prev->thread.user_timer = S390_lowcore.user_timer;
157 prev->thread.system_timer = S390_lowcore.system_timer; 157 prev->thread.system_timer = S390_lowcore.system_timer;
158 S390_lowcore.user_timer = current->thread.user_timer; 158 S390_lowcore.user_timer = current->thread.user_timer;
@@ -166,7 +166,7 @@ void vtime_task_switch(struct task_struct *prev)
166 */ 166 */
167void vtime_account_user(struct task_struct *tsk) 167void vtime_account_user(struct task_struct *tsk)
168{ 168{
169 if (do_account_vtime(tsk, HARDIRQ_OFFSET)) 169 if (do_account_vtime(tsk))
170 virt_timer_expire(); 170 virt_timer_expire();
171} 171}
172 172