#ifndef __INTEL_RAPL_H__
#define __INTEL_RAPL_H__
#include <linux/types.h>
#include <linux/powercap.h>
#include <linux/cpuhotplug.h>
enum rapl_if_type { … };
enum rapl_domain_type { … };
enum rapl_domain_reg_id { … };
struct rapl_domain;
enum rapl_primitives { … };
struct rapl_domain_data { … };
#define NR_POWER_LIMITS …
struct rapl_power_limit { … };
struct rapl_package;
#define RAPL_DOMAIN_NAME_LENGTH …
rapl_reg;
struct rapl_domain { … };
struct reg_action { … };
struct rapl_if_priv { … };
#ifdef CONFIG_PERF_EVENTS
struct rapl_package_pmu_data { … };
#endif
#define PACKAGE_DOMAIN_NAME_LENGTH …
struct rapl_package { … };
struct rapl_package *rapl_find_package_domain_cpuslocked(int id, struct rapl_if_priv *priv,
bool id_is_cpu);
struct rapl_package *rapl_add_package_cpuslocked(int id, struct rapl_if_priv *priv,
bool id_is_cpu);
void rapl_remove_package_cpuslocked(struct rapl_package *rp);
struct rapl_package *rapl_find_package_domain(int id, struct rapl_if_priv *priv, bool id_is_cpu);
struct rapl_package *rapl_add_package(int id, struct rapl_if_priv *priv, bool id_is_cpu);
void rapl_remove_package(struct rapl_package *rp);
#ifdef CONFIG_PERF_EVENTS
int rapl_package_add_pmu(struct rapl_package *rp);
void rapl_package_remove_pmu(struct rapl_package *rp);
#else
static inline int rapl_package_add_pmu(struct rapl_package *rp) { return 0; }
static inline void rapl_package_remove_pmu(struct rapl_package *rp) { }
#endif
#endif