Skip to content

Commit 2363ccb

Browse files
committed
Merge branches 'pm-cpufreq', 'powercap' and 'pm-tools'
* pm-cpufreq: cpufreq: intel_pstate: Fix an annoying !CONFIG_SMP warning intel_pstate: Change the setpoint for Atom params * powercap: powercap / RAPL: Add support for Intel Skylake processors * pm-tools: cpupower: fix breakage from libpci API change
4 parents 0f5abd4 + 64df1fd + 5fa0fa4 + 06b230e commit 2363ccb

File tree

3 files changed

+17
-9
lines changed

3 files changed

+17
-9
lines changed

drivers/cpufreq/intel_pstate.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
#include <asm/div64.h>
3232
#include <asm/msr.h>
3333
#include <asm/cpu_device_id.h>
34+
#include <asm/cpufeature.h>
3435

3536
#define BYT_RATIOS 0x66a
3637
#define BYT_VIDS 0x66b
@@ -649,7 +650,7 @@ static struct cpu_defaults byt_params = {
649650
.pid_policy = {
650651
.sample_rate_ms = 10,
651652
.deadband = 0,
652-
.setpoint = 97,
653+
.setpoint = 60,
653654
.p_gain_pct = 14,
654655
.d_gain_pct = 0,
655656
.i_gain_pct = 4,
@@ -1200,8 +1201,7 @@ static int __init intel_pstate_init(void)
12001201
{
12011202
int cpu, rc = 0;
12021203
const struct x86_cpu_id *id;
1203-
struct cpu_defaults *cpu_info;
1204-
struct cpuinfo_x86 *c = &boot_cpu_data;
1204+
struct cpu_defaults *cpu_def;
12051205

12061206
if (no_load)
12071207
return -ENODEV;
@@ -1217,10 +1217,10 @@ static int __init intel_pstate_init(void)
12171217
if (intel_pstate_platform_pwr_mgmt_exists())
12181218
return -ENODEV;
12191219

1220-
cpu_info = (struct cpu_defaults *)id->driver_data;
1220+
cpu_def = (struct cpu_defaults *)id->driver_data;
12211221

1222-
copy_pid_params(&cpu_info->pid_policy);
1223-
copy_cpu_funcs(&cpu_info->funcs);
1222+
copy_pid_params(&cpu_def->pid_policy);
1223+
copy_cpu_funcs(&cpu_def->funcs);
12241224

12251225
if (intel_pstate_msrs_not_valid())
12261226
return -ENODEV;
@@ -1231,7 +1231,7 @@ static int __init intel_pstate_init(void)
12311231
if (!all_cpu_data)
12321232
return -ENOMEM;
12331233

1234-
if (cpu_has(c,X86_FEATURE_HWP) && !no_hwp)
1234+
if (static_cpu_has_safe(X86_FEATURE_HWP) && !no_hwp)
12351235
intel_pstate_hwp_enable();
12361236

12371237
if (!hwp_active && hwp_only)

drivers/powercap/intel_rapl.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1064,6 +1064,7 @@ static const struct x86_cpu_id rapl_ids[] __initconst = {
10641064
RAPL_CPU(0x3f, rapl_defaults_hsw_server),/* Haswell servers */
10651065
RAPL_CPU(0x4f, rapl_defaults_hsw_server),/* Broadwell servers */
10661066
RAPL_CPU(0x45, rapl_defaults_core),/* Haswell ULT */
1067+
RAPL_CPU(0x4E, rapl_defaults_core),/* Skylake */
10671068
RAPL_CPU(0x4C, rapl_defaults_atom),/* Braswell */
10681069
RAPL_CPU(0x4A, rapl_defaults_atom),/* Tangier */
10691070
RAPL_CPU(0x56, rapl_defaults_core),/* Future Xeon */

tools/power/cpupower/utils/helpers/pci.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,21 @@
2525
struct pci_dev *pci_acc_init(struct pci_access **pacc, int domain, int bus,
2626
int slot, int func, int vendor, int dev)
2727
{
28-
struct pci_filter filter_nb_link = { domain, bus, slot, func,
29-
vendor, dev };
28+
struct pci_filter filter_nb_link;
3029
struct pci_dev *device;
3130

3231
*pacc = pci_alloc();
3332
if (*pacc == NULL)
3433
return NULL;
3534

35+
pci_filter_init(*pacc, &filter_nb_link);
36+
filter_nb_link.domain = domain;
37+
filter_nb_link.bus = bus;
38+
filter_nb_link.slot = slot;
39+
filter_nb_link.func = func;
40+
filter_nb_link.vendor = vendor;
41+
filter_nb_link.device = dev;
42+
3643
pci_init(*pacc);
3744
pci_scan_bus(*pacc);
3845

0 commit comments

Comments
 (0)