linux/drivers/dca/dca-core.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Copyright(c) 2007 - 2009 Intel Corporation. All rights reserved.
 */

/*
 * This driver supports an interface for DCA clients and providers to meet.
 */

#include <linux/kernel.h>
#include <linux/notifier.h>
#include <linux/device.h>
#include <linux/dca.h>
#include <linux/slab.h>
#include <linux/module.h>

#define DCA_VERSION

MODULE_VERSION();
MODULE_DESCRIPTION();
MODULE_LICENSE();
MODULE_AUTHOR();

static DEFINE_RAW_SPINLOCK(dca_lock);

static LIST_HEAD(dca_domains);

static BLOCKING_NOTIFIER_HEAD(dca_provider_chain);

static int dca_providers_blocked;

static struct pci_bus *dca_pci_rc_from_dev(struct device *dev)
{}

static struct dca_domain *dca_allocate_domain(struct pci_bus *rc)
{}

static void dca_free_domain(struct dca_domain *domain)
{}

static int dca_provider_ioat_ver_3_0(struct device *dev)
{}

static void unregister_dca_providers(void)
{}

static struct dca_domain *dca_find_domain(struct pci_bus *rc)
{}

static struct dca_domain *dca_get_domain(struct device *dev)
{}

static struct dca_provider *dca_find_provider_by_dev(struct device *dev)
{}

/**
 * dca_add_requester - add a dca client to the list
 * @dev - the device that wants dca service
 */
int dca_add_requester(struct device *dev)
{}
EXPORT_SYMBOL_GPL();

/**
 * dca_remove_requester - remove a dca client from the list
 * @dev - the device that wants dca service
 */
int dca_remove_requester(struct device *dev)
{}
EXPORT_SYMBOL_GPL();

/**
 * dca_common_get_tag - return the dca tag (serves both new and old api)
 * @dev - the device that wants dca service
 * @cpu - the cpuid as returned by get_cpu()
 */
static u8 dca_common_get_tag(struct device *dev, int cpu)
{}

/**
 * dca3_get_tag - return the dca tag to the requester device
 *                for the given cpu (new api)
 * @dev - the device that wants dca service
 * @cpu - the cpuid as returned by get_cpu()
 */
u8 dca3_get_tag(struct device *dev, int cpu)
{}
EXPORT_SYMBOL_GPL();

/**
 * dca_get_tag - return the dca tag for the given cpu (old api)
 * @cpu - the cpuid as returned by get_cpu()
 */
u8 dca_get_tag(int cpu)
{}
EXPORT_SYMBOL_GPL();

/**
 * alloc_dca_provider - get data struct for describing a dca provider
 * @ops - pointer to struct of dca operation function pointers
 * @priv_size - size of extra mem to be added for provider's needs
 */
struct dca_provider *alloc_dca_provider(const struct dca_ops *ops,
					int priv_size)
{}
EXPORT_SYMBOL_GPL();

/**
 * free_dca_provider - release the dca provider data struct
 * @ops - pointer to struct of dca operation function pointers
 * @priv_size - size of extra mem to be added for provider's needs
 */
void free_dca_provider(struct dca_provider *dca)
{}
EXPORT_SYMBOL_GPL();

/**
 * register_dca_provider - register a dca provider
 * @dca - struct created by alloc_dca_provider()
 * @dev - device providing dca services
 */
int register_dca_provider(struct dca_provider *dca, struct device *dev)
{}
EXPORT_SYMBOL_GPL();

/**
 * unregister_dca_provider - remove a dca provider
 * @dca - struct created by alloc_dca_provider()
 */
void unregister_dca_provider(struct dca_provider *dca, struct device *dev)
{}
EXPORT_SYMBOL_GPL();

/**
 * dca_register_notify - register a client's notifier callback
 */
void dca_register_notify(struct notifier_block *nb)
{}
EXPORT_SYMBOL_GPL();

/**
 * dca_unregister_notify - remove a client's notifier callback
 */
void dca_unregister_notify(struct notifier_block *nb)
{}
EXPORT_SYMBOL_GPL();

static int __init dca_init(void)
{}

static void __exit dca_exit(void)
{}

arch_initcall(dca_init);
module_exit(dca_exit);