mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 12:54:27 +00:00
powerpc: change mfpvr return type to uint32_t
As the Processor Version Register (PVR) is a 32-bit PowerPC register, change mfpvr() return type to match it and avoid type casts on its callers. Suggested by: jhibbits Reviewed by: jhibbits, imp Sponsored by: Instituto de Pesquisas Eldorado (eldorado.org.br) Differential Revision: https://reviews.freebsd.org/D31332
This commit is contained in:
parent
7045b1603b
commit
7844e5a4fc
|
@ -604,7 +604,7 @@ pmc_md_initialize()
|
|||
}
|
||||
|
||||
/* Set the value for kern.hwpmc.cpuid */
|
||||
snprintf(pmc_cpuid, sizeof(pmc_cpuid), "%08jx", (uintmax_t)mfpvr());
|
||||
snprintf(pmc_cpuid, sizeof(pmc_cpuid), "%08x", mfpvr());
|
||||
|
||||
return (pmc_mdep);
|
||||
}
|
||||
|
|
|
@ -125,10 +125,10 @@ mfdec(void)
|
|||
return (value);
|
||||
}
|
||||
|
||||
static __inline register_t
|
||||
static __inline uint32_t
|
||||
mfpvr(void)
|
||||
{
|
||||
register_t value;
|
||||
uint32_t value;
|
||||
|
||||
__asm __volatile ("mfpvr %0" : "=r"(value));
|
||||
|
||||
|
|
Loading…
Reference in a new issue