FreeBSD/sys/dev/hwpmc/hwpmc_amd.c
/*
 * return the MSR address of the given PMC.
 */
return the MSR address of the given PMC.
return the MSR address of the given PMC .
static int
amd_get_msr(int ri, uint32_t *msr)
{
	KASSERT(ri >= 0 && ri < AMD_NPMCS,
	    ("[amd,%d] ri %d out of range", __LINE__, ri));
	*msr = amd_pmcdesc[ri].pm_perfctr - AMD_PMC_PERFCTR_0;
	return (0);
}
static int amd_get_msr ( int ri , uint32_t * msr ) { KASSERT ( ri >= 0 && ri < AMD_NPMCS , ( " " , __LINE__ , ri ) ) ; * msr = amd_pmcdesc [ ri ] . pm_perfctr - AMD_PMC_PERFCTR_0 ; return ( 0 ) ; }
return the MSR address of the given PMC.
return the MSR address of the given PMC .