In case we compile in device pmu, the kernel will use CCNT when available to expose cycle counts.
In that case we cannot have HWPMC manage that counter (and interrupts for it).
Put safeguards into the HWPMC code to prevent this from happening; in case someone does try to write to it silently accept, and for reading call the generic kernel function.
It is an "artificial" counter on armv7 (and should really be a soft counter), so if worse comes to worse we could just remove it entirely.
Details
Details
Diff Detail
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
sys/dev/hwpmc/hwpmc_armv7.c | ||
---|---|---|
235 | Or invert the logic so we have: if (pm_armv7_evsel != 0xFF) armv7_pmcn_write(ri, v); #ifndef DEV_PMU else cp15_pmccntr_set(v); #endif |
Comment Actions
I think a dependency was rejected. This was Cambridge Teaching material code. I would assume this is overcome by time and changes a lot since. I have no more access to these trees where this came from to see. I am abandoning it to clean up.