linux/drivers/dma/idxd/perfmon.c

// SPDX-License-Identifier: GPL-2.0
/* Copyright(c) 2020 Intel Corporation. All rights rsvd. */

#include <linux/sched/task.h>
#include <linux/io-64-nonatomic-lo-hi.h>
#include "idxd.h"
#include "perfmon.h"

/*
 * These attributes specify the bits in the config word that the perf
 * syscall uses to pass the event ids and categories to perfmon.
 */
DEFINE_PERFMON_FORMAT_ATTR();
DEFINE_PERFMON_FORMAT_ATTR();

/*
 * These attributes specify the bits in the config1 word that the perf
 * syscall uses to pass filter data to perfmon.
 */
DEFINE_PERFMON_FORMAT_ATTR();
DEFINE_PERFMON_FORMAT_ATTR();
DEFINE_PERFMON_FORMAT_ATTR();
DEFINE_PERFMON_FORMAT_ATTR();
DEFINE_PERFMON_FORMAT_ATTR();

#define PERFMON_FILTERS_START
#define PERFMON_FILTERS_MAX

static struct attribute *perfmon_format_attrs[] =;

static struct attribute_group perfmon_format_attr_group =;

static const struct attribute_group *perfmon_attr_groups[] =;

static bool is_idxd_event(struct idxd_pmu *idxd_pmu, struct perf_event *event)
{}

static int perfmon_collect_events(struct idxd_pmu *idxd_pmu,
				  struct perf_event *leader,
				  bool do_grp)
{}

static void perfmon_assign_hw_event(struct idxd_pmu *idxd_pmu,
				    struct perf_event *event, int idx)
{}

static int perfmon_assign_event(struct idxd_pmu *idxd_pmu,
				struct perf_event *event)
{}

/*
 * Check whether there are enough counters to satisfy that all the
 * events in the group can actually be scheduled at the same time.
 *
 * To do this, create a fake idxd_pmu object so the event collection
 * and assignment functions can be used without affecting the internal
 * state of the real idxd_pmu object.
 */
static int perfmon_validate_group(struct idxd_pmu *pmu,
				  struct perf_event *event)
{}

static int perfmon_pmu_event_init(struct perf_event *event)
{}

static inline u64 perfmon_pmu_read_counter(struct perf_event *event)
{}

static void perfmon_pmu_event_update(struct perf_event *event)
{}

void perfmon_counter_overflow(struct idxd_device *idxd)
{}

static inline void perfmon_reset_config(struct idxd_device *idxd)
{}

static inline void perfmon_reset_counters(struct idxd_device *idxd)
{}

static inline void perfmon_reset(struct idxd_device *idxd)
{}

static void perfmon_pmu_event_start(struct perf_event *event, int mode)
{}

static void perfmon_pmu_event_stop(struct perf_event *event, int mode)
{}

static void perfmon_pmu_event_del(struct perf_event *event, int mode)
{}

static int perfmon_pmu_event_add(struct perf_event *event, int flags)
{}

static void enable_perfmon_pmu(struct idxd_device *idxd)
{}

static void disable_perfmon_pmu(struct idxd_device *idxd)
{}

static void perfmon_pmu_enable(struct pmu *pmu)
{}

static void perfmon_pmu_disable(struct pmu *pmu)
{}

static void skip_filter(int i)
{}

static void idxd_pmu_init(struct idxd_pmu *idxd_pmu)
{}

void perfmon_pmu_remove(struct idxd_device *idxd)
{}

int perfmon_pmu_init(struct idxd_device *idxd)
{}