Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/hwpmc/hwpmc_mpc7xxx.c
Show First 20 Lines • Show All 52 Lines • ▼ Show 20 Lines | |||||
#define PPC_SET_PMC3SEL(r, x) ((r & ~(SPR_MMCR1_PMC3SEL(0x1f))) | SPR_MMCR1_PMC3SEL(x)) | #define PPC_SET_PMC3SEL(r, x) ((r & ~(SPR_MMCR1_PMC3SEL(0x1f))) | SPR_MMCR1_PMC3SEL(x)) | ||||
#define PPC_SET_PMC4SEL(r, x) ((r & ~(SPR_MMCR1_PMC4SEL(0x1f))) | SPR_MMCR1_PMC4SEL(x)) | #define PPC_SET_PMC4SEL(r, x) ((r & ~(SPR_MMCR1_PMC4SEL(0x1f))) | SPR_MMCR1_PMC4SEL(x)) | ||||
#define PPC_SET_PMC5SEL(r, x) ((r & ~(SPR_MMCR1_PMC5SEL(0x1f))) | SPR_MMCR1_PMC5SEL(x)) | #define PPC_SET_PMC5SEL(r, x) ((r & ~(SPR_MMCR1_PMC5SEL(0x1f))) | SPR_MMCR1_PMC5SEL(x)) | ||||
#define PPC_SET_PMC6SEL(r, x) ((r & ~(SPR_MMCR1_PMC6SEL(0x3f))) | SPR_MMCR1_PMC6SEL(x)) | #define PPC_SET_PMC6SEL(r, x) ((r & ~(SPR_MMCR1_PMC6SEL(0x3f))) | SPR_MMCR1_PMC6SEL(x)) | ||||
/* Change this when we support more than just the 7450. */ | /* Change this when we support more than just the 7450. */ | ||||
#define MPC7XXX_MAX_PMCS 6 | #define MPC7XXX_MAX_PMCS 6 | ||||
#define MPC7XXX_PMC_HAS_OVERFLOWED(x) (mpc7xxx_pmcn_read(x) & (0x1 << 31)) | #define MPC7XXX_PMC_HAS_OVERFLOWED(x) (mpc7xxx_pmcn_read(x) & (0x1U << 31)) | ||||
/* | /* | ||||
* Things to improve on this: | * Things to improve on this: | ||||
* - It stops (clears to 0) the PMC and resets it at every context switch | * - It stops (clears to 0) the PMC and resets it at every context switch | ||||
* currently. | * currently. | ||||
*/ | */ | ||||
/* | /* | ||||
▲ Show 20 Lines • Show All 685 Lines • Show Last 20 Lines |