/* SPDX-License-Identifier: GPL-2.0-only */1/*2* Header file for CPUFreq ondemand governor and related code.3*4* Copyright (C) 2016, Intel Corporation5* Author: Rafael J. Wysocki <[email protected]>6*/78#include "cpufreq_governor.h"910struct od_policy_dbs_info {11struct policy_dbs_info policy_dbs;12unsigned int freq_lo;13unsigned int freq_lo_delay_us;14unsigned int freq_hi_delay_us;15unsigned int sample_type:1;16};1718static inline struct od_policy_dbs_info *to_dbs_info(struct policy_dbs_info *policy_dbs)19{20return container_of(policy_dbs, struct od_policy_dbs_info, policy_dbs);21}2223struct od_dbs_tuners {24unsigned int powersave_bias;25};2627#ifdef CONFIG_X8628#include <asm/cpu_device_id.h>2930/*31* Not all CPUs want IO time to be accounted as busy; this depends on32* how efficient idling at a higher frequency/voltage is.33*34* Pavel Machek says this is not so for various generations of AMD and35* old Intel systems. Mike Chan (android.com) claims this is also not36* true for ARM.37*38* Because of this, select a known series of Intel CPUs (Family 6 and39* later) by default, and leave all others up to the user.40*/41static inline bool od_should_io_be_busy(void)42{43return (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL &&44boot_cpu_data.x86_vfm >= INTEL_PENTIUM_PRO);45}46#else47static inline bool od_should_io_be_busy(void) { return false; }48#endif495051