amdtemp assumes all AMD family 0x0f have two sensors per core. Not all do. This patch, obtained from NetBSD, correctly determines one or two sensors per core.
In addition, this revision corrects temp = ((val >> 21) & 0x7ff) * 5 / 4 to use the macros instead of raw values.
The scope of this revision does not attempt to rename functions or macros which support family 0x0f. This should be considered in another revision. I will submit another revision for that at a later date.