linux/drivers/acpi/processor_throttling.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * processor_throttling.c - Throttling submodule of the ACPI processor driver
 *
 *  Copyright (C) 2001, 2002 Andy Grover <[email protected]>
 *  Copyright (C) 2001, 2002 Paul Diefenbaugh <[email protected]>
 *  Copyright (C) 2004       Dominik Brodowski <[email protected]>
 *  Copyright (C) 2004  Anil S Keshavamurthy <[email protected]>
 *                      - Added processor hotplug support
 */

#define pr_fmt(fmt)

#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/init.h>
#include <linux/sched.h>
#include <linux/cpufreq.h>
#include <linux/acpi.h>
#include <acpi/processor.h>
#include <asm/io.h>
#include <linux/uaccess.h>

/* ignore_tpc:
 *  0 -> acpi processor driver doesn't ignore _TPC values
 *  1 -> acpi processor driver ignores _TPC values
 */
static int ignore_tpc;
module_param(ignore_tpc, int, 0644);
MODULE_PARM_DESC();

struct throttling_tstate {};

struct acpi_processor_throttling_arg {};

#define THROTTLING_PRECHANGE
#define THROTTLING_POSTCHANGE

static int acpi_processor_get_throttling(struct acpi_processor *pr);
static int __acpi_processor_set_throttling(struct acpi_processor *pr,
					   int state, bool force, bool direct);

static int acpi_processor_update_tsd_coord(void)
{}

/*
 * Update the T-state coordination after the _TSD
 * data for all cpus is obtained.
 */
void acpi_processor_throttling_init(void)
{}

static int acpi_processor_throttling_notifier(unsigned long event, void *data)
{}

/*
 * _TPC - Throttling Present Capabilities
 */
static int acpi_processor_get_platform_limit(struct acpi_processor *pr)
{}

int acpi_processor_tstate_has_changed(struct acpi_processor *pr)
{}

/*
 * This function is used to reevaluate whether the T-state is valid
 * after one CPU is onlined/offlined.
 * It is noted that it won't reevaluate the following properties for
 * the T-state.
 *	1. Control method.
 *	2. the number of supported T-state
 *	3. TSD domain
 */
void acpi_processor_reevaluate_tstate(struct acpi_processor *pr,
					bool is_dead)
{}
/*
 * _PTC - Processor Throttling Control (and status) register location
 */
static int acpi_processor_get_throttling_control(struct acpi_processor *pr)
{}

/*
 * _TSS - Throttling Supported States
 */
static int acpi_processor_get_throttling_states(struct acpi_processor *pr)
{}

/*
 * _TSD - T-State Dependencies
 */
static int acpi_processor_get_tsd(struct acpi_processor *pr)
{}

/* --------------------------------------------------------------------------
                              Throttling Control
   -------------------------------------------------------------------------- */
static int acpi_processor_get_throttling_fadt(struct acpi_processor *pr)
{}

#ifdef CONFIG_X86
static int acpi_throttling_rdmsr(u64 *value)
{}

static int acpi_throttling_wrmsr(u64 value)
{}
#else
static int acpi_throttling_rdmsr(u64 *value)
{
	pr_err("HARDWARE addr space,NOT supported yet\n");
	return -1;
}

static int acpi_throttling_wrmsr(u64 value)
{
	pr_err("HARDWARE addr space,NOT supported yet\n");
	return -1;
}
#endif

static int acpi_read_throttling_status(struct acpi_processor *pr,
					u64 *value)
{}

static int acpi_write_throttling_state(struct acpi_processor *pr,
				u64 value)
{}

static int acpi_get_throttling_state(struct acpi_processor *pr,
				u64 value)
{}

static int acpi_get_throttling_value(struct acpi_processor *pr,
			int state, u64 *value)
{}

static int acpi_processor_get_throttling_ptc(struct acpi_processor *pr)
{}

static long __acpi_processor_get_throttling(void *data)
{}

static int acpi_processor_get_throttling(struct acpi_processor *pr)
{}

static int acpi_processor_get_fadt_info(struct acpi_processor *pr)
{}

static int acpi_processor_set_throttling_fadt(struct acpi_processor *pr,
					      int state, bool force)
{}

static int acpi_processor_set_throttling_ptc(struct acpi_processor *pr,
					     int state, bool force)
{}

static long acpi_processor_throttling_fn(void *data)
{}

static int __acpi_processor_set_throttling(struct acpi_processor *pr,
					   int state, bool force, bool direct)
{}

int acpi_processor_set_throttling(struct acpi_processor *pr, int state,
				  bool force)
{}

int acpi_processor_get_throttling_info(struct acpi_processor *pr)
{}