Path: blob/master/drivers/cpufreq/cpufreq_performance.c
26278 views
// SPDX-License-Identifier: GPL-2.0-only1/*2* linux/drivers/cpufreq/cpufreq_performance.c3*4* Copyright (C) 2002 - 2003 Dominik Brodowski <[email protected]>5*/67#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt89#include <linux/cpufreq.h>10#include <linux/init.h>11#include <linux/module.h>1213static void cpufreq_gov_performance_limits(struct cpufreq_policy *policy)14{15pr_debug("setting to %u kHz\n", policy->max);16__cpufreq_driver_target(policy, policy->max, CPUFREQ_RELATION_H);17}1819static struct cpufreq_governor cpufreq_gov_performance = {20.name = "performance",21.owner = THIS_MODULE,22.flags = CPUFREQ_GOV_STRICT_TARGET,23.limits = cpufreq_gov_performance_limits,24};2526#ifdef CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE27struct cpufreq_governor *cpufreq_default_governor(void)28{29return &cpufreq_gov_performance;30}31#endif32#ifndef CONFIG_CPU_FREQ_GOV_PERFORMANCE_MODULE33struct cpufreq_governor *cpufreq_fallback_governor(void)34{35return &cpufreq_gov_performance;36}37#endif3839MODULE_AUTHOR("Dominik Brodowski <[email protected]>");40MODULE_DESCRIPTION("CPUfreq policy governor 'performance'");41MODULE_LICENSE("GPL");4243cpufreq_governor_init(cpufreq_gov_performance);44cpufreq_governor_exit(cpufreq_gov_performance);454647