AMD Sends Out Linux Temperature Driver Patches For Zen 2 CPUs
It looks like my report on AMD kicking off Zen 2 Linux enablement from last month is panning out. Earlier this week they posted the initial AMD Zen 2 "znver2" support for the GCC compiler and they are ending the week back in kernel space with an updated hardware monitoring driver for being able to report the CPU core temperatures of these CPUs shipping in 2019.
The patch series sent out a short time ago add k10temp support for AMD F17h M30h. The k10temp driver is the "hwmon" subsystem driver for reading the CPU core temperature on recent generations of AMD hardware, including Zen 1 and soon Zen 2. Family 17h Model 30 and newer is Zen 2, which is also firmed up by the aforementioned znver2 compiler patches.
These four patches to k10temp allow for Zen 2 CPU core temperatures to be reported to Linux user-space. The patches are larger than normal due to the new processors reporting multiple roots per Data Fabric / SMN interface, so some basic tweaks had to be applied to the querying logic. But these kernel patches don't reveal any new surprises about Zen 2 that we didn't already know, just new PCI IDs.
It's great to see AMD getting this k10temp driver support out ahead of the processors shipping, which will begin in H1'2019 with AMD EPYC 2 "Rome" processors. With the original Zen/Ryzen launch, k10temp support didn't come until months after launch. Even for this year's Threadripper 2 launch the (quite simple) k10temp code wasn't even sent in early and I ended up submitting that patch to get the support squared away in the Linux kernel. So seeing AMD themselves sending in this Zen 2 k10temp code months before these next-gen CPUs launching is a good sign the Linux support is going to come together nicely.
These k10temp patches aren't candidates for merging in the current Linux 4.20/5.0 development cycle but will be material for merging in the follow-on kernel cycle in late December or early January, presumably with more Zen 2 patches in tow.