Lines Matching refs:cpudata

227 struct cpudata {  struct
265 static struct cpudata **all_cpu_data; argument
290 u64 (*get_val)(struct cpudata*, int pstate);
291 void (*get_vid)(struct cpudata *);
441 struct cpudata *cpu; in intel_pstate_init_acpi_perf_limits()
497 struct cpudata *cpu; in intel_pstate_exit_perf_limits()
532 static int intel_pstate_freq_to_hwp_rel(struct cpudata *cpu, int freq, in intel_pstate_freq_to_hwp_rel()
551 static int intel_pstate_freq_to_hwp(struct cpudata *cpu, int freq) in intel_pstate_freq_to_hwp()
567 static void intel_pstate_hybrid_hwp_adjust(struct cpudata *cpu) in intel_pstate_hybrid_hwp_adjust()
610 struct cpudata *cpu = all_cpu_data[0]; in min_perf_pct_min()
617 static s16 intel_pstate_get_epb(struct cpudata *cpu_data) in intel_pstate_get_epb()
632 static s16 intel_pstate_get_epp(struct cpudata *cpu_data, u64 hwp_req_data) in intel_pstate_get_epp()
710 static int intel_pstate_get_energy_pref_index(struct cpudata *cpu_data, int *raw_epp) in intel_pstate_get_energy_pref_index()
748 static int intel_pstate_set_epp(struct cpudata *cpu, u32 epp) in intel_pstate_set_epp()
774 static int intel_pstate_set_energy_pref_index(struct cpudata *cpu_data, in intel_pstate_set_energy_pref_index()
829 struct cpudata *cpu = all_cpu_data[policy->cpu]; in store_energy_performance_preference()
897 struct cpudata *cpu_data = all_cpu_data[policy->cpu]; in show_energy_performance_preference()
914 struct cpudata *cpu = all_cpu_data[policy->cpu]; in show_base_frequency()
941 static struct cpudata *hybrid_max_perf_cpu __read_mostly;
948 static void hybrid_set_cpu_capacity(struct cpudata *cpu) in hybrid_set_cpu_capacity()
965 static void hybrid_get_capacity_perf(struct cpudata *cpu) in hybrid_get_capacity_perf()
980 struct cpudata *cpu = all_cpu_data[cpunum]; in hybrid_set_capacity_of_cpus()
989 struct cpudata *max_perf_cpu = NULL; in hybrid_update_cpu_capacity_scaling()
994 struct cpudata *cpu = all_cpu_data[cpunum]; in hybrid_update_cpu_capacity_scaling()
1083 static void __intel_pstate_get_hwp_cap(struct cpudata *cpu) in __intel_pstate_get_hwp_cap()
1093 static void intel_pstate_get_hwp_cap(struct cpudata *cpu) in intel_pstate_get_hwp_cap()
1111 static void hybrid_update_capacity(struct cpudata *cpu) in hybrid_update_capacity()
1150 struct cpudata *cpu_data = all_cpu_data[cpu]; in intel_pstate_hwp_set()
1211 static void intel_pstate_disable_hwp_interrupt(struct cpudata *cpudata);
1213 static void intel_pstate_hwp_offline(struct cpudata *cpu) in intel_pstate_hwp_offline()
1296 static void intel_pstate_hwp_enable(struct cpudata *cpudata);
1298 static void intel_pstate_hwp_reenable(struct cpudata *cpu) in intel_pstate_hwp_reenable()
1306 struct cpudata *cpu = all_cpu_data[policy->cpu]; in intel_pstate_suspend()
1320 struct cpudata *cpu = all_cpu_data[policy->cpu]; in intel_pstate_resume()
1352 static void __intel_pstate_update_max_freq(struct cpudata *cpudata, in __intel_pstate_update_max_freq() argument
1356 intel_pstate_get_hwp_cap(cpudata); in __intel_pstate_update_max_freq()
1359 cpudata->pstate.max_freq : cpudata->pstate.turbo_freq; in __intel_pstate_update_max_freq()
1367 struct cpudata *cpudata; in intel_pstate_update_limits() local
1372 cpudata = all_cpu_data[cpu]; in intel_pstate_update_limits()
1374 __intel_pstate_update_max_freq(cpudata, policy); in intel_pstate_update_limits()
1381 hybrid_update_capacity(cpudata); in intel_pstate_update_limits()
1448 struct cpudata *cpu; in show_turbo_pct()
1474 struct cpudata *cpu; in show_num_pstates()
1548 struct cpudata *cpu = all_cpu_data[0]; in store_no_turbo()
1574 struct cpudata *cpu = all_cpu_data[i]; in update_qos_request()
1837 struct cpudata *cpudata = in intel_pstate_notify_work() local
1838 container_of(to_delayed_work(work), struct cpudata, hwp_notify_work); in intel_pstate_notify_work()
1839 struct cpufreq_policy *policy = cpufreq_cpu_acquire(cpudata->cpu); in intel_pstate_notify_work()
1842 __intel_pstate_update_max_freq(cpudata, policy); in intel_pstate_notify_work()
1851 hybrid_update_capacity(cpudata); in intel_pstate_notify_work()
1854 wrmsrl_on_cpu(cpudata->cpu, MSR_HWP_STATUS, 0); in intel_pstate_notify_work()
1897 static void intel_pstate_disable_hwp_interrupt(struct cpudata *cpudata) in intel_pstate_disable_hwp_interrupt() argument
1905 wrmsrl_on_cpu(cpudata->cpu, MSR_HWP_INTERRUPT, 0x00); in intel_pstate_disable_hwp_interrupt()
1908 cancel_work = cpumask_test_and_clear_cpu(cpudata->cpu, &hwp_intr_enable_mask); in intel_pstate_disable_hwp_interrupt()
1912 cancel_delayed_work_sync(&cpudata->hwp_notify_work); in intel_pstate_disable_hwp_interrupt()
1918 static void intel_pstate_enable_hwp_interrupt(struct cpudata *cpudata) in intel_pstate_enable_hwp_interrupt() argument
1925 INIT_DELAYED_WORK(&cpudata->hwp_notify_work, intel_pstate_notify_work); in intel_pstate_enable_hwp_interrupt()
1926 cpumask_set_cpu(cpudata->cpu, &hwp_intr_enable_mask); in intel_pstate_enable_hwp_interrupt()
1933 wrmsrl_on_cpu(cpudata->cpu, MSR_HWP_INTERRUPT, interrupt_mask); in intel_pstate_enable_hwp_interrupt()
1934 wrmsrl_on_cpu(cpudata->cpu, MSR_HWP_STATUS, 0); in intel_pstate_enable_hwp_interrupt()
1938 static void intel_pstate_update_epp_defaults(struct cpudata *cpudata) in intel_pstate_update_epp_defaults() argument
1940 cpudata->epp_default = intel_pstate_get_epp(cpudata, 0); in intel_pstate_update_epp_defaults()
1948 if (hwp_forced && cpudata->epp_default <= HWP_EPP_BALANCE_PERFORMANCE && in intel_pstate_update_epp_defaults()
1949 cpudata->epp_default > HWP_EPP_PERFORMANCE) { in intel_pstate_update_epp_defaults()
1950 epp_values[EPP_INDEX_BALANCE_PERFORMANCE] = cpudata->epp_default; in intel_pstate_update_epp_defaults()
1965 cpudata->epp_default = epp_values[EPP_INDEX_BALANCE_PERFORMANCE]; in intel_pstate_update_epp_defaults()
1966 intel_pstate_set_epp(cpudata, cpudata->epp_default); in intel_pstate_update_epp_defaults()
1969 static void intel_pstate_hwp_enable(struct cpudata *cpudata) in intel_pstate_hwp_enable() argument
1973 wrmsrl_on_cpu(cpudata->cpu, MSR_HWP_INTERRUPT, 0x00); in intel_pstate_hwp_enable()
1975 wrmsrl_on_cpu(cpudata->cpu, MSR_PM_ENABLE, 0x1); in intel_pstate_hwp_enable()
1977 intel_pstate_enable_hwp_interrupt(cpudata); in intel_pstate_hwp_enable()
1979 if (cpudata->epp_default >= 0) in intel_pstate_hwp_enable()
1982 intel_pstate_update_epp_defaults(cpudata); in intel_pstate_hwp_enable()
2009 static u64 atom_get_val(struct cpudata *cpudata, int pstate) in atom_get_val() argument
2019 vid_fp = cpudata->vid.min + mul_fp( in atom_get_val()
2020 int_tofp(pstate - cpudata->pstate.min_pstate), in atom_get_val()
2021 cpudata->vid.ratio); in atom_get_val()
2023 vid_fp = clamp_t(int32_t, vid_fp, cpudata->vid.min, cpudata->vid.max); in atom_get_val()
2026 if (pstate > cpudata->pstate.max_pstate) in atom_get_val()
2027 vid = cpudata->vid.turbo; in atom_get_val()
2063 static void atom_get_vid(struct cpudata *cpudata) in atom_get_vid() argument
2068 cpudata->vid.min = int_tofp((value >> 8) & 0x7f); in atom_get_vid()
2069 cpudata->vid.max = int_tofp((value >> 16) & 0x7f); in atom_get_vid()
2070 cpudata->vid.ratio = div_fp( in atom_get_vid()
2071 cpudata->vid.max - cpudata->vid.min, in atom_get_vid()
2072 int_tofp(cpudata->pstate.max_pstate - in atom_get_vid()
2073 cpudata->pstate.min_pstate)); in atom_get_vid()
2076 cpudata->vid.turbo = value & 0x7f; in atom_get_vid()
2176 static u64 core_get_val(struct cpudata *cpudata, int pstate) in core_get_val() argument
2236 static void intel_pstate_set_pstate(struct cpudata *cpu, int pstate) in intel_pstate_set_pstate()
2249 static void intel_pstate_set_min_pstate(struct cpudata *cpu) in intel_pstate_set_min_pstate()
2254 static void intel_pstate_get_cpu_pstates(struct cpudata *cpu) in intel_pstate_get_cpu_pstates()
2309 static inline void intel_pstate_hwp_boost_up(struct cpudata *cpu) in intel_pstate_hwp_boost_up()
2356 static inline void intel_pstate_hwp_boost_down(struct cpudata *cpu) in intel_pstate_hwp_boost_down()
2372 static inline void intel_pstate_update_util_hwp_local(struct cpudata *cpu, in intel_pstate_update_util_hwp_local()
2404 struct cpudata *cpu = container_of(data, struct cpudata, update_util); in intel_pstate_update_util_hwp()
2412 static inline void intel_pstate_calc_avg_perf(struct cpudata *cpu) in intel_pstate_calc_avg_perf()
2419 static inline bool intel_pstate_sample(struct cpudata *cpu, u64 time) in intel_pstate_sample()
2461 static inline int32_t get_avg_frequency(struct cpudata *cpu) in get_avg_frequency()
2466 static inline int32_t get_avg_pstate(struct cpudata *cpu) in get_avg_pstate()
2472 static inline int32_t get_target_pstate(struct cpudata *cpu) in get_target_pstate()
2507 static int intel_pstate_prepare_request(struct cpudata *cpu, int pstate) in intel_pstate_prepare_request()
2515 static void intel_pstate_update_pstate(struct cpudata *cpu, int pstate) in intel_pstate_update_pstate()
2524 static void intel_pstate_adjust_pstate(struct cpudata *cpu) in intel_pstate_adjust_pstate()
2550 struct cpudata *cpu = container_of(data, struct cpudata, update_util); in intel_pstate_update_util()
2681 struct cpudata *cpu; in intel_pstate_init_cpu()
2723 struct cpudata *cpu = all_cpu_data[cpu_num]; in intel_pstate_set_update_util_hook()
2742 struct cpudata *cpu_data = all_cpu_data[cpu]; in intel_pstate_clear_update_util_hook()
2752 static int intel_pstate_get_max_freq(struct cpudata *cpu) in intel_pstate_get_max_freq()
2758 static void intel_pstate_update_perf_limits(struct cpudata *cpu, in intel_pstate_update_perf_limits()
2823 struct cpudata *cpu; in intel_pstate_set_policy()
2872 static void intel_pstate_adjust_policy_max(struct cpudata *cpu, in intel_pstate_adjust_policy_max()
2884 static void intel_pstate_verify_cpu_policy(struct cpudata *cpu, in intel_pstate_verify_cpu_policy()
2910 struct cpudata *cpu = all_cpu_data[policy->cpu]; in intel_cpufreq_cpu_offline()
2935 struct cpudata *cpu = all_cpu_data[policy->cpu]; in intel_pstate_cpu_online()
2971 struct cpudata *cpu; in __intel_pstate_cpu_init()
3012 struct cpudata *cpu = all_cpu_data[policy->cpu]; in intel_pstate_cpu_init()
3036 struct cpudata *cpu = all_cpu_data[policy->cpu]; in intel_cpufreq_verify_policy()
3060 static void intel_cpufreq_trace(struct cpudata *cpu, unsigned int trace_type, int old_pstate) in intel_cpufreq_trace()
3082 static void intel_cpufreq_hwp_update(struct cpudata *cpu, u32 min, u32 max, in intel_cpufreq_hwp_update()
3106 static void intel_cpufreq_perf_ctl_update(struct cpudata *cpu, in intel_cpufreq_perf_ctl_update()
3120 struct cpudata *cpu = all_cpu_data[policy->cpu]; in intel_cpufreq_update_pstate()
3146 struct cpudata *cpu = all_cpu_data[policy->cpu]; in intel_cpufreq_target()
3168 struct cpudata *cpu = all_cpu_data[policy->cpu]; in intel_cpufreq_fast_switch()
3183 struct cpudata *cpu = all_cpu_data[cpunum]; in intel_cpufreq_adjust_perf()
3226 struct cpudata *cpu; in intel_cpufreq_cpu_init()
3315 struct cpudata *cpu = all_cpu_data[policy->cpu]; in intel_cpufreq_suspend()
3674 static struct cpudata **_all_cpu_data; in intel_pstate_init()