From 085ce598691108af6e8917c1f7e81f2719db5ccb Mon Sep 17 00:00:00 2001 From: Tony Breeds Date: Mon, 17 Mar 2008 16:23:29 +1100 Subject: [PATCH] --- yaml --- r: 91441 b: refs/heads/master c: 96366a8d3f17ee964802378d4a1f51fda86f070e h: refs/heads/master i: 91439: f7f39a199012fd2d3ad83f6162b41a49664795d8 v: v3 --- [refs] | 2 +- trunk/arch/powerpc/platforms/pseries/setup.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 61af620b3c2d..ad91fad3cab8 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 71e91a0abb839f8d2372236d8fe0513c295ec717 +refs/heads/master: 96366a8d3f17ee964802378d4a1f51fda86f070e diff --git a/trunk/arch/powerpc/platforms/pseries/setup.c b/trunk/arch/powerpc/platforms/pseries/setup.c index fdb9b1c8f977..90555a39fe62 100644 --- a/trunk/arch/powerpc/platforms/pseries/setup.c +++ b/trunk/arch/powerpc/platforms/pseries/setup.c @@ -393,6 +393,7 @@ static void pseries_dedicated_idle_sleep(void) { unsigned int cpu = smp_processor_id(); unsigned long start_snooze; + unsigned long in_purr, out_purr; /* * Indicate to the HV that we are idle. Now would be @@ -400,6 +401,7 @@ static void pseries_dedicated_idle_sleep(void) */ get_lppaca()->idle = 1; get_lppaca()->donate_dedicated_cpu = 1; + in_purr = mfspr(SPRN_PURR); /* * We come in with interrupts disabled, and need_resched() @@ -432,6 +434,8 @@ static void pseries_dedicated_idle_sleep(void) out: HMT_medium(); + out_purr = mfspr(SPRN_PURR); + get_lppaca()->wait_state_cycles += out_purr - in_purr; get_lppaca()->donate_dedicated_cpu = 0; get_lppaca()->idle = 0; }