Beispiel #1
0
void set_thresholds(unsigned long cpu)
{
#ifdef CONFIG_TAU_INT
	/*
	 * setup THRM1,
	 * threshold, valid bit, enable interrupts, interrupt when below threshold
	 */
	mtspr(SPRN_THRM1, THRM1_THRES(tau[cpu].low) | THRM1_V | THRM1_TIE | THRM1_TID);

	/* setup THRM2,
	 * threshold, valid bit, enable interrupts, interrupt when above threshhold
	 */
	mtspr (SPRN_THRM2, THRM1_THRES(tau[cpu].high) | THRM1_V | THRM1_TIE);
#else
	/* same thing but don't enable interrupts */
	mtspr(SPRN_THRM1, THRM1_THRES(tau[cpu].low) | THRM1_V | THRM1_TID);
	mtspr(SPRN_THRM2, THRM1_THRES(tau[cpu].high) | THRM1_V);
#endif
}
void set_thresholds(unsigned long cpu)
{
#ifdef CONFIG_TAU_INT
	/*
                
                                                                           
  */
	mtspr(SPRN_THRM1, THRM1_THRES(tau[cpu].low) | THRM1_V | THRM1_TIE | THRM1_TID);

	/*             
                                                                           
  */
	mtspr (SPRN_THRM2, THRM1_THRES(tau[cpu].high) | THRM1_V | THRM1_TIE);
#else
	/*                                        */
	mtspr(SPRN_THRM1, THRM1_THRES(tau[cpu].low) | THRM1_V | THRM1_TID);
	mtspr(SPRN_THRM2, THRM1_THRES(tau[cpu].high) | THRM1_V);
#endif
}
Beispiel #3
0
static void
fix_thrm_spr( void )
{
	ulong v, t;
	int i;

	if( !(mregs->spr[S_THRM3] & THRM3_E) )
		return;

	/* XXX: Thermal interrupts are unimplemented */
	for( i=S_THRM1 ; i<= S_THRM2 ; i++ ) {
		v = mregs->spr[i];
		if( !(v & THRM1_V) )
			continue;
		v |= THRM1_TIV;
		v &= ~THRM1_TIN;
		t = v & THRM1_THRES(127);
		if( (v & THRM1_TID) && t < THRM1_THRES(24) )
			v |= THRM1_TIN;
		if( !(v & THRM1_TID) && t > THRM1_THRES(24) )
			v |= THRM1_TIN;
		mregs->spr[i] = v;
	}
}