kernel/eka/drivers/power/smppower/idlehelper.cpp
branchGCC_SURGE
changeset 221 39b39e1a406e
parent 201 43365a9b78a3
equal deleted inserted replaced
219:0ff03867bdb6 221:39b39e1a406e
     1 // Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     3 // This component and the accompanying materials are made available
     4 // under the terms of the License "Eclipse Public License v1.0"
     4 // under the terms of the License "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL " http://www.eclipse.org/legal/epl-v10.html ".
     6 // at the URL " http://www.eclipse.org/legal/epl-v10.html ".
    68    Returns TRUE if any interrupt is pending,FALSE otherwise 
    68    Returns TRUE if any interrupt is pending,FALSE otherwise 
    69 */	
    69 */	
    70 
    70 
    71 TBool TIdleSupport::IsIntPending()
    71 TBool TIdleSupport::IsIntPending()
    72 	{
    72 	{
    73 	return (IntPending()!=KNoInterruptsPending);
    73 	return ((TUint32)IntPending()!=KNoInterruptsPending);
    74 	}
    74 	}
    75 		
    75 		
    76 /**
    76 /**
    77    Set the piroity of the Idle IPI to be the highest
    77    Set the piroity of the Idle IPI to be the highest
    78    @pre 
    78    @pre 
   188 
   188 
   189 
   189 
   190 /**
   190 /**
   191    mark a core as retired
   191    mark a core as retired
   192 
   192 
   193    @pre called by idle handler
   193    @pre called by idle handler as part of idle entry before 
       
   194           any syncpoint or calls to SetLocalAndCheckSetGlobalIdle
   194 */	
   195 */	
   195 void TIdleSupport::MarkCoreRetired(TUint32 aCpuMask)
   196 void TIdleSupport::MarkCoreRetired(TUint32 aCpuMask)
   196     {
   197     {
   197     __e32_atomic_and_rlx32(&iAllEngagedCpusMask,~aCpuMask);
   198     __e32_atomic_and_rlx32(&iAllEngagedCpusMask,~aCpuMask);
   198     PMBTRACE4(KRetireCore,KRetireMarkCoreRetired,aCpuMask);
   199     PMBTRACE4(KRetireCore,KRetireMarkCoreRetired,aCpuMask);
   199     }
   200     }
   200 
   201 
   201 /**
   202 /**
   202    mark a core as enaged
   203    mark a core as enaged
   203    @pre called outside idle handler
   204    @pre called outside idle handler ( can be called in idle entry before 
       
   205         any syncpoint or calls to SetLocalAndCheckSetGlobalIdle
   204  */	
   206  */	
   205 void TIdleSupport::MarkCoreEngaged(TUint32 aCpuMask)
   207 void TIdleSupport::MarkCoreEngaged(TUint32 aCpuMask)
   206     {
   208     {
   207     __e32_atomic_ior_rlx32(&iAllEngagedCpusMask,aCpuMask);
   209     __e32_atomic_ior_rlx32(&iAllEngagedCpusMask,aCpuMask);
   208     PMBTRACE4(KEngageCore,KEngageMarkCoreEngaged,aCpuMask);
   210     PMBTRACE4(KEngageCore,KEngageMarkCoreEngaged,aCpuMask);