View | Details | Raw Unified | Return to bug 198149 | Differences between
and this patch

Collapse All | Expand All

(-)b/sys/dev/hwpmc/hwpmc_core.c (-2 / +2 lines)
Lines 203-210 core_pcpu_fini(struct pmc_mdep *md, int cpu) Link Here
203
static pmc_value_t
203
static pmc_value_t
204
iaf_perfctr_value_to_reload_count(pmc_value_t v)
204
iaf_perfctr_value_to_reload_count(pmc_value_t v)
205
{
205
{
206
	v &= (1ULL << core_iaf_width) - 1;
206
	/* Sign extend the value and then invert it. */
207
	return (1ULL << core_iaf_width) - v;
207
	return -(int64_t)v << (64 - core_iaf_width) >> (64 - core_iaf_width);
208
}
208
}
209
209
210
static pmc_value_t
210
static pmc_value_t

Return to bug 198149