lkml.org 
[lkml]   [2019]   [Apr]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 09/14] thermal/x86_pkg_temp_thermal: Support multi-die/package
On Tue, 26 Feb 2019, Len Brown wrote:
> static int __init pkg_temp_thermal_init(void)
> {
> int ret;
> + struct cpuinfo_x86 *c = &cpu_data(0);
>
> if (!x86_match_cpu(pkg_temp_thermal_ids))
> return -ENODEV;
>
> - max_packages = topology_max_packages();
> + max_packages = topology_max_packages() * c->x86_max_dies;

This is really a sloppy hack. Just because cpuinfo is accessible it's not a
good idea to fiddle with it in a driver. We went great length to abstract
that stuff. So please add a new helper function topology_max_dies() and
retrieve it from that.

Thanks,

tglx

\
 
 \ /
  Last update: 2019-04-05 20:30    [W:0.136 / U:36.564 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site