linux/drivers/platform/x86/intel/uncore-frequency/uncore-frequency-common.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Intel Uncore Frequency Control: Common code implementation
 * Copyright (c) 2022, Intel Corporation.
 * All rights reserved.
 *
 */
#include <linux/cpu.h>
#include <linux/module.h>
#include "uncore-frequency-common.h"

/* Mutex to control all mutual exclusions */
static DEFINE_MUTEX(uncore_lock);
/* Root of the all uncore sysfs kobjs */
static struct kobject *uncore_root_kobj;
/* uncore instance count */
static int uncore_instance_count;

static DEFINE_IDA(intel_uncore_ida);

/* callbacks for actual HW read/write */
static int (*uncore_read)(struct uncore_data *data, unsigned int *value, enum uncore_index index);
static int (*uncore_write)(struct uncore_data *data, unsigned int input, enum uncore_index index);

static ssize_t show_domain_id(struct kobject *kobj, struct kobj_attribute *attr, char *buf)
{}

static ssize_t show_fabric_cluster_id(struct kobject *kobj, struct kobj_attribute *attr, char *buf)
{}

static ssize_t show_package_id(struct kobject *kobj, struct kobj_attribute *attr, char *buf)
{}

static ssize_t show_attr(struct uncore_data *data, char *buf, enum uncore_index index)
{}

static ssize_t store_attr(struct uncore_data *data, const char *buf, ssize_t count,
			  enum uncore_index index)
{}

#define store_uncore_attr(name, index)

#define show_uncore_attr(name, index)

store_uncore_attr(min_freq_khz, UNCORE_INDEX_MIN_FREQ);
store_uncore_attr(max_freq_khz, UNCORE_INDEX_MAX_FREQ);

show_uncore_attr(min_freq_khz, UNCORE_INDEX_MIN_FREQ);
show_uncore_attr(max_freq_khz, UNCORE_INDEX_MAX_FREQ);

show_uncore_attr(current_freq_khz, UNCORE_INDEX_CURRENT_FREQ);

#define show_uncore_data(member_name)								\

show_uncore_data(initial_min_freq_khz);
show_uncore_data(initial_max_freq_khz);

#define init_attribute_rw(_name)

#define init_attribute_ro(_name)

#define init_attribute_root_ro(_name)

static int create_attr_group(struct uncore_data *data, char *name)
{}

static void delete_attr_group(struct uncore_data *data, char *name)
{}

int uncore_freq_add_entry(struct uncore_data *data, int cpu)
{}
EXPORT_SYMBOL_NS_GPL();

void uncore_freq_remove_die_entry(struct uncore_data *data)
{}
EXPORT_SYMBOL_NS_GPL();

int uncore_freq_common_init(int (*read)(struct uncore_data *data, unsigned int *value,
					enum uncore_index index),
			    int (*write)(struct uncore_data *data, unsigned int input,
					 enum uncore_index index))
{}
EXPORT_SYMBOL_NS_GPL();

void uncore_freq_common_exit(void)
{}
EXPORT_SYMBOL_NS_GPL();


MODULE_LICENSE();
MODULE_DESCRIPTION();