/* * Set logical buffer interrupt control register. * The register control the validity of both real-time events and * interrupts. When logical buffer status changes causes to issue * an interrupt at the same time as it issues a real-time event. * Real-time events are used in SMB driver, which needs to get the buffer * status. Interrupts are used in debugger mode. * SMB_LB_INT_CTRL_BUF_NOTE_MASK control which events flags or interrupts * are valid.
*/ #define SMB_LB_INT_CTRL_EN BIT(0) #define SMB_LB_INT_CTRL_BUF_NOTE_MSK GENMASK(11, 8) #define SMB_LB_INT_CTRL_CFG (SMB_LB_INT_CTRL_EN | \
FIELD_PREP(SMB_LB_INT_CTRL_BUF_NOTE_MSK, 0xf))
/* Set logical buffer interrupt status register */ #define SMB_LB_INT_STS_NOT_EMPTY_MSK BIT(0) #define SMB_LB_INT_STS_BUF_RESET_MSK GENMASK(3, 0) #define SMB_LB_INT_STS_RESET FIELD_PREP(SMB_LB_INT_STS_BUF_RESET_MSK, 0xf)
/** * struct smb_data_buffer - Details of the buffer used by SMB * @buf_base: Memory mapped base address of SMB. * @buf_hw_base: SMB buffer start Physical base address, only used 32bits. * @buf_size: Size of the buffer. * @data_size: Size of the available trace data for SMB. * @buf_rdptr: Current read position (index) within the buffer.
*/ struct smb_data_buffer { void *buf_base;
u32 buf_hw_base; unsignedlong buf_size; unsignedlong data_size; unsignedlong buf_rdptr;
};
/** * struct smb_drv_data - specifics associated to an SMB component * @base: Memory mapped base address for SMB component. * @csdev: Component vitals needed by the framework. * @sdb: Data buffer for SMB. * @miscdev: Specifics to handle "/dev/xyz.smb" entry. * @spinlock: Control data access to one at a time. * @reading: Synchronise user space access to SMB buffer. * @pid: Process ID of the process being monitored by the * session that is using this component.
*/ struct smb_drv_data { void __iomem *base; struct coresight_device *csdev; struct smb_data_buffer sdb; struct miscdevice miscdev;
raw_spinlock_t spinlock; bool reading;
pid_t pid;
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.