#define STARLINK_PMU_PDEV_NAME …
#define pr_fmt(fmt) …
#include <linux/bitmap.h>
#include <linux/cpu_pm.h>
#include <linux/io.h>
#include <linux/irq.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/mod_devicetable.h>
#include <linux/perf_event.h>
#include <linux/platform_device.h>
#include <linux/sysfs.h>
#define STARLINK_PMU_MAX_COUNTERS …
#define STARLINK_PMU_NUM_COUNTERS …
#define STARLINK_PMU_IDX_CYCLE_COUNTER …
#define STARLINK_PMU_EVENT_SELECT …
#define STARLINK_PMU_EVENT_COUNTER …
#define STARLINK_PMU_COUNTER_MASK …
#define STARLINK_PMU_CYCLE_COUNTER …
#define STARLINK_PMU_CONTROL …
#define STARLINK_PMU_GLOBAL_ENABLE …
#define STARLINK_PMU_INTERRUPT_ENABLE …
#define STARLINK_PMU_COUNTER_OVERFLOW_STATUS …
#define STARLINK_PMU_CYCLE_OVERFLOW_MASK …
#define STARLINK_CYCLES …
#define CACHE_READ_REQUEST …
#define CACHE_WRITE_REQUEST …
#define CACHE_RELEASE_REQUEST …
#define CACHE_READ_HIT …
#define CACHE_READ_MISS …
#define CACHE_WRITE_HIT …
#define CACHE_WRITE_MISS …
#define CACHE_WRITEBACK …
#define to_starlink_pmu(p) …
#define STARLINK_FORMAT_ATTR(_name, _config) …
#define STARLINK_EVENT_ATTR(_name, _id) …
static int starlink_pmu_cpuhp_state;
struct starlink_hw_events { … };
struct starlink_pmu { … };
static ssize_t
starlink_pmu_sysfs_format_show(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static struct attribute *starlink_pmu_format_attrs[] = …;
static const struct attribute_group starlink_pmu_format_attr_group = …;
static ssize_t
starlink_pmu_sysfs_event_show(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static struct attribute *starlink_pmu_event_attrs[] = …;
static const struct attribute_group starlink_pmu_events_attr_group = …;
static ssize_t
cpumask_show(struct device *dev, struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RO(cpumask);
static struct attribute *starlink_pmu_cpumask_attrs[] = …;
static const struct attribute_group starlink_pmu_cpumask_attr_group = …;
static const struct attribute_group *starlink_pmu_attr_groups[] = …;
static void starlink_pmu_set_event_period(struct perf_event *event)
{ … }
static void starlink_pmu_counter_start(struct perf_event *event,
struct starlink_pmu *starlink_pmu)
{ … }
static void starlink_pmu_counter_stop(struct perf_event *event,
struct starlink_pmu *starlink_pmu)
{ … }
static void starlink_pmu_update(struct perf_event *event)
{ … }
static void starlink_pmu_start(struct perf_event *event, int flags)
{ … }
static void starlink_pmu_stop(struct perf_event *event, int flags)
{ … }
static int starlink_pmu_add(struct perf_event *event, int flags)
{ … }
static void starlink_pmu_del(struct perf_event *event, int flags)
{ … }
static bool starlink_pmu_validate_event_group(struct perf_event *event)
{ … }
static int starlink_pmu_event_init(struct perf_event *event)
{ … }
static irqreturn_t starlink_pmu_handle_irq(int irq_num, void *data)
{ … }
static int starlink_setup_irqs(struct starlink_pmu *starlink_pmu,
struct platform_device *pdev)
{ … }
static int starlink_pmu_pm_notify(struct notifier_block *b,
unsigned long cmd, void *v)
{ … }
static int starlink_pmu_pm_register(struct starlink_pmu *starlink_pmu)
{ … }
static void starlink_pmu_pm_unregister(struct starlink_pmu *starlink_pmu)
{ … }
static void starlink_pmu_destroy(struct starlink_pmu *starlink_pmu)
{ … }
static int starlink_pmu_probe(struct platform_device *pdev)
{ … }
static const struct of_device_id starlink_pmu_of_match[] = …;
MODULE_DEVICE_TABLE(of, starlink_pmu_of_match);
static struct platform_driver starlink_pmu_driver = …;
static int
starlink_pmu_online_cpu(unsigned int cpu, struct hlist_node *node)
{ … }
static int
starlink_pmu_offline_cpu(unsigned int cpu, struct hlist_node *node)
{ … }
static int __init starlink_pmu_init(void)
{ … }
device_initcall(starlink_pmu_init);