linux/drivers/platform/x86/intel/turbo_max_3.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Intel Turbo Boost Max Technology 3.0 legacy (non HWP) enumeration driver
 * Copyright (c) 2017, Intel Corporation.
 * All rights reserved.
 *
 * Author: Srinivas Pandruvada <[email protected]>
 */
#define pr_fmt(fmt)

#include <linux/cpufeature.h>
#include <linux/cpuhotplug.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/topology.h>
#include <linux/workqueue.h>

#include <asm/cpu_device_id.h>
#include <asm/intel-family.h>

#define MSR_OC_MAILBOX
#define MSR_OC_MAILBOX_CMD_OFFSET
#define MSR_OC_MAILBOX_RSP_OFFSET
#define MSR_OC_MAILBOX_BUSY_BIT
#define OC_MAILBOX_FC_CONTROL_CMD

/*
 * Typical latency to get mail box response is ~3us, It takes +3 us to
 * process reading mailbox after issuing mailbox write on a Broadwell 3.4 GHz
 * system. So for most of the time, the first mailbox read should have the
 * response, but to avoid some boundary cases retry twice.
 */
#define OC_MAILBOX_RETRY_COUNT

static int get_oc_core_priority(unsigned int cpu)
{}

/*
 * The work item is needed to avoid CPU hotplug locking issues. The function
 * itmt_legacy_set_priority() is called from CPU online callback, so can't
 * call sched_set_itmt_support() from there as this function will aquire
 * hotplug locks in its path.
 */
static void itmt_legacy_work_fn(struct work_struct *work)
{}

static DECLARE_WORK(sched_itmt_work, itmt_legacy_work_fn);

static int itmt_legacy_cpu_online(unsigned int cpu)
{}

static const struct x86_cpu_id itmt_legacy_cpu_ids[] =;

static int __init itmt_legacy_init(void)
{}
late_initcall()