Page MenuHomeFreeBSD

powerpc: change mfpvr return type to uint32_t

Authored by luporl on Jul 28 2021, 12:41 PM.
Referenced Files
Unknown Object (File)
Feb 22 2024, 3:13 AM
Unknown Object (File)
Feb 10 2024, 5:27 PM
Unknown Object (File)
Jan 14 2024, 4:45 AM
Unknown Object (File)
Dec 7 2023, 7:26 AM
Unknown Object (File)
Dec 6 2023, 10:26 PM
Unknown Object (File)
Nov 11 2023, 8:53 AM
Unknown Object (File)
Nov 10 2023, 9:04 AM
Unknown Object (File)
Nov 9 2023, 6:18 AM



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

Test Plan

Tested on POWER9 VM and build tested on powerpc (32-bit).

Diff Detail

rS FreeBSD src repository - subversion
Lint Passed
No Test Coverage
Build Status
Buildable 40715
Build 37604: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Jul 28 2021, 2:21 PM

minor quibble, but likely not worth addressing.


mfpvr() doesn't return an int now, but a uint32_t which can be either an int or a long. so there's still a mismatch here, just not one the compiler warns about. In the past, this would be a sure way to get a mismatch between 32-bit and 64-bit compiles, but it seems we've moved to always defining uint32_t as an unsigned int. At least the 'x' format is unsigned...

This revision was automatically updated to reflect the committed changes.