linux/drivers/platform/x86/intel/speed_select_if/isst_if_mbox_msr.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Intel Speed Select Interface: Mbox via MSR Interface
 * Copyright (c) 2019, Intel Corporation.
 * All rights reserved.
 *
 * Author: Srinivas Pandruvada <[email protected]>
 */

#include <linux/module.h>
#include <linux/cpuhotplug.h>
#include <linux/pci.h>
#include <linux/sched/signal.h>
#include <linux/slab.h>
#include <linux/suspend.h>
#include <linux/topology.h>
#include <linux/uaccess.h>
#include <uapi/linux/isst_if.h>
#include <asm/cpu_device_id.h>
#include <asm/intel-family.h>

#include "isst_if_common.h"

#define MSR_OS_MAILBOX_BUSY_BIT

/*
 * Based on experiments count is never more than 1, as the MSR overhead
 * is enough to finish the command. So here this is the worst case number.
 */
#define OS_MAILBOX_RETRY_COUNT

static int isst_if_send_mbox_cmd(u8 command, u8 sub_command, u32 parameter,
				 u32 command_data, u32 *response_data)
{}

struct msrl_action {};

/* revisit, smp_call_function_single should be enough for atomic mailbox! */
static void msrl_update_func(void *info)
{}

static long isst_if_mbox_proc_cmd(u8 *cmd_ptr, int *write_only, int resume)
{}


static int isst_pm_notify(struct notifier_block *nb,
			       unsigned long mode, void *_unused)
{}

static struct notifier_block isst_pm_nb =;

static const struct x86_cpu_id isst_if_cpu_ids[] =;
MODULE_DEVICE_TABLE(x86cpu, isst_if_cpu_ids);

static int __init isst_if_mbox_init(void)
{}
module_init()

static void __exit isst_if_mbox_exit(void)
{}
module_exit()

MODULE_LICENSE();
MODULE_DESCRIPTION();