linux/drivers/hwtracing/stm/p_sys-t.c

// SPDX-License-Identifier: GPL-2.0
/*
 * MIPI SyS-T framing protocol for STM devices.
 * Copyright (c) 2018, Intel Corporation.
 */

#include <linux/configfs.h>
#include <linux/module.h>
#include <linux/device.h>
#include <linux/slab.h>
#include <linux/uuid.h>
#include <linux/stm.h>
#include "stm.h"

enum sys_t_message_type {};

enum sys_t_message_severity {};

enum sys_t_message_build_subtype {};

enum sys_t_message_clock_subtype {};

enum sys_t_message_string_subtype {};

/**
 * enum sys_t_message_sbd_subtype - SyS-T SBD message subtypes
 * @MIPI_SYST_SBD_ID32: SBD message with 32-bit message ID
 * @MIPI_SYST_SBD_ID64: SBD message with 64-bit message ID
 *
 * Structured Binary Data messages can send information of arbitrary length,
 * together with ID's that describe BLOB's content and layout.
 */
enum sys_t_message_sbd_subtype {};

#define MIPI_SYST_TYPE(t)
#define MIPI_SYST_SEVERITY(s)
#define MIPI_SYST_OPT_LOC
#define MIPI_SYST_OPT_LEN
#define MIPI_SYST_OPT_CHK
#define MIPI_SYST_OPT_TS
#define MIPI_SYST_UNIT(u)
#define MIPI_SYST_ORIGIN(o)
#define MIPI_SYST_OPT_GUID
#define MIPI_SYST_SUBTYPE(s)
#define MIPI_SYST_UNITLARGE(u)
#define MIPI_SYST_TYPES(t, s)

#define DATA_HEADER

#define CLOCK_SYNC_HEADER

/*
 * SyS-T and ftrace headers are compatible to an extent that ftrace event ID
 * and args can be treated as SyS-T SBD message with 64-bit ID and arguments
 * BLOB right behind the header without modification. Bits [16:63] coming
 * together with message ID from ftrace aren't used by SBD and must be zeroed.
 *
 *         0       15  16   23  24     31  32   39  40  63
 * ftrace: <event_id>  <flags>  <preempt>  <-pid->  <----> <args>
 * SBD:    <------- msg_id ------------------------------> <BLOB>
 */
#define SBD_HEADER

struct sys_t_policy_node {};

struct sys_t_output {};

static void sys_t_policy_node_init(void *priv)
{}

static int sys_t_output_open(void *priv, struct stm_output *output)
{}

static void sys_t_output_close(struct stm_output *output)
{}

static ssize_t sys_t_policy_uuid_show(struct config_item *item,
				      char *page)
{}

static ssize_t
sys_t_policy_uuid_store(struct config_item *item, const char *page,
			size_t count)
{}

CONFIGFS_ATTR();

static ssize_t sys_t_policy_do_len_show(struct config_item *item,
				      char *page)
{}

static ssize_t
sys_t_policy_do_len_store(struct config_item *item, const char *page,
			size_t count)
{}

CONFIGFS_ATTR();

static ssize_t sys_t_policy_ts_interval_show(struct config_item *item,
					     char *page)
{}

static ssize_t
sys_t_policy_ts_interval_store(struct config_item *item, const char *page,
			       size_t count)
{}

CONFIGFS_ATTR();

static ssize_t sys_t_policy_clocksync_interval_show(struct config_item *item,
						    char *page)
{}

static ssize_t
sys_t_policy_clocksync_interval_store(struct config_item *item,
				      const char *page, size_t count)
{}

CONFIGFS_ATTR();

static struct configfs_attribute *sys_t_policy_attrs[] =;

static inline bool sys_t_need_ts(struct sys_t_output *op)
{}

static bool sys_t_need_clock_sync(struct sys_t_output *op)
{}

static ssize_t
sys_t_clock_sync(struct stm_data *data, unsigned int m, unsigned int c)
{}

static inline u32 sys_t_header(struct stm_source_data *source)
{}

static ssize_t sys_t_write_data(struct stm_data *data,
				struct stm_source_data *source,
				unsigned int master, unsigned int channel,
				bool ts_first, const void *buf, size_t count)
{}

static ssize_t sys_t_write(struct stm_data *data, struct stm_output *output,
			   unsigned int chan, const char *buf, size_t count,
			   struct stm_source_data *source)
{}

static const struct stm_protocol_driver sys_t_pdrv =;

static int sys_t_stm_init(void)
{}

static void sys_t_stm_exit(void)
{}

module_init();
module_exit(sys_t_stm_exit);

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