/* SPDX-License-Identifier: GPL-2.0-only */ /* * (C) 2010,2011 Thomas Renninger <trenn@suse.de>, Novell Inc. * * Miscellaneous helpers which do not fit or are worth * to put into separate headers
*/
/* Global verbose (-d) stuff *********************************/ /* * define DEBUG via global Makefile variable * Debug output is sent to stderr, do: * cpupower monitor 2>/tmp/debug * to split debug output away from normal output
*/ #ifdef DEBUG externint be_verbose;
struct cpupower_cpu_info { enum cpupower_cpu_vendor vendor; unsignedint family; unsignedint model; unsignedint stepping; /* CPU capabilities read out from cpuid */ unsignedlonglong caps;
};
/* get_cpu_info * * Extract CPU vendor, family, model, stepping info from /proc/cpuinfo * * Returns 0 on success or a negative error code * Only used on x86, below global's struct values are zero/unknown on * other archs
*/ externint get_cpu_info(struct cpupower_cpu_info *cpu_info); externstruct cpupower_cpu_info cpupower_cpu_info;
/* cpuid and cpuinfo helpers **************************/
int cpufreq_has_generic_boost_support(bool *active); int cpupower_set_turbo_boost(int turbo_boost);
/* X86 ONLY ****************************************/ #ifdefined(__i386__) || defined(__x86_64__)
/* PCI stuff ****************************/ externint amd_pci_get_num_boost_states(int *active, int *states); externstruct pci_dev *pci_acc_init(struct pci_access **pacc, int domain, int bus, int slot, int func, int vendor, int dev); externstruct pci_dev *pci_slot_func_init(struct pci_access **pacc, int slot, int func);
int cpufreq_has_x86_boost_support(unsignedint cpu, int *support, int *active, int *states);
/* AMD P-State stuff **************************/ bool cpupower_amd_pstate_enabled(void); void amd_pstate_boost_init(unsignedint cpu, int *support, int *active); void amd_pstate_show_perf_and_freq(unsignedint cpu, int no_rounding);
/* AMD P-State stuff **************************/
/* * CPUID functions returning a single datum
*/ unsignedint cpuid_eax(unsignedint op); unsignedint cpuid_ebx(unsignedint op); unsignedint cpuid_ecx(unsignedint op); unsignedint cpuid_edx(unsignedint op);
/* cpuid and cpuinfo helpers **************************/ /* X86 ONLY ********************************************/ #else staticinlineint decode_pstates(unsignedint cpu, int boost_states, unsignedlong *pstates, int *no)
{ return -1; };
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.