mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 21:59:12 -04:00
msm: adsprpc: update driver to latest version from msm-4.19
Update fastrpc driver files to the latest version from msm-4.19 branch. Change-Id: Ia8b76d42c78974bf2cbb27d022939fc1dfd5f7b1 Acked-by: Thyagarajan Venkatanarayanan <venkatan@qti.qualcomm.com> Signed-off-by: Tharun Kumar Merugu <mtharu@codeaurora.org>
This commit is contained in:
parent
a203c595ba
commit
524cdbf341
4 changed files with 824 additions and 175 deletions
File diff suppressed because it is too large
Load diff
|
|
@ -122,7 +122,7 @@ struct compat_fastrpc_ioctl_perf { /* kernel performance data */
|
|||
#define FASTRPC_CONTROL_LATENCY (1)
|
||||
struct compat_fastrpc_ctrl_latency {
|
||||
compat_uint_t enable; /* latency control enable */
|
||||
compat_uint_t level; /* level of control */
|
||||
compat_uint_t latency; /* target latency in us */
|
||||
};
|
||||
|
||||
#define FASTRPC_CONTROL_KALLOC (3)
|
||||
|
|
@ -334,8 +334,8 @@ static int compat_get_fastrpc_ioctl_control(
|
|||
if (p == FASTRPC_CONTROL_LATENCY) {
|
||||
err |= get_user(p, &ctrl32->lp.enable);
|
||||
err |= put_user(p, &ctrl->lp.enable);
|
||||
err |= get_user(p, &ctrl32->lp.level);
|
||||
err |= put_user(p, &ctrl->lp.level);
|
||||
err |= get_user(p, &ctrl32->lp.latency);
|
||||
err |= put_user(p, &ctrl->lp.latency);
|
||||
}
|
||||
|
||||
return err;
|
||||
|
|
|
|||
|
|
@ -243,7 +243,7 @@ enum fastrpc_control_type {
|
|||
|
||||
struct fastrpc_ctrl_latency {
|
||||
uint32_t enable; /* latency control enable */
|
||||
uint32_t level; /* level of control */
|
||||
uint32_t latency; /* latency request in us */
|
||||
};
|
||||
|
||||
struct fastrpc_ctrl_kalloc {
|
||||
|
|
@ -301,6 +301,21 @@ struct smq_invoke_rsp {
|
|||
int retval; /* invoke return value */
|
||||
};
|
||||
|
||||
enum fastrpc_response_flags {
|
||||
NORMAL_RESPONSE = 0,
|
||||
EARLY_RESPONSE = 1,
|
||||
USER_EARLY_SIGNAL = 2,
|
||||
COMPLETE_SIGNAL = 3
|
||||
};
|
||||
|
||||
struct smq_invoke_rspv2 {
|
||||
uint64_t ctx; /* invoke caller context */
|
||||
int retval; /* invoke return value */
|
||||
uint32_t flags; /* early response flags */
|
||||
uint32_t earlyWakeTime; /* user predicted early wakeup time in us */
|
||||
uint32_t version; /* Version number for validation */
|
||||
};
|
||||
|
||||
static inline struct smq_invoke_buf *smq_invoke_buf_start(remote_arg64_t *pra,
|
||||
uint32_t sc)
|
||||
{
|
||||
|
|
|
|||
317
include/trace/events/fastrpc.h
Normal file
317
include/trace/events/fastrpc.h
Normal file
|
|
@ -0,0 +1,317 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/*
|
||||
* Copyright (c) 2019, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#undef TRACE_SYSTEM
|
||||
#define TRACE_SYSTEM fastrpc
|
||||
|
||||
#if !defined(_TRACE_FASTRPC_H) || defined(TRACE_HEADER_MULTI_READ)
|
||||
#define _TRACE_FASTRPC_H
|
||||
#include <linux/tracepoint.h>
|
||||
|
||||
TRACE_EVENT(fastrpc_rpmsg_send,
|
||||
|
||||
TP_PROTO(int cid, uint64_t smq_ctx,
|
||||
uint64_t ctx, uint32_t handle,
|
||||
uint32_t sc, uint64_t addr, uint64_t size),
|
||||
|
||||
TP_ARGS(cid, smq_ctx, ctx, handle, sc, addr, size),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field(int, cid)
|
||||
__field(u64, smq_ctx)
|
||||
__field(u64, ctx)
|
||||
__field(u32, handle)
|
||||
__field(u32, sc)
|
||||
__field(u64, addr)
|
||||
__field(u64, size)
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->cid = cid;
|
||||
__entry->smq_ctx = smq_ctx;
|
||||
__entry->ctx = ctx;
|
||||
__entry->handle = handle;
|
||||
__entry->sc = sc;
|
||||
__entry->addr = addr;
|
||||
__entry->size = size;
|
||||
),
|
||||
|
||||
TP_printk("to cid %d: smq_ctx 0x%llx, ctx 0x%llx, handle 0x%x, sc 0x%x, addr 0x%llx, size %llu",
|
||||
__entry->cid, __entry->smq_ctx, __entry->ctx, __entry->handle,
|
||||
__entry->sc, __entry->addr, __entry->size)
|
||||
);
|
||||
|
||||
TRACE_EVENT(fastrpc_rpmsg_response,
|
||||
|
||||
TP_PROTO(int cid, uint64_t ctx, int retval,
|
||||
uint32_t rsp_flags, uint32_t early_wake_time),
|
||||
|
||||
TP_ARGS(cid, ctx, retval, rsp_flags, early_wake_time),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field(int, cid)
|
||||
__field(u64, ctx)
|
||||
__field(int, retval)
|
||||
__field(u32, rsp_flags)
|
||||
__field(u32, early_wake_time)
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->cid = cid;
|
||||
__entry->ctx = ctx;
|
||||
__entry->retval = retval;
|
||||
__entry->rsp_flags = rsp_flags;
|
||||
__entry->early_wake_time = early_wake_time;
|
||||
),
|
||||
|
||||
TP_printk("from cid %d: ctx 0x%llx, retval 0x%x, rsp_flags %u, early_wake_time %u",
|
||||
__entry->cid, __entry->ctx, __entry->retval,
|
||||
__entry->rsp_flags, __entry->early_wake_time)
|
||||
);
|
||||
|
||||
TRACE_EVENT(fastrpc_context_interrupt,
|
||||
|
||||
TP_PROTO(int cid, uint64_t smq_ctx, uint64_t ctx,
|
||||
uint32_t handle, uint32_t sc),
|
||||
|
||||
TP_ARGS(cid, smq_ctx, ctx, handle, sc),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field(int, cid)
|
||||
__field(u64, smq_ctx)
|
||||
__field(u64, ctx)
|
||||
__field(u32, handle)
|
||||
__field(u32, sc)
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->cid = cid;
|
||||
__entry->smq_ctx = smq_ctx;
|
||||
__entry->ctx = ctx;
|
||||
__entry->handle = handle;
|
||||
__entry->sc = sc;
|
||||
),
|
||||
|
||||
TP_printk("to cid %d: smq_ctx 0x%llx, ctx 0x%llx, handle 0x%x, sc 0x%x",
|
||||
__entry->cid, __entry->smq_ctx,
|
||||
__entry->ctx, __entry->handle, __entry->sc)
|
||||
);
|
||||
|
||||
TRACE_EVENT(fastrpc_context_restore,
|
||||
|
||||
TP_PROTO(int cid, uint64_t smq_ctx, uint64_t ctx,
|
||||
uint32_t handle, uint32_t sc),
|
||||
|
||||
TP_ARGS(cid, smq_ctx, ctx, handle, sc),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field(int, cid)
|
||||
__field(u64, smq_ctx)
|
||||
__field(u64, ctx)
|
||||
__field(u32, handle)
|
||||
__field(u32, sc)
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->cid = cid;
|
||||
__entry->smq_ctx = smq_ctx;
|
||||
__entry->ctx = ctx;
|
||||
__entry->handle = handle;
|
||||
__entry->sc = sc;
|
||||
),
|
||||
|
||||
TP_printk("for cid %d: smq_ctx 0x%llx, ctx 0x%llx, handle 0x%x, sc 0x%x",
|
||||
__entry->cid, __entry->smq_ctx,
|
||||
__entry->ctx, __entry->handle, __entry->sc)
|
||||
);
|
||||
|
||||
TRACE_EVENT(fastrpc_dma_map,
|
||||
|
||||
TP_PROTO(int cid, int fd, uint64_t phys, size_t size,
|
||||
size_t len, unsigned int attr, int mflags),
|
||||
|
||||
TP_ARGS(cid, fd, phys, size, len, attr, mflags),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field(int, cid)
|
||||
__field(int, fd)
|
||||
__field(u64, phys)
|
||||
__field(size_t, size)
|
||||
__field(size_t, len)
|
||||
__field(unsigned int, attr)
|
||||
__field(int, mflags)
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->cid = cid;
|
||||
__entry->fd = fd;
|
||||
__entry->phys = phys;
|
||||
__entry->size = size;
|
||||
__entry->len = len;
|
||||
__entry->attr = attr;
|
||||
__entry->mflags = mflags;
|
||||
),
|
||||
|
||||
TP_printk("cid %d, fd %d, phys 0x%llx, size %zu (len %zu), attr 0x%x, flags 0x%x",
|
||||
__entry->cid, __entry->fd, __entry->phys, __entry->size,
|
||||
__entry->len, __entry->attr, __entry->mflags)
|
||||
);
|
||||
|
||||
TRACE_EVENT(fastrpc_dma_unmap,
|
||||
|
||||
TP_PROTO(int cid, uint64_t phys, size_t size),
|
||||
|
||||
TP_ARGS(cid, phys, size),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field(int, cid)
|
||||
__field(u64, phys)
|
||||
__field(size_t, size)
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->cid = cid;
|
||||
__entry->phys = phys;
|
||||
__entry->size = size;
|
||||
),
|
||||
|
||||
TP_printk("cid %d, phys 0x%llx, size %zu",
|
||||
__entry->cid, __entry->phys, __entry->size)
|
||||
);
|
||||
|
||||
TRACE_EVENT(fastrpc_dma_alloc,
|
||||
|
||||
TP_PROTO(int cid, uint64_t phys, size_t size,
|
||||
unsigned long attr, int mflags),
|
||||
|
||||
TP_ARGS(cid, phys, size, attr, mflags),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field(int, cid)
|
||||
__field(u64, phys)
|
||||
__field(size_t, size)
|
||||
__field(unsigned long, attr)
|
||||
__field(int, mflags)
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->cid = cid;
|
||||
__entry->phys = phys;
|
||||
__entry->size = size;
|
||||
__entry->attr = attr;
|
||||
__entry->mflags = mflags;
|
||||
),
|
||||
|
||||
TP_printk("cid %d, phys 0x%llx, size %zu, attr 0x%lx, flags 0x%x",
|
||||
__entry->cid, __entry->phys, __entry->size,
|
||||
__entry->attr, __entry->mflags)
|
||||
);
|
||||
|
||||
TRACE_EVENT(fastrpc_dma_free,
|
||||
|
||||
TP_PROTO(int cid, uint64_t phys, size_t size),
|
||||
|
||||
TP_ARGS(cid, phys, size),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field(int, cid)
|
||||
__field(u64, phys)
|
||||
__field(size_t, size)
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->cid = cid;
|
||||
__entry->phys = phys;
|
||||
__entry->size = size;
|
||||
),
|
||||
|
||||
TP_printk("cid %d, phys 0x%llx, size %zu",
|
||||
__entry->cid, __entry->phys, __entry->size)
|
||||
);
|
||||
|
||||
TRACE_EVENT(fastrpc_context_complete,
|
||||
|
||||
TP_PROTO(int cid, uint64_t smq_ctx, int retval,
|
||||
uint64_t ctx, uint32_t handle, uint32_t sc),
|
||||
|
||||
TP_ARGS(cid, smq_ctx, retval, ctx, handle, sc),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field(int, cid)
|
||||
__field(u64, smq_ctx)
|
||||
__field(int, retval)
|
||||
__field(u64, ctx)
|
||||
__field(u32, handle)
|
||||
__field(u32, sc)
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->cid = cid;
|
||||
__entry->smq_ctx = smq_ctx;
|
||||
__entry->retval = retval;
|
||||
__entry->ctx = ctx;
|
||||
__entry->handle = handle;
|
||||
__entry->sc = sc;
|
||||
),
|
||||
|
||||
TP_printk("from cid %d: smq_ctx 0x%llx, retval 0x%x, ctx 0x%llx, handle 0x%x, sc 0x%x",
|
||||
__entry->cid, __entry->smq_ctx, __entry->retval,
|
||||
__entry->ctx, __entry->handle, __entry->sc)
|
||||
);
|
||||
|
||||
TRACE_EVENT(fastrpc_context_alloc,
|
||||
|
||||
TP_PROTO(uint64_t smq_ctx, uint64_t ctx,
|
||||
uint32_t handle, uint32_t sc),
|
||||
|
||||
TP_ARGS(smq_ctx, ctx, handle, sc),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field(u64, smq_ctx)
|
||||
__field(u64, ctx)
|
||||
__field(u32, handle)
|
||||
__field(u32, sc)
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->smq_ctx = smq_ctx;
|
||||
__entry->ctx = ctx;
|
||||
__entry->handle = handle;
|
||||
__entry->sc = sc;
|
||||
),
|
||||
|
||||
TP_printk("for: smq_ctx 0x%llx, ctx 0x%llx, handle 0x%x, sc 0x%x",
|
||||
__entry->smq_ctx, __entry->ctx, __entry->handle, __entry->sc)
|
||||
);
|
||||
|
||||
TRACE_EVENT(fastrpc_context_free,
|
||||
|
||||
TP_PROTO(uint64_t smq_ctx, uint64_t ctx,
|
||||
uint32_t handle, uint32_t sc),
|
||||
|
||||
TP_ARGS(smq_ctx, ctx, handle, sc),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field(u64, smq_ctx)
|
||||
__field(u64, ctx)
|
||||
__field(u32, handle)
|
||||
__field(u32, sc)
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->smq_ctx = smq_ctx;
|
||||
__entry->ctx = ctx;
|
||||
__entry->handle = handle;
|
||||
__entry->sc = sc;
|
||||
),
|
||||
|
||||
TP_printk("for: smq_ctx 0x%llx, ctx 0x%llx, handle 0x%x, sc 0x%x",
|
||||
__entry->smq_ctx, __entry->ctx, __entry->handle, __entry->sc)
|
||||
);
|
||||
|
||||
#endif
|
||||
|
||||
/* This part must be outside protection */
|
||||
#include <trace/define_trace.h>
|
||||
Loading…
Reference in a new issue