Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/hwpmc/hwpmc_ppc970.c
| Show First 20 Lines • Show All 44 Lines • ▼ Show 20 Lines | |||||
| /* MMCR0, PMC1 is 8 bytes in, PMC2 is 1 byte in. */ | /* MMCR0, PMC1 is 8 bytes in, PMC2 is 1 byte in. */ | ||||
| #define PPC970_SET_MMCR0_PMCSEL(r, x, i) \ | #define PPC970_SET_MMCR0_PMCSEL(r, x, i) \ | ||||
| ((r & ~(0x1f << (7 * (1 - i) + 1))) | (x << (7 * (1 - i) + 1))) | ((r & ~(0x1f << (7 * (1 - i) + 1))) | (x << (7 * (1 - i) + 1))) | ||||
| /* MMCR1 has 6 PMC*SEL items (PMC3->PMC8), in sequence. */ | /* MMCR1 has 6 PMC*SEL items (PMC3->PMC8), in sequence. */ | ||||
| #define PPC970_SET_MMCR1_PMCSEL(r, x, i) \ | #define PPC970_SET_MMCR1_PMCSEL(r, x, i) \ | ||||
| ((r & ~(0x1f << (5 * (7 - i) + 2))) | (x << (5 * (7 - i) + 2))) | ((r & ~(0x1f << (5 * (7 - i) + 2))) | (x << (5 * (7 - i) + 2))) | ||||
| #define PPC970_PMC_HAS_OVERFLOWED(x) (ppc970_pmcn_read(x) & (0x1 << 31)) | #define PPC970_PMC_HAS_OVERFLOWED(x) (ppc970_pmcn_read(x) & (0x1U << 31)) | ||||
| /* How PMC works on PPC970: | /* How PMC works on PPC970: | ||||
| * | * | ||||
| * Any PMC can count a direct event. Indirect events are handled specially. | * Any PMC can count a direct event. Indirect events are handled specially. | ||||
| * Direct events: As published. | * Direct events: As published. | ||||
| * | * | ||||
| * Encoding 00 000 -- Add byte lane bit counters | * Encoding 00 000 -- Add byte lane bit counters | ||||
| * MMCR1[24:31] -- select bit matching PMC being an adder. | * MMCR1[24:31] -- select bit matching PMC being an adder. | ||||
| ▲ Show 20 Lines • Show All 628 Lines • Show Last 20 Lines | |||||