linux/drivers/hwtracing/stm/policy.c

// SPDX-License-Identifier: GPL-2.0
/*
 * System Trace Module (STM) master/channel allocation policy management
 * Copyright (c) 2014, Intel Corporation.
 *
 * A master/channel allocation policy allows mapping string identifiers to
 * master and channel ranges, where allocation can be done.
 */

#define pr_fmt(fmt)

#include <linux/types.h>
#include <linux/module.h>
#include <linux/device.h>
#include <linux/configfs.h>
#include <linux/slab.h>
#include <linux/stm.h>
#include "stm.h"

/*
 * STP Master/Channel allocation policy configfs layout.
 */

struct stp_policy {};

struct stp_policy_node {};

void *stp_policy_node_priv(struct stp_policy_node *pn)
{}

static struct configfs_subsystem stp_policy_subsys;

void stp_policy_node_get_ranges(struct stp_policy_node *policy_node,
				unsigned int *mstart, unsigned int *mend,
				unsigned int *cstart, unsigned int *cend)
{}

static inline struct stp_policy *to_stp_policy(struct config_item *item)
{}

static inline struct stp_policy_node *
to_stp_policy_node(struct config_item *item)
{}

void *to_pdrv_policy_node(struct config_item *item)
{}
EXPORT_SYMBOL_GPL();

static ssize_t
stp_policy_node_masters_show(struct config_item *item, char *page)
{}

static ssize_t
stp_policy_node_masters_store(struct config_item *item, const char *page,
			      size_t count)
{}

static ssize_t
stp_policy_node_channels_show(struct config_item *item, char *page)
{}

static ssize_t
stp_policy_node_channels_store(struct config_item *item, const char *page,
			       size_t count)
{}

static void stp_policy_node_release(struct config_item *item)
{}

static struct configfs_item_operations stp_policy_node_item_ops =;

CONFIGFS_ATTR();
CONFIGFS_ATTR();

static struct configfs_attribute *stp_policy_node_attrs[] =;

static const struct config_item_type stp_policy_type;
static const struct config_item_type stp_policy_node_type;

const struct config_item_type *
get_policy_node_type(struct configfs_attribute **attrs)
{}

static struct config_group *
stp_policy_node_make(struct config_group *group, const char *name)
{}

static void
stp_policy_node_drop(struct config_group *group, struct config_item *item)
{}

static struct configfs_group_operations stp_policy_node_group_ops =;

static const struct config_item_type stp_policy_node_type =;

/*
 * Root group: policies.
 */
static ssize_t stp_policy_device_show(struct config_item *item,
				      char *page)
{}

CONFIGFS_ATTR_RO();

static ssize_t stp_policy_protocol_show(struct config_item *item,
					char *page)
{}

CONFIGFS_ATTR_RO();

static struct configfs_attribute *stp_policy_attrs[] =;

void stp_policy_unbind(struct stp_policy *policy)
{}

static void stp_policy_release(struct config_item *item)
{}

static struct configfs_item_operations stp_policy_item_ops =;

static struct configfs_group_operations stp_policy_group_ops =;

static const struct config_item_type stp_policy_type =;

static struct config_group *
stp_policy_make(struct config_group *group, const char *name)
{}

static struct configfs_group_operations stp_policy_root_group_ops =;

static const struct config_item_type stp_policy_root_type =;

static struct configfs_subsystem stp_policy_subsys =;

/*
 * Lock the policy mutex from the outside
 */
static struct stp_policy_node *
__stp_policy_node_lookup(struct stp_policy *policy, char *s)
{}


struct stp_policy_node *
stp_policy_node_lookup(struct stm_device *stm, char *s)
{}

void stp_policy_node_put(struct stp_policy_node *policy_node)
{}

int __init stp_configfs_init(void)
{}

void __exit stp_configfs_exit(void)
{}