linux/drivers/powercap/dtpm_cpu.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright 2020 Linaro Limited
 *
 * Author: Daniel Lezcano <[email protected]>
 *
 * The DTPM CPU is based on the energy model. It hooks the CPU in the
 * DTPM tree which in turns update the power number by propagating the
 * power number from the CPU energy model information to the parents.
 *
 * The association between the power and the performance state, allows
 * to set the power of the CPU at the OPP granularity.
 *
 * The CPU hotplug is supported and the power numbers will be updated
 * if a CPU is hot plugged / unplugged.
 */
#define pr_fmt(fmt)

#include <linux/cpumask.h>
#include <linux/cpufreq.h>
#include <linux/cpuhotplug.h>
#include <linux/dtpm.h>
#include <linux/energy_model.h>
#include <linux/of.h>
#include <linux/pm_qos.h>
#include <linux/slab.h>

struct dtpm_cpu {};

static DEFINE_PER_CPU(struct dtpm_cpu *, dtpm_per_cpu);

static struct dtpm_cpu *to_dtpm_cpu(struct dtpm *dtpm)
{}

static u64 set_pd_power_limit(struct dtpm *dtpm, u64 power_limit)
{}

static u64 scale_pd_power_uw(struct cpumask *pd_mask, u64 power)
{}

static u64 get_pd_power_uw(struct dtpm *dtpm)
{}

static int update_pd_power_uw(struct dtpm *dtpm)
{}

static void pd_release(struct dtpm *dtpm)
{}

static struct dtpm_ops dtpm_ops =;

static int cpuhp_dtpm_cpu_offline(unsigned int cpu)
{}

static int cpuhp_dtpm_cpu_online(unsigned int cpu)
{}

static int __dtpm_cpu_setup(int cpu, struct dtpm *parent)
{}

static int dtpm_cpu_setup(struct dtpm *dtpm, struct device_node *np)
{}

static int dtpm_cpu_init(void)
{}

static void dtpm_cpu_exit(void)
{}

struct dtpm_subsys_ops dtpm_cpu_ops =;