diff options
Diffstat (limited to 'arch/powerpc/kernel/time.c')
| -rw-r--r-- | arch/powerpc/kernel/time.c | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c index 09e4dea4a85a..09d31dbf43f9 100644 --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc/kernel/time.c | |||
| @@ -265,11 +265,26 @@ void accumulate_stolen_time(void) | |||
| 265 | { | 265 | { |
| 266 | u64 sst, ust; | 266 | u64 sst, ust; |
| 267 | 267 | ||
| 268 | sst = scan_dispatch_log(get_paca()->starttime_user); | 268 | u8 save_soft_enabled = local_paca->soft_enabled; |
| 269 | ust = scan_dispatch_log(get_paca()->starttime); | 269 | u8 save_hard_enabled = local_paca->hard_enabled; |
| 270 | get_paca()->system_time -= sst; | 270 | |
| 271 | get_paca()->user_time -= ust; | 271 | /* We are called early in the exception entry, before |
| 272 | get_paca()->stolen_time += ust + sst; | 272 | * soft/hard_enabled are sync'ed to the expected state |
| 273 | * for the exception. We are hard disabled but the PACA | ||
| 274 | * needs to reflect that so various debug stuff doesn't | ||
| 275 | * complain | ||
| 276 | */ | ||
| 277 | local_paca->soft_enabled = 0; | ||
| 278 | local_paca->hard_enabled = 0; | ||
| 279 | |||
| 280 | sst = scan_dispatch_log(local_paca->starttime_user); | ||
| 281 | ust = scan_dispatch_log(local_paca->starttime); | ||
| 282 | local_paca->system_time -= sst; | ||
| 283 | local_paca->user_time -= ust; | ||
| 284 | local_paca->stolen_time += ust + sst; | ||
| 285 | |||
| 286 | local_paca->soft_enabled = save_soft_enabled; | ||
| 287 | local_paca->hard_enabled = save_hard_enabled; | ||
| 273 | } | 288 | } |
| 274 | 289 | ||
| 275 | static inline u64 calculate_stolen_time(u64 stop_tb) | 290 | static inline u64 calculate_stolen_time(u64 stop_tb) |
