Changeset View
Changeset View
Standalone View
Standalone View
sys/sys/pmc.h
Show First 20 Lines • Show All 398 Lines • ▼ Show 20 Lines | |||||
/* | /* | ||||
* PMC IDs have the following format: | * PMC IDs have the following format: | ||||
* | * | ||||
* +-----------------------+-------+-----------+ | * +-----------------------+-------+-----------+ | ||||
* | CPU | PMC MODE | CLASS | ROW INDEX | | * | CPU | PMC MODE | CLASS | ROW INDEX | | ||||
* +-----------------------+-------+-----------+ | * +-----------------------+-------+-----------+ | ||||
* | * | ||||
* where CPU is 12 bits, MODE 8, CLASS 4, and ROW INDEX 8 Field 'CPU' | * where CPU is 12 bits, MODE 8, CLASS 4, and ROW INDEX 8 Field 'CPU' | ||||
emaste: Comment needs updating? | |||||
rayAuthorUnsubmitted Done Inline ActionsSure. I will update it. ray: Sure. I will update it.
Thank you, Ed! | |||||
* is set to the requested CPU for system-wide PMCs or PMC_CPU_ANY for | * is set to the requested CPU for system-wide PMCs or PMC_CPU_ANY for | ||||
* process-mode PMCs. Field 'PMC MODE' is the allocated PMC mode. | * process-mode PMCs. Field 'PMC MODE' is the allocated PMC mode. | ||||
* Field 'PMC CLASS' is the class of the PMC. Field 'ROW INDEX' is the | * Field 'PMC CLASS' is the class of the PMC. Field 'ROW INDEX' is the | ||||
* row index for the PMC. | * row index for the PMC. | ||||
* | * | ||||
* The 'ROW INDEX' ranges over 0..NWPMCS where NHWPMCS is the total | * The 'ROW INDEX' ranges over 0..NWPMCS where NHWPMCS is the total | ||||
* number of hardware PMCs on this cpu. | * number of hardware PMCs on this cpu. | ||||
*/ | */ | ||||
#define PMC_ID_TO_ROWINDEX(ID) ((ID) & 0xFF) | #define PMC_ID_TO_ROWINDEX(ID) ((ID) & 0xFF) | ||||
#define PMC_ID_TO_CLASS(ID) (((ID) & 0xF00) >> 8) | #define PMC_ID_TO_CLASS(ID) (((ID) & 0xFF00) >> 8) | ||||
#define PMC_ID_TO_MODE(ID) (((ID) & 0xFF000) >> 12) | #define PMC_ID_TO_MODE(ID) (((ID) & 0xF0000) >> 16) | ||||
#define PMC_ID_TO_CPU(ID) (((ID) & 0xFFF00000) >> 20) | #define PMC_ID_TO_CPU(ID) (((ID) & 0xFFF00000) >> 20) | ||||
#define PMC_ID_MAKE_ID(CPU,MODE,CLASS,ROWINDEX) \ | #define PMC_ID_MAKE_ID(CPU,MODE,CLASS,ROWINDEX) \ | ||||
((((CPU) & 0xFFF) << 20) | (((MODE) & 0xFF) << 12) | \ | ((((CPU) & 0xFFF) << 20) | (((MODE) & 0xF) << 16) | \ | ||||
(((CLASS) & 0xF) << 8) | ((ROWINDEX) & 0xFF)) | (((CLASS) & 0xFF) << 8) | ((ROWINDEX) & 0xFF)) | ||||
/* | /* | ||||
* Data structures for system calls supported by the pmc driver. | * Data structures for system calls supported by the pmc driver. | ||||
*/ | */ | ||||
/* | /* | ||||
* OP PMCALLOCATE | * OP PMCALLOCATE | ||||
* | * | ||||
▲ Show 20 Lines • Show All 796 Lines • Show Last 20 Lines |
Comment needs updating?