hwpmc/arm64: fix the type for pm_arm64_evsel

It holds a 64-bit register, use a uint64_t.

Reviewed by:	mhorne
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D45526
This commit is contained in:
Andrew Turner 2024-06-25 09:41:37 +01:00
parent bbecd3148a
commit 915161b3d3
2 changed files with 5 additions and 4 deletions

View file

@ -163,7 +163,7 @@ static int
arm64_allocate_pmc(int cpu, int ri, struct pmc *pm,
const struct pmc_op_pmcallocate *a)
{
uint32_t config;
uint64_t config;
enum pmc_event pe;
KASSERT(cpu >= 0 && cpu < pmc_cpu_max(),
@ -201,7 +201,8 @@ arm64_allocate_pmc(int cpu, int ri, struct pmc *pm,
}
pm->pm_md.pm_arm64.pm_arm64_evsel = config;
PMCDBG2(MDP, ALL, 2, "arm64-allocate ri=%d -> config=0x%x", ri, config);
PMCDBG2(MDP, ALL, 2, "arm64-allocate ri=%d -> config=0x%lx", ri,
config);
return (0);
}
@ -299,7 +300,7 @@ arm64_config_pmc(int cpu, int ri, struct pmc *pm)
static int
arm64_start_pmc(int cpu, int ri, struct pmc *pm)
{
uint32_t config;
uint64_t config;
config = pm->pm_md.pm_arm64.pm_arm64_evsel;

View file

@ -42,7 +42,7 @@
#ifdef _KERNEL
/* MD extension for 'struct pmc' */
struct pmc_md_arm64_pmc {
uint32_t pm_arm64_evsel;
uint64_t pm_arm64_evsel;
};
#endif /* _KERNEL */
#endif /* _DEV_HWPMC_ARMV8_H_ */