]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Merge branches 'intel_pstate' and 'pm-domains'
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 20 Jul 2017 16:57:15 +0000 (18:57 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 20 Jul 2017 16:57:15 +0000 (18:57 +0200)
* intel_pstate:
  cpufreq: intel_pstate: Correct the busy calculation for KNL

* pm-domains:
  PM / Domains: defer dev_pm_domain_set() until genpd->attach_dev succeeds if present

1  2  3 
drivers/base/power/domain.c
drivers/cpufreq/intel_pstate.c

Simple merge
index b7fb8b7c980dc5d2eb2001e4790910cb5b399514,0ddc0d045831569d3211a2892a33a8de7be73da4,283491f742d3d78659696bd58c48fc5a3bd7a370..6cd50352563894bea24866d2d36d6b815d0abc20
@@@@ -321,23 -325,24 -335,26 +325,24 @@@@ struct pstate_funcs 
        int (*get_min)(void);
        int (*get_turbo)(void);
        int (*get_scaling)(void);
+ +     int (*get_aperf_mperf_shift)(void);
        u64 (*get_val)(struct cpudata*, int pstate);
        void (*get_vid)(struct cpudata *);
  -     int32_t (*get_target_pstate)(struct cpudata *);
  +     void (*update_util)(struct update_util_data *data, u64 time,
  +                         unsigned int flags);
   };
   
  -/**
  - * struct cpu_defaults- Per CPU model default config data
  - * @pid_policy:      PID config data
  - * @funcs:           Callback function data
  - */
  -struct cpu_defaults {
  -     struct pstate_adjust_policy pid_policy;
  -     struct pstate_funcs funcs;
  +static struct pstate_funcs pstate_funcs __read_mostly;
  +static struct pstate_adjust_policy pid_params __read_mostly = {
  +     .sample_rate_ms = 10,
  +     .sample_rate_ns = 10 * NSEC_PER_MSEC,
  +     .deadband = 0,
  +     .setpoint = 97,
  +     .p_gain_pct = 20,
  +     .d_gain_pct = 0,
  +     .i_gain_pct = 0,
   };
   
  -static inline int32_t get_target_pstate_use_performance(struct cpudata *cpu);
  -static inline int32_t get_target_pstate_use_cpu_load(struct cpudata *cpu);
  -
  -static struct pstate_adjust_policy pid_params __read_mostly;
  -static struct pstate_funcs pstate_funcs __read_mostly;
   static int hwp_active __read_mostly;
   static bool per_cpu_limits __read_mostly;
   
@@@@ -1770,58 -1789,59 -1932,6 +1785,59 @@@@ static void intel_pstate_update_util(st
        }
   }
   
  +static struct pstate_funcs core_funcs = {
  +     .get_max = core_get_max_pstate,
  +     .get_max_physical = core_get_max_pstate_physical,
  +     .get_min = core_get_min_pstate,
  +     .get_turbo = core_get_turbo_pstate,
  +     .get_scaling = core_get_scaling,
  +     .get_val = core_get_val,
  +     .update_util = intel_pstate_update_util_pid,
  +};
  +
  +static const struct pstate_funcs silvermont_funcs = {
  +     .get_max = atom_get_max_pstate,
  +     .get_max_physical = atom_get_max_pstate,
  +     .get_min = atom_get_min_pstate,
  +     .get_turbo = atom_get_turbo_pstate,
  +     .get_val = atom_get_val,
  +     .get_scaling = silvermont_get_scaling,
  +     .get_vid = atom_get_vid,
  +     .update_util = intel_pstate_update_util,
  +};
  +
  +static const struct pstate_funcs airmont_funcs = {
  +     .get_max = atom_get_max_pstate,
  +     .get_max_physical = atom_get_max_pstate,
  +     .get_min = atom_get_min_pstate,
  +     .get_turbo = atom_get_turbo_pstate,
  +     .get_val = atom_get_val,
  +     .get_scaling = airmont_get_scaling,
  +     .get_vid = atom_get_vid,
  +     .update_util = intel_pstate_update_util,
  +};
  +
  +static const struct pstate_funcs knl_funcs = {
  +     .get_max = core_get_max_pstate,
  +     .get_max_physical = core_get_max_pstate_physical,
  +     .get_min = core_get_min_pstate,
  +     .get_turbo = knl_get_turbo_pstate,
+ +     .get_aperf_mperf_shift = knl_get_aperf_mperf_shift,
  +     .get_scaling = core_get_scaling,
  +     .get_val = core_get_val,
  +     .update_util = intel_pstate_update_util_pid,
  +};
  +
  +static const struct pstate_funcs bxt_funcs = {
  +     .get_max = core_get_max_pstate,
  +     .get_max_physical = core_get_max_pstate_physical,
  +     .get_min = core_get_min_pstate,
  +     .get_turbo = core_get_turbo_pstate,
  +     .get_scaling = core_get_scaling,
  +     .get_val = core_get_val,
  +     .update_util = intel_pstate_update_util,
  +};
  +
   #define ICPU(model, policy) \
        { X86_VENDOR_INTEL, 6, model, X86_FEATURE_APERFMPERF,\
                        (unsigned long)&policy }
@@@@ -2402,7 -2422,8 -2498,7 +2418,8 @@@@ static void __init copy_cpu_funcs(struc
        pstate_funcs.get_scaling = funcs->get_scaling;
        pstate_funcs.get_val   = funcs->get_val;
        pstate_funcs.get_vid   = funcs->get_vid;
  -     pstate_funcs.get_target_pstate = funcs->get_target_pstate;
  +     pstate_funcs.update_util = funcs->update_util;
+ +     pstate_funcs.get_aperf_mperf_shift = funcs->get_aperf_mperf_shift;
   
        intel_pstate_use_acpi_profile();
   }